summaryrefslogtreecommitdiffstats
path: root/src/amd
diff options
context:
space:
mode:
authorLeo Liu <[email protected]>2017-05-03 14:06:35 -0400
committerLeo Liu <[email protected]>2017-05-29 14:32:29 -0400
commit0abc24723cdbc061bd463958f9f669549a1b5da8 (patch)
tree7697c1b84c41ada9a75adc965a61e794f4a9305d /src/amd
parent79f0fe655dfe3e572a6f5325844f96150b8c5cee (diff)
amd/common: add vcn dec ip info query for amdgpu version 3.17
Signed-off-by: Leo Liu <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/amd')
-rw-r--r--src/amd/common/ac_gpu_info.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/amd/common/ac_gpu_info.c b/src/amd/common/ac_gpu_info.c
index 56645c48632..3dae2bd14c0 100644
--- a/src/amd/common/ac_gpu_info.c
+++ b/src/amd/common/ac_gpu_info.c
@@ -88,7 +88,7 @@ bool ac_query_gpu_info(int fd, amdgpu_device_handle dev,
{
struct amdgpu_buffer_size_alignments alignment_info = {};
struct amdgpu_heap_info vram, vram_vis, gtt;
- struct drm_amdgpu_info_hw_ip dma = {}, compute = {}, uvd = {}, vce = {};
+ struct drm_amdgpu_info_hw_ip dma = {}, compute = {}, uvd = {}, vce = {}, vcn_dec = {};
uint32_t vce_version = 0, vce_feature = 0, uvd_version = 0, uvd_feature = 0;
uint32_t unused_feature;
int r, i, j;
@@ -157,6 +157,14 @@ bool ac_query_gpu_info(int fd, amdgpu_device_handle dev,
return false;
}
+ if (info->drm_major == 3 && info->drm_minor >= 17) {
+ r = amdgpu_query_hw_ip_info(dev, AMDGPU_HW_IP_VCN_DEC, 0, &vcn_dec);
+ if (r) {
+ fprintf(stderr, "amdgpu: amdgpu_query_hw_ip_info(vcn_dec) failed.\n");
+ return false;
+ }
+ }
+
r = amdgpu_query_firmware_version(dev, AMDGPU_INFO_FW_GFX_ME, 0, 0,
&info->me_fw_version, &unused_feature);
if (r) {