From: sashiko-bot@kernel.org
To: "Jani Nikula" <jani.nikula@intel.com>
Cc: intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/4] drm/{i915, xe}: move intel_opregion_suspend() to intel_display_driver_pm_suspend_late()
Date: Tue, 22 Sep 2026 15:16:34 +0000 [thread overview]
Message-ID: <20260922151635.5013C1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <050b935fa3fd85101ea0241b60a2e7893d3ad546.1790089118.git.jani.nikula@intel.com>
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [High] drm/i915: Use-after-suspend of asle_work due to late intel_opregion_suspend()
- [High] drm/i915: Hard system hang risk from late ACPI SMI notification
- [High] drm/xe: ACPI state corruption via double intel_opregion_suspend()
--
commit fc3c0277d6ab46a7da2ef12128f2682dd8013140
Author: Jani Nikula <jani.nikula@intel.com>
drm/{i915, xe}: move intel_opregion_suspend() to intel_display_driver_pm_suspend_late()
Try to unify the suspend paths and behaviour by moving the
intel_opregion_suspend() calls to
intel_display_driver_pm_suspend_late().
> diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c
> index 77009dca7d0d9..abab457bce3a3 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_driver.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_driver.c
> @@ -783,6 +783,8 @@ void intel_display_driver_pm_suspend_late(struct intel_display *display, bool s2
> if (!HAS_DISPLAY(display))
> return;
>
> + intel_opregion_suspend(display, s2idle ? PCI_D1 : PCI_D3cold);
> +
> intel_display_power_suspend_late(display, s2idle);
> }
[Severity: High]
Does moving intel_opregion_suspend() here cause it to execute too late in the
suspend sequence?
In i915_drm_suspend_late(), the GTs and uncore are suspended before calling
intel_display_driver_pm_suspend_late():
drivers/gpu/drm/i915/i915_driver.c:i915_drm_suspend_late() {
...
for_each_gt(gt, dev_priv, i)
intel_uncore_suspend(gt->uncore);
intel_display_driver_pm_suspend_late(display, s2idle);
...
}
Because intel_opregion_suspend() calls cancel_work_sync(&opregion->asle_work),
delaying this sync until after intel_uncore_suspend() could allow asle_work
to execute concurrently with or after uncore suspension, risking MMIO accesses
on suspended hardware.
Additionally, could triggering a System Management Interrupt (SMI) via
intel_opregion_notify_adapter() while the GT/uncore is already suspended cause
the BIOS to access powered-down GPU registers and result in a hard system hang?
[ ... ]
> diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c
> index 184a5a2378805..b013ec00b75da 100644
> --- a/drivers/gpu/drm/xe/display/xe_display.c
> +++ b/drivers/gpu/drm/xe/display/xe_display.c
> @@ -246,14 +246,11 @@ static bool suspend_to_idle(void)
> void xe_display_pm_suspend(struct xe_device *xe)
> {
> struct intel_display *display = xe->display;
> - bool s2idle = suspend_to_idle();
>
> if (!xe->info.probe_display)
> return;
>
> intel_display_driver_pm_suspend(display);
> -
> - intel_opregion_suspend(display, s2idle ? PCI_D1 : PCI_D3cold);
> }
[Severity: High]
Will this lead to a double intel_opregion_suspend() and ACPI state corruption
during runtime suspend?
When xe->d3cold.allowed is true, xe_display_pm_runtime_suspend() calls
xe_display_enable_d3cold() which explicitly suspends the OpRegion to PCI_D3cold:
drivers/gpu/drm/xe/display/xe_display.c:xe_display_enable_d3cold() {
...
intel_opregion_suspend(display, PCI_D3cold);
...
}
Then xe_display_pm_runtime_suspend_late() calls xe_display_pm_suspend_late():
drivers/gpu/drm/xe/display/xe_display.c:xe_display_pm_runtime_suspend_late() {
...
if (xe->d3cold.allowed) {
xe_display_pm_suspend_late(xe);
...
}
Since xe_display_pm_suspend_late() calls intel_display_driver_pm_suspend_late(),
which now includes the new intel_opregion_suspend() call, it will be executed a
second time. Because suspend_to_idle() evaluates to true during runtime suspend
(S0), it will be called with PCI_D1 instead of PCI_D3cold.
Will this overwrite the ACPI power state from PCI_D3cold to PCI_D1 and corrupt
the BIOS state?
--
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1790089118.git.jani.nikula@intel.com?part=2
next prev parent reply other threads:[~2026-09-22 15:16 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-22 15:00 [PATCH 0/4] drm/{i915,xe}: some suspend/shutdown/resume unification Jani Nikula
2026-09-22 15:00 ` [PATCH 1/4] drm/{i915, xe}: make intel_dmc_suspend() part of display suspend/shutdown calls Jani Nikula
2026-09-23 10:37 ` [PATCH 1/4] drm/{i915,xe}: " Imre Deak
2026-09-22 15:00 ` [PATCH 2/4] drm/{i915, xe}: move intel_opregion_suspend() to intel_display_driver_pm_suspend_late() Jani Nikula
2026-09-22 15:16 ` sashiko-bot [this message]
2026-09-23 11:20 ` [PATCH 2/4] drm/{i915,xe}: " Imre Deak
2026-09-23 12:53 ` Jani Nikula
2026-09-22 15:00 ` [PATCH 3/4] drm/{i915, xe}: add/move intel_opregion_suspend() to intel_display_driver_shutdown() Jani Nikula
2026-09-23 11:23 ` [PATCH 3/4] drm/{i915,xe}: " Imre Deak
2026-09-23 12:54 ` [PATCH v2] drm/{i915, xe}: add/move intel_opregion_suspend() to intel_display_driver_shutdown_late() Jani Nikula
2026-09-23 13:41 ` [PATCH v2] drm/{i915,xe}: " Imre Deak
2026-09-22 15:00 ` [PATCH 4/4] drm/{i915, xe}: keep moving stuff to intel_display_driver_pm_resume() Jani Nikula
2026-09-22 21:29 ` ✓ i915.CI.BAT: success for drm/{i915,xe}: some suspend/shutdown/resume unification Patchwork
2026-09-23 8:18 ` ✗ i915.CI.Full: failure " Patchwork
2026-09-23 21:46 ` ✓ i915.CI.BAT: success for drm/{i915,xe}: some suspend/shutdown/resume unification (rev2) Patchwork
2026-09-24 20:04 ` ✗ i915.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=20260922151635.5013C1F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox