Skip to contentSkip to conversation

drm/amdgpu: add UAPI for user queue query status

PATCH In review Prike Liang 1 participant 7 messages Oct 10 – Nov 4

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v4 1/4 drm/amdgpu: add UAPI for user queue query status

From: Alex Deucher <[email protected]>

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.

---
 include/uapi/drm/amdgpu_drm.h | 11 +++++++++++
 1 file changed, 11 insertions(+)
include/uapi/drm/amdgpu_drm.h +11 -0
index cd1b8034a2fb..71936418b0db 100644
@@ -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 */
Signature · 1 line
2.34.1
#1 lore raw

PATCH v4 2/4 drm/amdgpu/userq: implement support for query status

From: Alex Deucher <[email protected]>

Query the status of the user queue. Report BROKEN when the queue is hung or its VM generation indicates that VRAM has been lost.

v2: Misc cleanups

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 34 +++++++++++++++++++++++
 drivers/gpu/drm/amd/amdgpu/amdgpu_userq.h |  1 +
 2 files changed, 35 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c +34 -0
index 75d5ceaa53c6..b99fd7acdc1b 100644
@@ -692,6 +692,7 @@ amdgpu_userq_create(struct drm_file *filp, union drm_amdgpu_userq *args)
 	queue->queue_type = args->in.ip_type;
 	queue->vm = &fpriv->vm;
 	queue->priority = priority;
+	queue->generation = amdgpu_vm_generation(adev, &fpriv->vm);
 	queue->xcp_id = (fpriv->xcp_id != AMDGPU_XCP_NO_PARTITION) ?
 				fpriv->xcp_id : 0;
 	queue->userq_mgr = uq_mgr;
@@ -812,6 +813,33 @@ amdgpu_userq_create(struct drm_file *filp, union drm_amdgpu_userq *args)
 	return r;
 }
 
+static int
+amdgpu_userq_query_status(struct drm_file *filp, union drm_amdgpu_userq *args)
+{
+	struct amdgpu_fpriv *fpriv = filp->driver_priv;
+	struct amdgpu_userq_mgr *uq_mgr = &fpriv->userq_mgr;
+	struct amdgpu_device *adev = uq_mgr->adev;
+	struct amdgpu_usermode_queue *queue;
+	int queue_id = args->in.queue_id;
+
+	mutex_lock(&uq_mgr->userq_mutex);
+
+	queue = amdgpu_userq_get(uq_mgr, queue_id);
+	if (!queue) {
+		mutex_unlock(&uq_mgr->userq_mutex);
+		return -EINVAL;
+	}
+
+	args->out_qs.flags = 0;
+	if (queue->state == AMDGPU_USERQ_STATE_HUNG ||
+	    queue->generation != amdgpu_vm_generation(adev, &fpriv->vm))
+		args->out_qs.flags |= AMDGPU_USERQ_QUERY_STATUS_FLAGS_BROKEN;
+	amdgpu_userq_put(queue);
+	mutex_unlock(&uq_mgr->userq_mutex);
+
+	return 0;
+}
+
 static int amdgpu_userq_input_args_validate(struct drm_device *dev,
 					union drm_amdgpu_userq *args,
 					struct drm_file *filp)
@@ -933,6 +961,12 @@ int amdgpu_userq_ioctl(struct drm_device *dev, void *data,
 		break;
 	}
 
+	case AMDGPU_USERQ_OP_QUERY_STATUS:
+		r = amdgpu_userq_query_status(filp, args);
+		if (r)
+			drm_dbg_driver(dev, "Failed to query usermode queue status\n");
+		break;
+
 	default:
 		drm_dbg_driver(dev, "Invalid user queue op specified: %d\n", args->in.op);
 		return -EINVAL;
