summaryrefslogtreecommitdiff
path: root/include/uapi
diff options
context:
space:
mode:
authorJesse Zhang <jesse.zhang@amd.com>2025-06-25 15:29:45 +0800
committerAlex Deucher <alexander.deucher@amd.com>2025-07-16 16:17:35 -0400
commit78d0a27ae0e2e70b22895f4b388cc0ab88e3c6ca (patch)
tree781b64d869e4eca92533245847798b58fe60cb1e /include/uapi
parent55d42f6169760d052330f3c949c02e37867b87d8 (diff)
drm/amdgpu: Add user queue instance count in HW IP info
This change exposes the number of available user queue instances for each hardware IP type (GFX, COMPUTE, SDMA) through the drm_amdgpu_info_hw_ip interface. Key changes: 1. Added userq_num_instance field to drm_amdgpu_info_hw_ip structure 2. Implemented counting of available HQD slots using: - mes.gfx_hqd_mask for GFX queues - mes.compute_hqd_mask for COMPUTE queues - mes.sdma_hqd_mask for SDMA queues 3. Only counts available instances when user queues are enabled (!disable_uq) v2: using the adev->mes.gfx_hqd_mask[]/compute_hqd_mask[]/sdma_hqd_mask[] masks to determine the number of queue slots available for each engine type (Alex) v3: rename userq_num_instance to userq_num_hqds (Alex) Suggested-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/drm/amdgpu_drm.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/uapi/drm/amdgpu_drm.h b/include/uapi/drm/amdgpu_drm.h
index 45c4fa13499c..66c4a03ac9f9 100644
--- a/include/uapi/drm/amdgpu_drm.h
+++ b/include/uapi/drm/amdgpu_drm.h
@@ -1493,6 +1493,8 @@ struct drm_amdgpu_info_hw_ip {
__u32 available_rings;
/** version info: bits 23:16 major, 15:8 minor, 7:0 revision */
__u32 ip_discovery_version;
+ /* Userq available hqds */
+ __u32 userq_num_hqds;
};
/* GFX metadata BO sizes and alignment info (in bytes) */