All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RESEND 1/4] drm/amdgpu: add UAPI for user queue query status
@ 2026-11-17  7:23 Prike Liang
  2026-11-17  7:23 ` [PATCH RESEND 2/4] drm/amdgpu/userq: implement support for " Prike Liang
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Prike Liang @ 2026-11-17  7:23 UTC (permalink / raw)
  To: amd-gfx
  Cc: Alexander.Deucher, Christian.Koenig, Pierre-eric.Pelloux-prayer,
	Alex Deucher, Christian König, Sunil Khatri, Prike Liang

From: Alex Deucher <alexander.deucher@amd.com>

Add an API to query whether a queue is broken because it is hung or
VRAM has been lost. Report either condition through a single BROKEN flag.

Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Sunil Khatri <sunil.khatri@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Prike Liang <Prike.Liang@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 29009f6aabde..a1da2833610f 100644
--- a/include/uapi/drm/amdgpu_drm.h
+++ b/include/uapi/drm/amdgpu_drm.h
@@ -340,6 +340,7 @@ union drm_amdgpu_ctx {
 /* user queue IOCTL operations */
 #define AMDGPU_USERQ_OP_CREATE	1
 #define AMDGPU_USERQ_OP_FREE	2
+#define AMDGPU_USERQ_OP_QUERY_STATUS	3
 
 /* queue priority levels */
 /* low < normal low < normal high < high */
@@ -352,6 +353,9 @@ union drm_amdgpu_ctx {
 /* for queues that need access to protected content */
 #define AMDGPU_USERQ_CREATE_FLAGS_QUEUE_SECURE  (1 << 2)
 
+/* the queue is broken because it is hung or VRAM was lost */
+#define AMDGPU_USERQ_QUERY_STATUS_FLAGS_BROKEN  (1 << 0)
+
 /*
  * This structure is a container to pass input configuration
  * info for all supported userqueue related operations.
@@ -433,9 +437,16 @@ struct drm_amdgpu_userq_out {
 	__u32 _pad;
 };
 
+/* The structure to carry output of userqueue ops */
+struct drm_amdgpu_userq_out_query_state {
+	__u32 flags;
+	__u32 _pad;
+};
+
 union drm_amdgpu_userq {
 	struct drm_amdgpu_userq_in in;
 	struct drm_amdgpu_userq_out out;
+	struct drm_amdgpu_userq_out_query_state out_qs;
 };
 
 /* GFX V11 IP specific MQD parameters */
-- 
2.34.1


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

end of thread, other threads:[~2026-11-17  7:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-17  7:23 [PATCH RESEND 1/4] drm/amdgpu: add UAPI for user queue query status Prike Liang
2026-11-17  7:23 ` [PATCH RESEND 2/4] drm/amdgpu/userq: implement support for " Prike Liang
2026-11-17  7:41   ` sashiko-bot
2026-11-17  7:23 ` [PATCH RESEND 3/4] drm/amdgpu/userq: report invalid VA through the broken status flag Prike Liang
2026-11-17  7:42   ` sashiko-bot
2026-11-17  7:23 ` [PATCH RESEND 4/4] drm/amdgpu/userq: report GPU reset in progress Prike Liang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.