amd-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [v7 01/11] drm/amdgpu: Add preempt and restore callbacks to userq funcs
@ 2025-08-06  2:24 Jesse.Zhang
  2025-08-06  2:24 ` [v7 02/11] drm/amdgpu: adjust MES API used for suspend and resume Jesse.Zhang
                   ` (9 more replies)
  0 siblings, 10 replies; 16+ messages in thread
From: Jesse.Zhang @ 2025-08-06  2:24 UTC (permalink / raw)
  To: amd-gfx; +Cc: Alexander.Deucher, Christian Koenig, Alex Deucher

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

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.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_userq.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.h
index ec040c2fd6c9..5111d7dce86f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.h
@@ -77,6 +77,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 */
-- 
2.49.0


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

end of thread, other threads:[~2025-08-11  0:33 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-06  2:24 [v7 01/11] drm/amdgpu: Add preempt and restore callbacks to userq funcs Jesse.Zhang
2025-08-06  2:24 ` [v7 02/11] drm/amdgpu: adjust MES API used for suspend and resume Jesse.Zhang
2025-08-06  2:24 ` [v7 03/11] drm/amd/amdgpu: Implement MES suspend/resume gang functionality for v12 Jesse.Zhang
2025-08-08 19:47   ` Alex Deucher
2025-08-11  0:32     ` Zhang, Jesse(Jie)
2025-08-06  2:24 ` [v7 04/11] drm/amdgpu: Add helper functions for user queue preemption and restoration Jesse.Zhang
2025-08-08 19:49   ` Alex Deucher
2025-08-06  2:24 ` [v7 05/11] drm/amdgpu/mes: add front end for detect and reset hung queue Jesse.Zhang
2025-08-06  2:24 ` [v7 06/11] drm/amdgpu/mes11: implement detect and reset callback Jesse.Zhang
2025-08-06  2:24 ` [v7 07/11] drm/amdgpu/mes12: " Jesse.Zhang
2025-08-06  2:24 ` [v7 08/11] drm/amdgpu/userq: add a " Jesse.Zhang
2025-08-08 19:53   ` Alex Deucher
2025-08-06  2:24 ` [v7 09/11] drm/amdgpu: add user queue reset source Jesse.Zhang
2025-08-06  2:24 ` [v7 10/11] drm/amdgpu/userq: add force completion helpers Jesse.Zhang
2025-08-06  2:24 ` [v7 11/11] drm/amdgpu: Implement user queue reset handling and recovery Jesse.Zhang
2025-08-08 19:58   ` Alex Deucher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).