drivers/gpu/drm/amd/amdgpu/amdgpu_userq.h +1 -0
index 488dc21d7c81..d1a2e2a45861 100644
@@ -79,6 +79,7 @@ struct amdgpu_usermode_queue {
 	struct dma_fence	*last_fence;
 	u32			xcp_id;
 	int			priority;
+	uint64_t		generation;
 	struct dentry		*debugfs_queue;
 
 	/**
Signature · 1 line
2.34.1
#2 lore raw

PATCH v4 3/4 drm/amdgpu/userq: report invalid VA through the broken status flag

In reply to Prike Liang

Report a queue with an invalid virtual address as BROKEN, alongside hung queues and queues whose VRAM has been lost. Use the existing BROKEN flag instead of exposing a separate INVALID_VA status flag.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 1 +
 include/uapi/drm/amdgpu_drm.h             | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c +1 -0
index b99fd7acdc1b..6340e647a67d 100644
@@ -832,6 +832,7 @@ amdgpu_userq_query_status(struct drm_file *filp, union drm_amdgpu_userq *args)
 
 	args->out_qs.flags = 0;
 	if (queue->state == AMDGPU_USERQ_STATE_HUNG ||
+	    queue->state == AMDGPU_USERQ_STATE_INVALID_VA ||
 	    queue->generation != amdgpu_vm_generation(adev, &fpriv->vm))
 		args->out_qs.flags |= AMDGPU_USERQ_QUERY_STATUS_FLAGS_BROKEN;
 	amdgpu_userq_put(queue);
include/uapi/drm/amdgpu_drm.h +1 -1
index 71936418b0db..98c3fa8a4a72 100644
@@ -353,7 +353,7 @@ 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 */
+/* the queue is broken because it is hung, has an invalid VA, or VRAM was lost */
 #define AMDGPU_USERQ_QUERY_STATUS_FLAGS_BROKEN  (1 << 0)
 
 /*
Signature · 1 line
2.34.1
#3 lore raw

PATCH v4 4/4 drm/amdgpu/userq: report GPU reset in progress

In reply to Prike Liang

Report an ongoing GPU reset through RESET_IN_PROGRESS at bit 1, alongside BROKEN at bit 0, so userspace can query whether GPU recovery is ongoing.

Validate query inputs using the same rules as queue deletion and document the required fields. Drop the queue reference after releasing userq_mutex because the final put may destroy the queue and acquire that mutex.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 6 +++++-
 include/uapi/drm/amdgpu_drm.h             | 8 +++++---
 2 files changed, 10 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c +5 -1
index 6340e647a67d..6c4743ddf04a 100644
@@ -835,8 +835,11 @@ amdgpu_userq_query_status(struct drm_file *filp, union drm_amdgpu_userq *args)
 	    queue->state == AMDGPU_USERQ_STATE_INVALID_VA ||
 	    queue->generation != amdgpu_vm_generation(adev, &fpriv->vm))
 		args->out_qs.flags |= AMDGPU_USERQ_QUERY_STATUS_FLAGS_BROKEN;
-	amdgpu_userq_put(queue);
+	if (amdgpu_in_reset(adev))
+		args->out_qs.flags |= AMDGPU_USERQ_QUERY_STATUS_FLAGS_RESET_IN_PROGRESS;
 	mutex_unlock(&uq_mgr->userq_mutex);
+	/* The final put may destroy the queue and take userq_mutex. */
+	amdgpu_userq_put(queue);
 
 	return 0;
 }
@@ -898,6 +901,7 @@ static int amdgpu_userq_input_args_validate(struct drm_device *dev,
 		}
 		break;
 	case AMDGPU_USERQ_OP_FREE:
