[PATCH 1/8] drm/amdgpu: add UAPI to create user queue gangs
Alex Deucher
alexander.deucher at amd.com
Fri Apr 25 18:41:18 UTC 2025
Queues in a gang will schedule together.
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
---
include/uapi/drm/amdgpu_drm.h | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/include/uapi/drm/amdgpu_drm.h b/include/uapi/drm/amdgpu_drm.h
index 56f052a10ff38..83414563779fb 100644
--- a/include/uapi/drm/amdgpu_drm.h
+++ b/include/uapi/drm/amdgpu_drm.h
@@ -329,6 +329,7 @@ union drm_amdgpu_ctx {
#define AMDGPU_USERQ_OP_CREATE 1
#define AMDGPU_USERQ_OP_FREE 2
#define AMDGPU_USERQ_OP_QUERY_STATUS 3
+#define AMDGPU_USERQ_OP_CREATE_GANG 4
/* queue priority levels */
/* low < normal low < normal high < high */
@@ -417,6 +418,15 @@ struct drm_amdgpu_userq_in {
__u64 mqd_size;
};
+struct drm_amdgpu_userq_in_create_gang {
+ /** AMDGPU_USERQ_OP_* */
+ __u32 op;
+ __u32 pad;
+ /** Queue ids passed for operation USERQ_OP_CREATE_GANG */
+ __u32 primary_queue_id;
+ __u32 secondary_queue_id;
+};
+
/* The structure to carry output of userqueue ops */
struct drm_amdgpu_userq_out {
/**
@@ -436,6 +446,7 @@ struct drm_amdgpu_userq_out_query_state {
union drm_amdgpu_userq {
struct drm_amdgpu_userq_in in;
+ struct drm_amdgpu_userq_in_create_gang in_cg;
struct drm_amdgpu_userq_out out;
struct drm_amdgpu_userq_out_query_state out_qs;
};
--
2.49.0
More information about the amd-gfx
mailing list