Skip to content

Commit 5459e16

Browse files
mbrost05lucasdemarchi
authored andcommitted
drm/xe: Do not wedge device on killed exec queues
When a user closes an exec queue or interrupts an app with Ctrl-C, this does not warrant wedging the device in mode 2. Avoid this by skipping the wedge check for killed exec queues in the TDR and LR exec queue cleanup worker. Signed-off-by: Matthew Brost <[email protected]> Reviewed-by: Rodrigo Vivi <[email protected]> Link: https://lore.kernel.org/r/[email protected] (cherry picked from commit 5a2f117) Signed-off-by: Lucas De Marchi <[email protected]>
1 parent d008fc6 commit 5459e16

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

drivers/gpu/drm/xe/xe_guc_submit.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -891,12 +891,13 @@ static void xe_guc_exec_queue_lr_cleanup(struct work_struct *w)
891891
struct xe_exec_queue *q = ge->q;
892892
struct xe_guc *guc = exec_queue_to_guc(q);
893893
struct xe_gpu_scheduler *sched = &ge->sched;
894-
bool wedged;
894+
bool wedged = false;
895895

896896
xe_gt_assert(guc_to_gt(guc), xe_exec_queue_is_lr(q));
897897
trace_xe_exec_queue_lr_cleanup(q);
898898

899-
wedged = guc_submit_hint_wedged(exec_queue_to_guc(q));
899+
if (!exec_queue_killed(q))
900+
wedged = guc_submit_hint_wedged(exec_queue_to_guc(q));
900901

901902
/* Kill the run_job / process_msg entry points */
902903
xe_sched_submission_stop(sched);
@@ -1070,7 +1071,7 @@ guc_exec_queue_timedout_job(struct drm_sched_job *drm_job)
10701071
int err = -ETIME;
10711072
pid_t pid = -1;
10721073
int i = 0;
1073-
bool wedged, skip_timeout_check;
1074+
bool wedged = false, skip_timeout_check;
10741075

10751076
/*
10761077
* TDR has fired before free job worker. Common if exec queue
@@ -1116,7 +1117,8 @@ guc_exec_queue_timedout_job(struct drm_sched_job *drm_job)
11161117
* doesn't work for SRIOV. For now assuming timeouts in wedged mode are
11171118
* genuine timeouts.
11181119
*/
1119-
wedged = guc_submit_hint_wedged(exec_queue_to_guc(q));
1120+
if (!exec_queue_killed(q))
1121+
wedged = guc_submit_hint_wedged(exec_queue_to_guc(q));
11201122

11211123
/* Engine state now stable, disable scheduling to check timestamp */
11221124
if (!wedged && exec_queue_registered(q)) {

0 commit comments

Comments
 (0)