[PATCH v2 02/12] drm/xe/guc_submit: Make suspend_wait interruptible
Francois Dugast
francois.dugast at intel.com
Wed Jul 24 19:32:55 UTC 2024
Use wait_event_interruptible() instead of wait_event() to put the process
in sleep with TASK_INTERRUPTIBLE. It allows using this function in
interruptible context.
Signed-off-by: Francois Dugast <francois.dugast at intel.com>
---
drivers/gpu/drm/xe/xe_guc_submit.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c
index 8d7e7f4bbff7..d5c272a48e64 100644
--- a/drivers/gpu/drm/xe/xe_guc_submit.c
+++ b/drivers/gpu/drm/xe/xe_guc_submit.c
@@ -1575,9 +1575,14 @@ static int guc_exec_queue_suspend(struct xe_exec_queue *q)
static void guc_exec_queue_suspend_wait(struct xe_exec_queue *q)
{
struct xe_guc *guc = exec_queue_to_guc(q);
+ struct xe_device *xe = guc_to_xe(guc);
+ int ret;
+
+ ret = wait_event_interruptible(q->guc->suspend_wait, !q->guc->suspend_pending ||
+ guc_read_stopped(guc));
- wait_event(q->guc->suspend_wait, !q->guc->suspend_pending ||
- guc_read_stopped(guc));
+ if (!ret)
+ drm_warn(&xe->drm, "Exec queue suspend failed to respond");
}
static void guc_exec_queue_resume(struct xe_exec_queue *q)
--
2.43.0
More information about the Intel-xe
mailing list