From: sashiko-bot@kernel.org
To: "Riana Tauro" <riana.tauro@intel.com>, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v2] drm/xe/xe_pci_error: Wait for pcode init post SBR
Date: Wed, 28 Oct 2026 07:40:05 +0000 [thread overview]
Message-ID: <sashiko-outbox-187590@kernel.org> (raw)
In-Reply-To: <20261028072803.937955-2-riana.tauro@intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] drm/xe: xe_wedge_declare() skipped in xe_pci_error_slot_reset()
--
commit d17c5826371a0496850ef94bd4ecf05d8bbcfe46
Author: Riana Tauro <riana.tauro@intel.com>
drm/xe/xe_pci_error: Wait for pcode init post SBR
This patch waits for Pcode initialization to complete after a Secondary Bus
Reset (SBR) in xe_pci_error_slot_reset() and enters runtime survivability
mode if initialization fails.
> diff --git a/drivers/gpu/drm/xe/xe_pci_error.c b/drivers/gpu/drm/xe/xe_pci_error.c
> index 9bf0da3a3d152..0675b5a8f6437 100644
> --- a/drivers/gpu/drm/xe/xe_pci_error.c
> +++ b/drivers/gpu/drm/xe/xe_pci_error.c
[ ... ]
> @@ -112,6 +113,12 @@ static pci_ers_result_t xe_pci_error_slot_reset(struct pci_dev *pdev)
> return PCI_ERS_RESULT_DISCONNECT;
> }
>
> + err = xe_pcode_ready(xe, true);
> + if (err) {
> + xe_survivability_mode_runtime_enable(xe);
> + return PCI_ERS_RESULT_DISCONNECT;
> + }
[Severity: Medium]
Prior to xe_pci_error_slot_reset() running, prepare_device_for_reset() is
called during PCIe error detection to block userspace access while the reset
is in progress:
drivers/gpu/drm/xe/xe_pci_error.c:prepare_device_for_reset() {
...
if (!atomic_xchg(&xe->wedged.flag, 1))
xe_pm_runtime_get_noresume(xe);
...
}
When xe_pcode_ready() fails in xe_pci_error_slot_reset(), the driver has not
yet re-probed the device, so xe_survivability_mode_runtime_enable() is called
on the existing xe_device instance where xe->wedged.flag is still 1:
xe_pci_error_slot_reset()
-> xe_survivability_mode_runtime_enable()
-> xe_wedge_declare(xe, DRM_WEDGE_RECOVERY_VENDOR)
Because xe->wedged.flag is already set, xe_wedge_declare() returns early:
drivers/gpu/drm/xe/xe_wedge.c:xe_wedge_declare() {
...
if (atomic_xchg(&xe->wedged.flag, 1))
return;
xe->needs_flr_on_fini = true;
xe_pm_runtime_get_noresume(xe);
...
if (xe->wedged.mode == XE_WEDGED_MODE_UPON_ANY_HANG_NO_RESET)
xe->wedged.method = DRM_WEDGE_RECOVERY_NONE;
else
xe->wedged.method = method;
schedule_work(&xe->wedged.work);
}
Will this cause xe_wedge_declare() to skip setting xe->wedged.method to
DRM_WEDGE_RECOVERY_VENDOR, skip setting xe->needs_flr_on_fini, and skip
scheduling xe->wedged.work to notify userspace via the DRM wedged uevent?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261028072803.937955-2-riana.tauro@intel.com?part=1
next prev parent reply other threads:[~2026-10-28 7:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-28 7:28 [PATCH v2] drm/xe/xe_pci_error: Wait for pcode init post SBR Riana Tauro
2026-10-28 7:40 ` sashiko-bot [this message]
2026-10-28 8:38 ` ✓ CI.KUnit: success for " Patchwork
2026-10-28 9:32 ` ✓ Xe.CI.BAT: " Patchwork
2026-10-28 16:02 ` ✗ Xe.CI.FULL: failure " 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=sashiko-outbox-187590@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=riana.tauro@intel.com \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.