drm/xe: don't WARN on kernel job timeout when device already wedged
authorNitin Gote <nitin.r.gote@intel.com>
Fri, 14 Aug 2026 07:41:07 +0000 (13:11 +0530)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 20 Aug 2026 13:30:03 +0000 (09:30 -0400)
igt@xe_wedged@wedged-at-any-timeout wedges the device in mode 2
(UPON_ANY_HANG_NO_RESET) and then rebinds the driver. During unbind,
a GSC proxy kernel submission can still time out; with the device wedged
and the GuC CT stopped it can never complete, so its kernel job times out.

  Tile0: GT1: Kernel-submitted job timed out
  WARNING: drivers/gpu/drm/xe/xe_guc_submit.c:...
   at guc_exec_queue_timedout_job()
  Workqueue: gt-ordered-wq drm_sched_job_timedout

Killed queues skip guc_submit_hint_wedged(), leaving 'wedged' false even
though the device is already wedged. The timeout handler then treats the
kernel queue timeout as unexpected and taints the kernel.

Honour an already-wedged device even for killed queues so the expected
teardown timeout no longer trips the WARN.

Fixes: 5a2f117a80c2 ("drm/xe: Do not wedge device on killed exec queues")
Cc: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Nitin Gote <nitin.r.gote@intel.com>
Reviewed-by: Tejas Upadhyay <tejas.upadhyay@intel.com>
Link: https://patch.msgid.link/20260814074106.92670-2-nitin.r.gote@intel.com
Signed-off-by: Tejas Upadhyay <tejas.upadhyay@intel.com>
(cherry picked from commit a1c1dbd0f047bb05de6aaf6abe9103031179bf19)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/xe_guc_submit.c

index 8aaed4f..864859b 100644 (file)
@@ -1559,8 +1559,14 @@ guc_exec_queue_timedout_job(struct drm_sched_job *drm_job)
        if (!skip_timeout_check && !check_timeout(q, job))
                goto rearm;
 
+       /*
+        * Killed queues must not newly wedge the device, but preserve an
+        * already-wedged state to avoid warning on teardown timeouts.
+        */
        if (!exec_queue_killed(q))
                wedged = guc_submit_hint_wedged(exec_queue_to_guc(q));
+       else
+               wedged = xe_device_wedged(xe);
 
        set_exec_queue_banned(q);