Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: "Jouni Högander" <jouni.hogander@intel.com>,
	intel-xe@lists.freedesktop.org
Subject: Re: [PATCH] drm/xe: Do clean shutdown also when using flr
Date: Mon, 3 Nov 2025 12:12:53 +0100	[thread overview]
Message-ID: <a506ffa0-f42c-4359-983a-196aef531e38@linux.intel.com> (raw)
In-Reply-To: <20251031122312.1836534-1-jouni.hogander@intel.com>

Hey,

Yeah, initially it was ok to just do a FLR since it gave no issues compared to cleaning up nicely,
and allowed us to shutdown even if it was the driver that crashed. I guess it's better to shut down
cleanly before doing a FLR instead now that bugs were found.

Reviewed-by: Maarten Lankhorst <dev@lankhorst.se>

Den 2025-10-31 kl. 13:23, skrev Jouni Högander:
> Currently Xe driver is triggering flr without any clean-up on
> shutdown. This is causing random warnings from pending related works as the
> underlying hardware is reset in the middle of their execution.
> 
> Fix this by performing clean shutdown also when using flr.
> 
> Fixes: 501d799a47e2 ("drm/xe: Wire up device shutdown handler")
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
> ---
>  drivers/gpu/drm/xe/xe_device.c | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
> index 86d5960476af6..6156be15affba 100644
> --- a/drivers/gpu/drm/xe/xe_device.c
> +++ b/drivers/gpu/drm/xe/xe_device.c
> @@ -988,21 +988,21 @@ void xe_device_remove(struct xe_device *xe)
>  
>  void xe_device_shutdown(struct xe_device *xe)
>  {
> +	struct xe_gt *gt;
> +	u8 id;
> +
>  	drm_dbg(&xe->drm, "Shutting down device\n");
>  
> -	if (xe_driver_flr_disabled(xe)) {
> -		struct xe_gt *gt;
> -		u8 id;
> +	xe_display_pm_shutdown(xe);
>  
> -		xe_display_pm_shutdown(xe);
> +	xe_irq_suspend(xe);
>  
> -		xe_irq_suspend(xe);
> +	for_each_gt(gt, xe, id)
> +		xe_gt_shutdown(gt);
>  
> -		for_each_gt(gt, xe, id)
> -			xe_gt_shutdown(gt);
> +	xe_display_pm_shutdown_late(xe);
>  
> -		xe_display_pm_shutdown_late(xe);
> -	} else {
> +	if (!xe_driver_flr_disabled(xe)) {
>  		/* BOOM! */
>  		__xe_driver_flr(xe);
>  	}


      parent reply	other threads:[~2025-11-03 11:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-31 12:23 [PATCH] drm/xe: Do clean shutdown also when using flr Jouni Högander
2025-10-31 14:00 ` ✓ CI.KUnit: success for " Patchwork
2025-10-31 14:37 ` ✓ Xe.CI.BAT: " Patchwork
2025-11-01  1:55 ` ✗ Xe.CI.Full: failure " Patchwork
2025-11-03 11:12 ` Maarten Lankhorst [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a506ffa0-f42c-4359-983a-196aef531e38@linux.intel.com \
    --to=maarten.lankhorst@linux.intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jouni.hogander@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox