diff options
Diffstat (limited to 'drivers/gpu')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu.h | 26 | ||||
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | 22 |
2 files changed, 23 insertions, 25 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index 68817e60e787..8274d8e23e98 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h | |||
| @@ -62,6 +62,7 @@ | |||
| 62 | #include "amdgpu_acp.h" | 62 | #include "amdgpu_acp.h" |
| 63 | #include "amdgpu_uvd.h" | 63 | #include "amdgpu_uvd.h" |
| 64 | #include "amdgpu_vce.h" | 64 | #include "amdgpu_vce.h" |
| 65 | #include "amdgpu_vcn.h" | ||
| 65 | 66 | ||
| 66 | #include "gpu_scheduler.h" | 67 | #include "gpu_scheduler.h" |
| 67 | #include "amdgpu_virt.h" | 68 | #include "amdgpu_virt.h" |
| @@ -1181,31 +1182,6 @@ void amdgpu_wb_free_64bit(struct amdgpu_device *adev, u32 wb); | |||
| 1181 | void amdgpu_get_pcie_info(struct amdgpu_device *adev); | 1182 | void amdgpu_get_pcie_info(struct amdgpu_device *adev); |
| 1182 | 1183 | ||
| 1183 | /* | 1184 | /* |
| 1184 | * VCN | ||
| 1185 | */ | ||
| 1186 | #define AMDGPU_VCN_STACK_SIZE (200*1024) | ||
| 1187 | #define AMDGPU_VCN_HEAP_SIZE (256*1024) | ||
| 1188 | #define AMDGPU_VCN_SESSION_SIZE (50*1024) | ||
| 1189 | #define AMDGPU_VCN_FIRMWARE_OFFSET 256 | ||
| 1190 | #define AMDGPU_VCN_MAX_ENC_RINGS 3 | ||
| 1191 | |||
| 1192 | struct amdgpu_vcn { | ||
| 1193 | struct amdgpu_bo *vcpu_bo; | ||
| 1194 | void *cpu_addr; | ||
| 1195 | uint64_t gpu_addr; | ||
| 1196 | unsigned fw_version; | ||
| 1197 | void *saved_bo; | ||
| 1198 | struct delayed_work idle_work; | ||
| 1199 | const struct firmware *fw; /* VCN firmware */ | ||
| 1200 | struct amdgpu_ring ring_dec; | ||
| 1201 | struct amdgpu_ring ring_enc[AMDGPU_VCN_MAX_ENC_RINGS]; | ||
| 1202 | struct amdgpu_irq_src irq; | ||
| 1203 | struct amd_sched_entity entity_dec; | ||
| 1204 | struct amd_sched_entity entity_enc; | ||
| 1205 | uint32_t srbm_soft_reset; | ||
| 1206 | }; | ||
| 1207 | |||
| 1208 | /* | ||
| 1209 | * SDMA | 1185 | * SDMA |
| 1210 | */ | 1186 | */ |
| 1211 | struct amdgpu_sdma_instance { | 1187 | struct amdgpu_sdma_instance { |
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h index ec4d7ca7ed61..2fd22a5d23b4 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.h | |||
| @@ -24,6 +24,28 @@ | |||
| 24 | #ifndef __AMDGPU_VCN_H__ | 24 | #ifndef __AMDGPU_VCN_H__ |
| 25 | #define __AMDGPU_VCN_H__ | 25 | #define __AMDGPU_VCN_H__ |
| 26 | 26 | ||
| 27 | #define AMDGPU_VCN_STACK_SIZE (200*1024) | ||
| 28 | #define AMDGPU_VCN_HEAP_SIZE (256*1024) | ||
| 29 | #define AMDGPU_VCN_SESSION_SIZE (50*1024) | ||
| 30 | #define AMDGPU_VCN_FIRMWARE_OFFSET 256 | ||
| 31 | #define AMDGPU_VCN_MAX_ENC_RINGS 3 | ||
| 32 | |||
| 33 | struct amdgpu_vcn { | ||
| 34 | struct amdgpu_bo *vcpu_bo; | ||
| 35 | void *cpu_addr; | ||
| 36 | uint64_t gpu_addr; | ||
| 37 | unsigned fw_version; | ||
| 38 | void *saved_bo; | ||
| 39 | struct delayed_work idle_work; | ||
| 40 | const struct firmware *fw; /* VCN firmware */ | ||
| 41 | struct amdgpu_ring ring_dec; | ||
| 42 | struct amdgpu_ring ring_enc[AMDGPU_VCN_MAX_ENC_RINGS]; | ||
| 43 | struct amdgpu_irq_src irq; | ||
| 44 | struct amd_sched_entity entity_dec; | ||
| 45 | struct amd_sched_entity entity_enc; | ||
| 46 | uint32_t srbm_soft_reset; | ||
| 47 | }; | ||
| 48 | |||
| 27 | int amdgpu_vcn_sw_init(struct amdgpu_device *adev); | 49 | int amdgpu_vcn_sw_init(struct amdgpu_device *adev); |
| 28 | int amdgpu_vcn_sw_fini(struct amdgpu_device *adev); | 50 | int amdgpu_vcn_sw_fini(struct amdgpu_device *adev); |
| 29 | int amdgpu_vcn_suspend(struct amdgpu_device *adev); | 51 | int amdgpu_vcn_suspend(struct amdgpu_device *adev); |