+	case AMDGPU_USERQ_OP_QUERY_STATUS:
 		if (args->in.ip_type ||
 		    args->in.doorbell_handle ||
 		    args->in.doorbell_offset ||
include/uapi/drm/amdgpu_drm.h +5 -3
index 98c3fa8a4a72..32ed4c4349a4 100644
@@ -355,19 +355,21 @@ union drm_amdgpu_ctx {
 
 /* the queue is broken because it is hung, has an invalid VA, or VRAM was lost */
 #define AMDGPU_USERQ_QUERY_STATUS_FLAGS_BROKEN  (1 << 0)
+/* indicate that a GPU reset has not completed yet */
+#define AMDGPU_USERQ_QUERY_STATUS_FLAGS_RESET_IN_PROGRESS (1 << 1)
 
 /*
  * This structure is a container to pass input configuration
  * info for all supported userqueue related operations.
  * For operation AMDGPU_USERQ_OP_CREATE: user is expected
  *  to set all fields, excep the parameter 'queue_id'.
- * For operation AMDGPU_USERQ_OP_FREE: the only input parameter expected
- *  to be set is 'queue_id', eveything else is ignored.
+ * For operations AMDGPU_USERQ_OP_FREE and AMDGPU_USERQ_OP_QUERY_STATUS:
+ *  only 'op' and 'queue_id' should be set; all other fields must be zero.
  */
 struct drm_amdgpu_userq_in {
 	/** AMDGPU_USERQ_OP_* */
 	__u32	op;
-	/** Queue id passed for operation USERQ_OP_FREE */
+	/** Queue id passed for operations USERQ_OP_FREE and USERQ_OP_QUERY_STATUS */
 	__u32	queue_id;
 	/** the target GPU engine to execute workload (AMDGPU_HW_IP_*) */
 	__u32   ip_type;
Signature · 1 line
2.34.1
#4 lore raw

RE: [PATCH v4 4/4] drm/amdgpu/userq: report GPU reset in progress

AMD General

Ping on the series

Regards,
Prike

Quoted 85 lines

-----Original Message-----
From: Liang, Prike <[email protected]>
Sent: Saturday, October 10, 2026 10:50 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>; Pelloux-Prayer, Pierre-Eric <Pierre-eric.Pelloux- [email protected]>; Liang, Prike <[email protected]>
Subject: [PATCH v4 4/4] drm/amdgpu/userq: report GPU reset in progress

Report an ongoing GPU reset through RESET_IN_PROGRESS at bit 1, alongside BROKEN at bit 0, so userspace can query whether GPU recovery is ongoing.

Validate query inputs using the same rules as queue deletion and document the required fields. Drop the queue reference after releasing userq_mutex because the final put may destroy the queue and acquire that mutex.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 6 +++++-
 include/uapi/drm/amdgpu_drm.h             | 8 +++++---
 2 files changed, 10 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c +6 -1
index 6340e647a67d..6c4743ddf04a 100644
@@ -835,8 +835,11 @@ amdgpu_userq_query_status(struct drm_file *filp, union
 drm_amdgpu_userq *args)
          queue->state == AMDGPU_USERQ_STATE_INVALID_VA ||
          queue->generation != amdgpu_vm_generation(adev, &fpriv->vm))
              args->out_qs.flags |=
 AMDGPU_USERQ_QUERY_STATUS_FLAGS_BROKEN;
-     amdgpu_userq_put(queue);
+     if (amdgpu_in_reset(adev))
+             args->out_qs.flags |=
+AMDGPU_USERQ_QUERY_STATUS_FLAGS_RESET_IN_PROGRESS;
      mutex_unlock(&uq_mgr->userq_mutex);
+     /* The final put may destroy the queue and take userq_mutex. */
+     amdgpu_userq_put(queue);
 
      return 0;
 }
@@ -898,6 +901,7 @@ static int amdgpu_userq_input_args_validate(struct
 drm_device *dev,
              }
              break;
      case AMDGPU_USERQ_OP_FREE:
+     case AMDGPU_USERQ_OP_QUERY_STATUS:
              if (args->in.ip_type ||
                  args->in.doorbell_handle ||
                  args->in.doorbell_offset ||
include/uapi/drm/amdgpu_drm.h index renamed from include/uapi/drm/amdgpu_drm.h +0 -0

98c3fa8a4a72..32ed4c4349a4 100644

include/uapi/drm/amdgpu_drm.h +3 -2
@@ -355,19 +355,21 @@ union drm_amdgpu_ctx {
 
 /* the queue is broken because it is hung, has an invalid VA, or VRAM was lost */
 #define AMDGPU_USERQ_QUERY_STATUS_FLAGS_BROKEN  (1 << 0)
+/* indicate that a GPU reset has not completed yet */ #define
+AMDGPU_USERQ_QUERY_STATUS_FLAGS_RESET_IN_PROGRESS (1 << 1)
 
 /*
  * This structure is a container to pass input configuration
  * info for all supported userqueue related operations.
  * For operation AMDGPU_USERQ_OP_CREATE: user is expected
  *  to set all fields, excep the parameter 'queue_id'.
- * For operation AMDGPU_USERQ_OP_FREE: the only input parameter expected
- *  to be set is 'queue_id', eveything else is ignored.
+ * For operations AMDGPU_USERQ_OP_FREE and

AMDGPU_USERQ_OP_QUERY_STATUS:
+ * only 'op' and 'queue_id' should be set; all other fields must be zero. */

 struct drm_amdgpu_userq_in {
      /** AMDGPU_USERQ_OP_* */
      __u32   op;
include/uapi/drm/amdgpu_drm.h +2 -2
-     /** Queue id passed for operation USERQ_OP_FREE */
+     /** Queue id passed for operations USERQ_OP_FREE and
+USERQ_OP_QUERY_STATUS */
      __u32   queue_id;
      /** the target GPU engine to execute workload (AMDGPU_HW_IP_*) */
      __u32   ip_type;
--

2.34.1

#5 lore raw

RE: [PATCH v4 4/4] drm/amdgpu/userq: report GPU reset in progress

AMD General

Hi @Deucher, Alexander, @Pelloux-Prayer, Pierre-Eric

Could you please review the following patches, which include the libdrm implementation?

https://gitlab.freedesktop.org/mesa/libdrm/-/merge_requests/487

Regards,
Prike

Quoted 106 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Liang, Prike
Sent: Wednesday, October 21, 2026 5:15 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>; Pelloux-Prayer, Pierre-Eric <Pierre-eric.Pelloux- [email protected]>
Subject: RE: [PATCH v4 4/4] drm/amdgpu/userq: report GPU reset in progress

AMD General

Ping on the series

Regards,
Prike

Quoted 10 lines

-----Original Message-----
From: Liang, Prike <[email protected]>
Sent: Saturday, October 10, 2026 10:50 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>; Pelloux-Prayer, Pierre-Eric <Pierre-eric.Pelloux- [email protected]>; Liang, Prike <[email protected]>
Subject: [PATCH v4 4/4] drm/amdgpu/userq: report GPU reset in progress

Quoted 2 lines

Report an ongoing GPU reset through RESET_IN_PROGRESS at bit 1, alongside BROKEN at bit 0, so userspace can query whether GPU recovery is

ongoing.

Quoted 48 lines

Validate query inputs using the same rules as queue deletion and document the required fields. Drop the queue reference after releasing userq_mutex because the final put may destroy the queue and acquire that mutex.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 6 +++++-
 include/uapi/drm/amdgpu_drm.h             | 8 +++++---
 2 files changed, 10 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c +6 -1
index 6340e647a67d..6c4743ddf04a 100644
@@ -835,8 +835,11 @@ amdgpu_userq_query_status(struct drm_file *filp,
 union drm_amdgpu_userq *args)
          queue->state == AMDGPU_USERQ_STATE_INVALID_VA ||
          queue->generation != amdgpu_vm_generation(adev, &fpriv->vm))
              args->out_qs.flags |=
 AMDGPU_USERQ_QUERY_STATUS_FLAGS_BROKEN;
-     amdgpu_userq_put(queue);
+     if (amdgpu_in_reset(adev))
+             args->out_qs.flags |=
+AMDGPU_USERQ_QUERY_STATUS_FLAGS_RESET_IN_PROGRESS;
      mutex_unlock(&uq_mgr->userq_mutex);
+     /* The final put may destroy the queue and take userq_mutex. */
+     amdgpu_userq_put(queue);
 
      return 0;
 }
@@ -898,6 +901,7 @@ static int amdgpu_userq_input_args_validate(struct
 drm_device *dev,
              }
              break;
      case AMDGPU_USERQ_OP_FREE:
+     case AMDGPU_USERQ_OP_QUERY_STATUS:
              if (args->in.ip_type ||
                  args->in.doorbell_handle ||
                  args->in.doorbell_offset || diff --git

a/include/uapi/drm/amdgpu_drm.h b/include/uapi/drm/amdgpu_drm.h index 98c3fa8a4a72..32ed4c4349a4 100644

include/uapi/drm/amdgpu_drm.h +0 -0
@@ -355,19 +355,21 @@ union drm_amdgpu_ctx {
 
 /* the queue is broken because it is hung, has an invalid VA, or VRAM
Quoted 1 line

was lost */ #define AMDGPU_USERQ_QUERY_STATUS_FLAGS_BROKEN (1

<< 0)

include/uapi/drm/amdgpu_drm.h

Quoted 2 lines
include/uapi/drm/amdgpu_drm.h +2 -0
+/* indicate that a GPU reset has not completed yet */ #define
+AMDGPU_USERQ_QUERY_STATUS_FLAGS_RESET_IN_PROGRESS (1 <<

1)

Quoted 24 lines

/*
* This structure is a container to pass input configuration
* info for all supported userqueue related operations.
* For operation AMDGPU_USERQ_OP_CREATE: user is expected
* to set all fields, excep the parameter 'queue_id'.
- * For operation AMDGPU_USERQ_OP_FREE: the only input parameter expected
- * to be set is 'queue_id', eveything else is ignored.
+ * For operations AMDGPU_USERQ_OP_FREE and AMDGPU_USERQ_OP_QUERY_STATUS:
+ * only 'op' and 'queue_id' should be set; all other fields must be zero. */

 struct drm_amdgpu_userq_in {
      /** AMDGPU_USERQ_OP_* */
      __u32   op;
include/uapi/drm/amdgpu_drm.h +2 -2
-     /** Queue id passed for operation USERQ_OP_FREE */
+     /** Queue id passed for operations USERQ_OP_FREE and
+USERQ_OP_QUERY_STATUS */
      __u32   queue_id;
      /** the target GPU engine to execute workload (AMDGPU_HW_IP_*) */
      __u32   ip_type;
--

2.34.1

#6 lore raw

RE: [PATCH v4 4/4] drm/amdgpu/userq: report GPU reset in progress

AMD General

Hi @Deucher, Alexander

Since @Pelloux-Prayer, Pierre-Eric has already reviewed the userq query libdrm implementation, could you please help review the corresponding kernel patch?

Regards,
Prike

Quoted 134 lines

-----Original Message-----
From: Liang, Prike
Sent: Monday, November 2, 2026 9:02 PM
To: 'Liang, Prike' <[email protected]>; [email protected]; Deucher, Alexander <[email protected]>; Pelloux-Prayer, Pierre-Eric <[email protected]>
Cc: Koenig, Christian <[email protected]>
Subject: RE: [PATCH v4 4/4] drm/amdgpu/userq: report GPU reset in progress

Hi @Deucher, Alexander, @Pelloux-Prayer, Pierre-Eric

Could you please review the following patches, which include the libdrm implementation?

https://gitlab.freedesktop.org/mesa/libdrm/-/merge_requests/487

Regards,
Prike

Quoted 29 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Liang, Prike
Sent: Wednesday, October 21, 2026 5:15 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>; Pelloux-Prayer, Pierre-Eric <Pierre-eric.Pelloux- [email protected]>
Subject: RE: [PATCH v4 4/4] drm/amdgpu/userq: report GPU reset in progress

AMD General

Ping on the series

Regards,
Prike

Quoted 11 lines

-----Original Message-----
From: Liang, Prike <[email protected]>
Sent: Saturday, October 10, 2026 10:50 AM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>; Pelloux-Prayer, Pierre-Eric <Pierre-eric.Pelloux- [email protected]>; Liang, Prike <[email protected]>
Subject: [PATCH v4 4/4] drm/amdgpu/userq: report GPU reset in progress

Quoted 8 lines
Quoted 3 lines

Report an ongoing GPU reset through RESET_IN_PROGRESS at bit 1, alongside BROKEN at bit 0, so userspace can query whether GPU recovery is

ongoing.

Quoted 4 lines

Validate query inputs using the same rules as queue deletion and document the required fields. Drop the queue reference after releasing userq_mutex because the final put may destroy the queue and acquire

that mutex.

Quoted 45 lines
Quoted 45 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 6 +++++-
 include/uapi/drm/amdgpu_drm.h             | 8 +++++---
 2 files changed, 10 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c +5 -1
index 6340e647a67d..6c4743ddf04a 100644
@@ -835,8 +835,11 @@ amdgpu_userq_query_status(struct drm_file
 *filp, union drm_amdgpu_userq *args)
          queue->state == AMDGPU_USERQ_STATE_INVALID_VA ||
          queue->generation != amdgpu_vm_generation(adev, &fpriv->vm))
              args->out_qs.flags |=
 AMDGPU_USERQ_QUERY_STATUS_FLAGS_BROKEN;
-     amdgpu_userq_put(queue);
+     if (amdgpu_in_reset(adev))
+             args->out_qs.flags |=
+AMDGPU_USERQ_QUERY_STATUS_FLAGS_RESET_IN_PROGRESS;
      mutex_unlock(&uq_mgr->userq_mutex);
+     /* The final put may destroy the queue and take userq_mutex. */
+     amdgpu_userq_put(queue);
 
      return 0;
 }
@@ -898,6 +901,7 @@ static int

amdgpu_userq_input_args_validate(struct
drm_device *dev,

              }
              break;
      case AMDGPU_USERQ_OP_FREE:
+     case AMDGPU_USERQ_OP_QUERY_STATUS:
              if (args->in.ip_type ||
                  args->in.doorbell_handle ||
                  args->in.doorbell_offset || diff --git

a/include/uapi/drm/amdgpu_drm.h b/include/uapi/drm/amdgpu_drm.h index
98c3fa8a4a72..32ed4c4349a4 100644

include/uapi/drm/amdgpu_drm.h +0 -0
@@ -355,19 +355,21 @@ union drm_amdgpu_ctx {
 
Quoted 2 lines
Quoted 2 lines
include/uapi/drm/amdgpu_drm.h +0 -0
 /* the queue is broken because it is hung, has an invalid VA, or

VRAM was lost */ #define

AMDGPU_USERQ_QUERY_STATUS_FLAGS_BROKEN (1

Quoted 3 lines

<< 0)

include/uapi/drm/amdgpu_drm.h

Quoted 2 lines
include/uapi/drm/amdgpu_drm.h +2 -0
+/* indicate that a GPU reset has not completed yet */ #define
+AMDGPU_USERQ_QUERY_STATUS_FLAGS_RESET_IN_PROGRESS (1

<<

Quoted 25 lines

1)

Quoted 24 lines

/*
* This structure is a container to pass input configuration
* info for all supported userqueue related operations.
* For operation AMDGPU_USERQ_OP_CREATE: user is expected
* to set all fields, excep the parameter 'queue_id'.
- * For operation AMDGPU_USERQ_OP_FREE: the only input parameter expected
- * to be set is 'queue_id', eveything else is ignored.
+ * For operations AMDGPU_USERQ_OP_FREE and AMDGPU_USERQ_OP_QUERY_STATUS:
+ * only 'op' and 'queue_id' should be set; all other fields must be zero. */

 struct drm_amdgpu_userq_in {
      /** AMDGPU_USERQ_OP_* */
      __u32   op;
include/uapi/drm/amdgpu_drm.h +2 -2
-     /** Queue id passed for operation USERQ_OP_FREE */
+     /** Queue id passed for operations USERQ_OP_FREE and
+USERQ_OP_QUERY_STATUS */
      __u32   queue_id;
      /** the target GPU engine to execute workload (AMDGPU_HW_IP_*) */
      __u32   ip_type;
--

2.34.1