summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.h
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2025-04-12 12:59:38 -0400
committerAlex Deucher <alexander.deucher@amd.com>2025-04-22 08:51:45 -0400
commite67b95f0cd5e8dd57a9df5d5d15da6ba7847808a (patch)
treefc2508f74b1f3ce0f042195cd4ef877915dee733 /drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.h
parentba324ffb25999e14b8488d085ae9916d6f4a6bcf (diff)
drm/amdgpu: switch from queue_active to queue state
Track the state of the queue rather than simple active vs not. This is needed for other states (hung, preempted, etc.). While we are at it, move the state tracking into the user queue front end code. Reviewed-by: Prike Liang <Prike.Liang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.h
index b49f147eb69c..8f392a0947a2 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.h
@@ -32,6 +32,13 @@
#define uq_mgr_to_fpriv(u) container_of(u, struct amdgpu_fpriv, userq_mgr)
#define work_to_uq_mgr(w, name) container_of(w, struct amdgpu_userq_mgr, name)
+enum amdgpu_userqueue_state {
+ AMDGPU_USERQ_STATE_UNMAPPED = 0,
+ AMDGPU_USERQ_STATE_MAPPED,
+ AMDGPU_USERQ_STATE_PREEMPTED,
+ AMDGPU_USERQ_STATE_HUNG,
+};
+
struct amdgpu_mqd_prop;
struct amdgpu_userq_obj {
@@ -42,7 +49,7 @@ struct amdgpu_userq_obj {
struct amdgpu_usermode_queue {
int queue_type;
- uint8_t queue_active;
+ enum amdgpu_userqueue_state state;
uint64_t doorbell_handle;
uint64_t doorbell_index;
uint64_t flags;