On Thu, Aug 27, 2026 at 03:47:59PM +0530, Arvind Yadav wrote:
> A scheduler timeout can still run after the device has been declared
> wedged. guc_submit_hint_wedged() only returns true for the no-reset
> debug mode, so other wedge modes can continue into GuC timeout recovery.
> 
> The killed-queue case already preserves an existing wedge. Extend the
> same check to non-killed queues, where guc_submit_hint_wedged() returns
> false outside the no-reset debug mode.
> 
> If the device is already wedged, use the existing wedged cleanup path
> and avoid further hardware recovery. This also avoids the
> kernel-submitted job timeout warning seen after wedge isolation.
> 
> The timeout was observed as:
> [ 8939.200065] xe 0000:03:00.0: [drm] Tile0: GT0: Kernel-submitted job timed 
> out
> [ 8939.200066] WARNING: xe_guc_submit.c:1683 at 
> guc_exec_queue_timedout_job+0x1160/0x2550
> 
> Cc: Matthew Brost <[email protected]>
> Cc: Thomas Hellström <[email protected]>
> Cc: Himal Prasad Ghimiray <[email protected]>
> Cc: Rodrigo Vivi <[email protected]>
> Assisted-by: Claude:claude-opus-4-8
> Signed-off-by: Arvind Yadav <[email protected]>

Reviewed-by: Rodrigo Vivi <[email protected]>

> ---
>  drivers/gpu/drm/xe/xe_guc_submit.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c 
> b/drivers/gpu/drm/xe/xe_guc_submit.c
> index a307af458cf8..287a30027b1c 100644
> --- a/drivers/gpu/drm/xe/xe_guc_submit.c
> +++ b/drivers/gpu/drm/xe/xe_guc_submit.c
> @@ -1594,10 +1594,9 @@ guc_exec_queue_timedout_job(struct drm_sched_job 
> *drm_job)
>        * 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 = xe_device_wedged(xe);
> +     if (!wedged && !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);
>  
> -- 
> 2.43.0
> 

Reply via email to