From 3002e9518ee9b3660f4bd676c546785364885f3c Mon Sep 17 00:00:00 2001 From: Arindam Nath Date: Mon, 9 Jan 2017 14:56:25 +0530 Subject: [PATCH 10/10] amdgpu: sync amdgpu_drm.h with the kernel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit v1: * User might want to query the maximum number of UVD instances supported by firmware. In addition to that, if there are multiple applications using UVD handles at the same time, he might also want to query the currently used number of handles. For this we add a new query AMDGPU_INFO_NUM_HANDLES and a new struct drm_amdgpu_info_num_handles to get these values. v2: * Generated using make headers_install. * Generated from linux-stable/master commit a121103c922847ba5010819a3f250f1f7fc84ab8 Suggested-by: Emil Velikov Signed-off-by: Arindam Nath Reviewed-by: Christian König Signed-off-by:Raveendra Talabattula --- include/drm/amdgpu_drm.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/drm/amdgpu_drm.h b/include/drm/amdgpu_drm.h index d40742e..8272f93 100644 --- a/include/drm/amdgpu_drm.h +++ b/include/drm/amdgpu_drm.h @@ -571,6 +571,8 @@ struct drm_amdgpu_cs_chunk_data { #define AMDGPU_INFO_VIRTUAL_RANGE 0x18 /* Query memory about VRAM and GTT domains */ #define AMDGPU_INFO_MEMORY 0x19 +/* Query UVD handles */ +#define AMDGPU_INFO_NUM_HANDLES 0x1C /* gpu capability */ #define AMDGPU_INFO_CAPABILITY 0x50 @@ -764,6 +766,13 @@ struct drm_amdgpu_info_hw_ip { uint32_t _pad; }; +struct drm_amdgpu_info_num_handles { + /** Max handles as supported by firmware for UVD */ + uint32_t uvd_max_handles; + /** Handles currently in use for UVD */ + uint32_t uvd_used_handles; +}; + /* * Supported GPU families */ -- 2.7.4