Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Aravind Iddamsetty <aravind.iddamsetty@linux.intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>,
	<intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH 0/4] drm/xe: Implement device shutdown to make kexec work.
Date: Fri, 6 Sep 2024 11:53:52 -0400	[thread overview]
Message-ID: <ZtslkOB3kx4klloM@intel.com> (raw)
In-Reply-To: <3cf1bdff-3abe-41b8-9078-c4fc5607f3e7@linux.intel.com>

On Fri, Sep 06, 2024 at 11:52:43AM +0200, Maarten Lankhorst wrote:
>
>
> Den 2024-09-05 kl. 19:34, skrev Jani Nikula:
> > On Thu, 05 Sep 2024, Maarten Lankhorst <maarten.lankhorst@linux.intel.com> wrote:
> >> Testcase:
> >> kexec --reuse-cmdline --initrd=initrd.img -f vmlinuz
> >>
> >> Because we don't shut down xe correctly, we cannot reload xe afterwards.
> >> Implement device shutdown by performing a FLR, then we can load the device
> >> cleanly again afterwards.
> >
> > Maybe a silly question, but what's FLR?
> Function level reset. It resets all the resources on the device, so display, all gt's etc are all turned off.
> It's far faster than resetting each component separately. And it even works if display is the cause off a panic
> since no locks are qrequired.

Just to avoid confusion, I like to call this one as driver-initiated-FLR.
It is a feature introduced back in gen11, I believe, where the driver can use
MMIO to request the reset of many IP blocks including GT, SGUnit, Display, etc.

But it is not the same as the full PCI Function Level Reset as some components
won't get reset nor have the memory wiped out.

The only way to get the PCI FLR is doing echo 1 to device/reset:
echo 1 /sys/class/drm/card1/device/reset

On my scripts when I want a full clean start I have something like this:

echo -n "0000:00:02.0" | sudo tee /sys/bus/pci/drivers/i915/unbind
echo -n 1 | sudo tee /sys/bus/pci/devices/0000\:00\:02.0/reset
echo -n "0000:00:02.0" | sudo tee /sys/bus/pci/drivers/i915/bind

Hopefully on Xe will be able to support the echo 1 > device/reset
without having to unbind and reprobe:

https://lore.kernel.org/intel-xe/20240422065756.294679-1-aravind.iddamsetty@linux.intel.com/

Cc: Aravind Iddamsetty <aravind.iddamsetty@linux.intel.com>

>
> Cheers,
> ~Maarten

  reply	other threads:[~2024-09-06 15:54 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-05 15:00 [PATCH 0/4] drm/xe: Implement device shutdown to make kexec work Maarten Lankhorst
2024-09-05 15:00 ` [PATCH 1/4] drm/xe: Fix missing conversion to xe_display_pm_runtime_resume Maarten Lankhorst
2024-09-05 16:36   ` Lucas De Marchi
2024-09-06  5:18   ` Govindapillai, Vinod
2024-09-05 15:00 ` [PATCH 2/4] drm/xe: Remove runtime argument from display s/r functions Maarten Lankhorst
2024-09-05 16:44   ` Lucas De Marchi
2024-09-06  9:45     ` Govindapillai, Vinod
2024-09-06  9:25   ` Govindapillai, Vinod
2024-09-05 15:00 ` [PATCH 3/4] drm/xe: Wire up device shutdown handler Maarten Lankhorst
2024-09-05 16:52   ` Lucas De Marchi
2024-09-06 13:37     ` Maarten Lankhorst
2024-09-06 15:43       ` Rodrigo Vivi
2024-09-05 15:00 ` [PATCH 4/4] CI-only: Test if FLR is disabled? Maarten Lankhorst
2024-09-05 15:06 ` ✓ CI.Patch_applied: success for drm/xe: Implement device shutdown to make kexec work Patchwork
2024-09-05 15:06 ` ✗ CI.checkpatch: warning " Patchwork
2024-09-05 15:07 ` ✓ CI.KUnit: success " Patchwork
2024-09-05 15:19 ` ✓ CI.Build: " Patchwork
2024-09-05 15:22 ` ✓ CI.Hooks: " Patchwork
2024-09-05 15:23 ` ✓ CI.checksparse: " Patchwork
2024-09-05 15:59 ` ✗ CI.BAT: failure " Patchwork
2024-09-05 17:34 ` [PATCH 0/4] " Jani Nikula
2024-09-06  9:52   ` Maarten Lankhorst
2024-09-06 15:53     ` Rodrigo Vivi [this message]
2024-09-09  5:42       ` Aravind Iddamsetty
2024-09-07 16:26 ` ✗ CI.FULL: failure for " Patchwork

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=ZtslkOB3kx4klloM@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=aravind.iddamsetty@linux.intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=maarten.lankhorst@linux.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