diff options
author | Leo Liu <leo.liu@amd.com> | 2016-12-21 13:21:52 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-05-24 17:41:22 -0400 |
commit | 95d0906f8506550a7c4a59c770732e7de912cffc (patch) | |
tree | 788630efbc4e83d08cdb72029ddd0a64cff994f9 /drivers/gpu/drm/amd/amdgpu/amdgpu.h | |
parent | 9e2837f6aee2c1859041d901b8d6202f2ba85210 (diff) |
drm/amdgpu: add initial vcn support and decode tests
VCN is the new media block on Raven. Add core support
and the ring and ib tests for decode.
Signed-off-by: Leo Liu <leo.liu@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu.h')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu.h | 40 |
1 files changed, 36 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index a2dd218e35b9..68817e60e787 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h | |||
@@ -1181,6 +1181,31 @@ void amdgpu_wb_free_64bit(struct amdgpu_device *adev, u32 wb); | |||
1181 | void amdgpu_get_pcie_info(struct amdgpu_device *adev); | 1181 | void amdgpu_get_pcie_info(struct amdgpu_device *adev); |
1182 | 1182 | ||
1183 | /* | 1183 | /* |
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 | /* | ||
1184 | * SDMA | 1209 | * SDMA |
1185 | */ | 1210 | */ |
1186 | struct amdgpu_sdma_instance { | 1211 | struct amdgpu_sdma_instance { |
@@ -1572,11 +1597,18 @@ struct amdgpu_device { | |||
1572 | /* sdma */ | 1597 | /* sdma */ |
1573 | struct amdgpu_sdma sdma; | 1598 | struct amdgpu_sdma sdma; |
1574 | 1599 | ||
1575 | /* uvd */ | 1600 | union { |
1576 | struct amdgpu_uvd uvd; | 1601 | struct { |
1602 | /* uvd */ | ||
1603 | struct amdgpu_uvd uvd; | ||
1604 | |||
1605 | /* vce */ | ||
1606 | struct amdgpu_vce vce; | ||
1607 | }; | ||
1577 | 1608 | ||
1578 | /* vce */ | 1609 | /* vcn */ |
1579 | struct amdgpu_vce vce; | 1610 | struct amdgpu_vcn vcn; |
1611 | }; | ||
1580 | 1612 | ||
1581 | /* firmwares */ | 1613 | /* firmwares */ |
1582 | struct amdgpu_firmware firmware; | 1614 | struct amdgpu_firmware firmware; |