aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.h
diff options
context:
space:
mode:
authorAlex Deucher <[email protected]>2025-04-12 16:59:38 +0000
committerAlex Deucher <[email protected]>2025-04-22 12:51:45 +0000
commite67b95f0cd5e8dd57a9df5d5d15da6ba7847808a (patch)
treefc2508f74b1f3ce0f042195cd4ef877915dee733 /drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.h
parentdrm/amdgpu/userq: optimize enforce isolation and s/r (diff)
downloadkernel-e67b95f0cd5e8dd57a9df5d5d15da6ba7847808a.tar.gz
kernel-e67b95f0cd5e8dd57a9df5d5d15da6ba7847808a.zip
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 <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
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;