Message ID | 1481568690-3718-1-git-send-email-arindam.nath@amd.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 12 December 2016 at 18:51, <arindam.nath@amd.com> wrote: > From: Arindam Nath <arindam.nath@amd.com> > > 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. > > Signed-off-by: Arindam Nath <arindam.nath@amd.com> > Reviewed-by: Christian König <christian.koenig@amd.com> > --- > include/drm/amdgpu_drm.h | 9 +++++++++ > 1 file changed, 9 insertions(+) > Follow the documented way to update the libdrm headers [1]. You will want to tackle this [2] small task first. If the documentation is unclear and/or can be improved feel free to send a patch. Thanks Emil [1] https://cgit.freedesktop.org/mesa/drm/tree/include/drm/README#n68 [2] https://cgit.freedesktop.org/mesa/drm/tree/include/drm/README#n97
diff --git a/include/drm/amdgpu_drm.h b/include/drm/amdgpu_drm.h index d8f2497..89fda6b 100644 --- a/include/drm/amdgpu_drm.h +++ b/include/drm/amdgpu_drm.h @@ -483,6 +483,8 @@ struct drm_amdgpu_cs_chunk_data { #define AMDGPU_INFO_DEV_INFO 0x16 /* visible vram usage */ #define AMDGPU_INFO_VIS_VRAM_USAGE 0x17 +/* Query UVD handles */ +#define AMDGPU_INFO_NUM_HANDLES 0x1C #define AMDGPU_INFO_MMR_SE_INDEX_SHIFT 0 #define AMDGPU_INFO_MMR_SE_INDEX_MASK 0xff @@ -641,6 +643,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 */