[PATCH i-g-t v2 1/2] drm-uapi/amdgpu: Add queue priority and secure flags definitions

Khatri, Sunil Sunil.Khatri at amd.com
Thu Apr 17 12:42:43 UTC 2025


[AMD Official Use Only - AMD Internal Distribution Only]

Reviewed-by: Sunil Khatri <sunil.khatri at amd.com>

-----Original Message-----
From: Jesse.zhang at amd.com <jesse.zhang at amd.com>
Sent: Thursday, April 17, 2025 2:23 PM
To: igt-dev at lists.freedesktop.org
Cc: Prosyak, Vitaly <Vitaly.Prosyak at amd.com>; Deucher, Alexander <Alexander.Deucher at amd.com>; Koenig, Christian <Christian.Koenig at amd.com>; Khatri, Sunil <Sunil.Khatri at amd.com>; Zhang, Jesse(Jie) <Jesse.Zhang at amd.com>; Zhang, Jesse(Jie) <Jesse.Zhang at amd.com>
Subject: [PATCH i-g-t v2 1/2] drm-uapi/amdgpu: Add queue priority and secure flags definitions

Add UAPI definitions for queue priority levels (NORMAL_LOW, LOW, etc.) and secure queue flag in amdgpu_drm.h. This matches the libdrm changes in commit fdf384d4b546 ("amdgpu: add priority and secure flags for user queues").

v2: In general, UAPI changes should be part of a different change and only uapi should be part of it (Sunil)

Signed-off-by: Jesse.Zhang <Jesse.zhang at amd.com>
---
 include/drm-uapi/amdgpu_drm.h | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/include/drm-uapi/amdgpu_drm.h b/include/drm-uapi/amdgpu_drm.h index 8191d0bd0..3f4813879 100644
--- a/include/drm-uapi/amdgpu_drm.h
+++ b/include/drm-uapi/amdgpu_drm.h
@@ -329,6 +329,16 @@ union drm_amdgpu_ctx {
 #define AMDGPU_USERQ_OP_CREATE 1
 #define AMDGPU_USERQ_OP_FREE   2

+/* queue priority levels */
+#define AMDGPU_USERQ_CREATE_FLAGS_QUEUE_PRIORITY_MASK  0x3 #define
+AMDGPU_USERQ_CREATE_FLAGS_QUEUE_PRIORITY_SHIFT 0 #define
+AMDGPU_USERQ_CREATE_FLAGS_QUEUE_PRIORITY_NORMAL_LOW 0 #define
+AMDGPU_USERQ_CREATE_FLAGS_QUEUE_PRIORITY_LOW 1 #define
+AMDGPU_USERQ_CREATE_FLAGS_QUEUE_PRIORITY_NORMAL_HIGH 2 #define
+AMDGPU_USERQ_CREATE_FLAGS_QUEUE_PRIORITY_HIGH 3 /* admin only */
+/* for queues that need access to protected content */ #define
+AMDGPU_USERQ_CREATE_FLAGS_QUEUE_SECURE  (1 << 2)
+
 /*
  * This structure is a container to pass input configuration
  * info for all supported userqueue related operations.
@@ -355,7 +365,7 @@ struct drm_amdgpu_userq_in {
         * and doorbell_offset in the doorbell bo.
         */
        __u32   doorbell_offset;
-       __u32 _pad;
+       __u32 flags;
        /**
         * @queue_va: Virtual address of the GPU memory which holds the queue
         * object. The queue holds the workload packets.
--
2.25.1



More information about the igt-dev mailing list