aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.h
diff options
context:
space:
mode:
authorJesse.Zhang <Jesse.Zhang@amd.com>2025-08-05 11:26:15 +0800
committerAlex Deucher <alexander.deucher@amd.com>2025-09-05 17:37:50 -0400
commit2318336573c51748bd2089a835242c70be6850cf (patch)
tree01513c0ebc58c3594c947af0e5cdd3f9544979bd /drivers/gpu/drm/amd/amdgpu/amdgpu_userq.h
parentdrm/amdgpu: fix the formating for debugfs print (diff)
downloadlinux-2318336573c51748bd2089a835242c70be6850cf.tar.gz
linux-2318336573c51748bd2089a835242c70be6850cf.zip
drm/amdgpu: Add preempt and restore callbacks to userq funcs
Add two new function pointers to struct amdgpu_userq_funcs: - preempt: To handle preemption of user mode queues - restore: To restore preempted user mode queues These callbacks will allow the driver to properly manage queue preemption and restoration when needed, such as during context switching or priority changes. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_userq.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_userq.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.h
index b1ca91b7cda4..017efd2075df 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.h
@@ -78,6 +78,10 @@ struct amdgpu_userq_funcs {
struct amdgpu_usermode_queue *queue);
int (*map)(struct amdgpu_userq_mgr *uq_mgr,
struct amdgpu_usermode_queue *queue);
+ int (*preempt)(struct amdgpu_userq_mgr *uq_mgr,
+ struct amdgpu_usermode_queue *queue);
+ int (*restore)(struct amdgpu_userq_mgr *uq_mgr,
+ struct amdgpu_usermode_queue *queue);
};
/* Usermode queues for gfx */