Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t v2 1/2] drm-uapi/amdgpu: Add queue priority and secure flags definitions
@ 2025-04-17  8:52 Jesse.zhang@amd.com
  2025-04-17  8:52 ` [PATCH i-g-t v2 2/2] lib/amdgpu: Implement priority and secure flags for user queues Jesse.zhang@amd.com
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: Jesse.zhang@amd.com @ 2025-04-17  8:52 UTC (permalink / raw)
  To: igt-dev
  Cc: Vitaly Prosyak, Alex Deucher, Christian Koenig, sukhatri,
	Jesse.zhang@amd.com, Jesse . Zhang

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@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


^ permalink raw reply related	[flat|nested] 11+ messages in thread
* [PATCH i-g-t v2 1/2] drm-uapi/amdgpu: Add queue priority and secure flags definitions
@ 2025-04-18  2:29 Jesse.zhang@amd.com
  0 siblings, 0 replies; 11+ messages in thread
From: Jesse.zhang@amd.com @ 2025-04-18  2:29 UTC (permalink / raw)
  To: igt-dev
  Cc: Vitaly Prosyak, Alex Deucher, Christian Koenig, Kamil Konieczny,
	Jesse.zhang@amd.com, Jesse . Zhang, Sunil Khatri

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").
https://gitlab.freedesktop.org/mesa/drm/-/commit/fdf384d4b546850bc4c200541c42d29a62b2eca7

Related driver patches provided by Alex:
https://lists.freedesktop.org/archives/amd-gfx/2025-April/122782.html
https://lists.freedesktop.org/archives/amd-gfx/2025-April/122780.html
https://lists.freedesktop.org/archives/amd-gfx/2025-April/122786.html

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@amd.com>
Reviewed-by: Sunil Khatri <sunil.khatri@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


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2025-04-22  8:21 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-17  8:52 [PATCH i-g-t v2 1/2] drm-uapi/amdgpu: Add queue priority and secure flags definitions Jesse.zhang@amd.com
2025-04-17  8:52 ` [PATCH i-g-t v2 2/2] lib/amdgpu: Implement priority and secure flags for user queues Jesse.zhang@amd.com
2025-04-17 12:44   ` Khatri, Sunil
2025-04-17 12:42 ` [PATCH i-g-t v2 1/2] drm-uapi/amdgpu: Add queue priority and secure flags definitions Khatri, Sunil
2025-04-17 13:21 ` ✗ Xe.CI.BAT: failure for series starting with [i-g-t,v2,1/2] " Patchwork
2025-04-17 13:41 ` ✓ i915.CI.BAT: success " Patchwork
2025-04-17 16:37 ` [PATCH i-g-t v2 1/2] " Kamil Konieczny
2025-04-22  8:21   ` Christian König
2025-04-18  1:12 ` ✗ i915.CI.Full: failure for series starting with [i-g-t,v2,1/2] " Patchwork
2025-04-18  3:41 ` ✗ Xe.CI.Full: " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2025-04-18  2:29 [PATCH i-g-t v2 1/2] " Jesse.zhang@amd.com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox