[Mesa-dev] [PATCH 14/17] amdgpu/winsys: add vcn dec ip info query

Leo Liu leo.liu at amd.com
Wed May 10 20:15:48 UTC 2017


Signed-off-by: Leo Liu <leo.liu at amd.com>
Reviewed-by: Christian König <christian.koenig at amd.com>
---
 src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c
index 761a4ca..3e92fff 100644
--- a/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c
+++ b/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c
@@ -99,7 +99,7 @@ static bool do_winsys_init(struct amdgpu_winsys *ws, int fd)
 {
    struct amdgpu_buffer_size_alignments alignment_info = {};
    struct amdgpu_heap_info vram, vram_vis, gtt;
-   struct drm_amdgpu_info_hw_ip dma = {}, uvd = {}, vce = {};
+   struct drm_amdgpu_info_hw_ip dma = {}, 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;
@@ -162,6 +162,12 @@ static bool do_winsys_init(struct amdgpu_winsys *ws, int fd)
       goto fail;
    }
 
+   r = amdgpu_query_hw_ip_info(ws->dev, AMDGPU_HW_IP_VCN_DEC, 0, &vcn_dec);
+   if (r) {
+      fprintf(stderr, "amdgpu: amdgpu_query_hw_ip_info(uvd) failed.\n");
+      goto fail;
+   }
+
    r = amdgpu_query_firmware_version(ws->dev, AMDGPU_INFO_FW_GFX_ME, 0, 0,
 				     &ws->info.me_fw_version, &unused_feature);
    if (r) {
-- 
2.7.4



More information about the mesa-dev mailing list