amdgpu: get maximum and used UVD handles
PATCH 1/1 amdgpu: get maximum and used UVD handles
From: Arindam Nath <[email protected]>
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.
--- include/drm/amdgpu_drm.h | 9 +++++++++ 1 file changed, 9 insertions(+)
include/drm/amdgpu_drm.h +9 -0
@@ -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 */
Signature · 6 lines
1.9.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1481568690-3718-1-git-send-email-arindam.nath-5C7GfCeVMHo@public.gmane.org
Quoted 12 lines · On 12 December 2016 at 18:51, <[email protected]> wrote:
From: Arindam Nath <[email protected]>
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_HANDLESand a new structdrm_amdgpu_info_num_handlesto get these values.
Quoted 6 lines
Signed-off-by Arindam Nath <[email protected]>Reviewed-by Christian König <[email protected]>--- 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
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx