From: Imre Deak <imre.deak@intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: <intel-gfx@lists.freedesktop.org>,
<intel-xe@lists.freedesktop.org>, <ville.syrjala@linux.intel.com>
Subject: Re: [PATCH 2/4] drm/{i915,xe}: move intel_opregion_suspend() to intel_display_driver_pm_suspend_late()
Date: Wed, 23 Sep 2026 14:20:12 +0300 [thread overview]
Message-ID: <arO17C67JhscLp1j@ideak-desk.lan> (raw)
In-Reply-To: <050b935fa3fd85101ea0241b60a2e7893d3ad546.1790089118.git.jani.nikula@intel.com>
On Tue, Sep 22, 2026 at 06:00:50PM +0300, Jani Nikula wrote:
> Try to unify the suspend paths and behaviour by moving the
> intel_opregion_suspend() calls to
> intel_display_driver_pm_suspend_late().
>
> This is a change in the suspend sequences. The idea behind adding this
> to intel_display_driver_pm_suspend_late() is primarily based on not
> having to pass the s2idle parameter to more functions than that.
Imo the main reason is that it should be called with interrupts
disabled. At least not sure how cancel_work_sync(asle_work) could work
otherwise.
> This also changes behaviour for i915 hibernation, going for PCI_D3cold
> instead of PCI_D1 on hibernate. It's probably the correct thing to do
> anyway, I don't think it should matter all that much, but fingers
> crossed.
I think it is PCI_D3cold for i915 already before this patch, since
acpi_target_system_state() is ACPI_STATE_S4 in that case. If so, the
hibernation param from i915_drm_suspend_late() could be also removed.
But need to check this more to be sure.
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_display_driver.c | 2 ++
> drivers/gpu/drm/i915/i915_driver.c | 4 ----
> drivers/gpu/drm/xe/display/xe_display.c | 3 ---
> 3 files changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c
> index 77009dca7d0d..abab457bce3a 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);
This leaves intel_opregion_resume() called from
intel_display_driver_pm_resume() in an assymetric way, but I suppose
that could be addressed later:
Reviewed-by: Imre Deak <imre.deak@intel.com>
> +
> intel_display_power_suspend_late(display, s2idle);
> }
>
> diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
> index 9e047c27a153..293099fe6639 100644
> --- a/drivers/gpu/drm/i915/i915_driver.c
> +++ b/drivers/gpu/drm/i915/i915_driver.c
> @@ -1075,7 +1075,6 @@ static int i915_drm_suspend(struct drm_device *dev)
> {
> struct drm_i915_private *dev_priv = to_i915(dev);
> struct intel_display *display = dev_priv->display;
> - pci_power_t opregion_target_state;
>
> disable_rpm_wakeref_asserts(&dev_priv->runtime_pm);
>
> @@ -1089,9 +1088,6 @@ static int i915_drm_suspend(struct drm_device *dev)
>
> i9xx_display_sr_save(display);
>
> - opregion_target_state = suspend_to_idle(dev_priv) ? PCI_D1 : PCI_D3cold;
> - intel_opregion_suspend(display, opregion_target_state);
> -
> dev_priv->suspend_count++;
>
> enable_rpm_wakeref_asserts(&dev_priv->runtime_pm);
> diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c
> index 184a5a237880..b013ec00b75d 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);
> }
>
> void xe_display_pm_suspend_late(struct xe_device *xe)
> --
> 2.47.3
>
next prev parent reply other threads:[~2026-09-23 11:20 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
2026-09-23 11:20 ` Imre Deak [this message]
2026-09-23 12:53 ` [PATCH 2/4] drm/{i915,xe}: " 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=arO17C67JhscLp1j@ideak-desk.lan \
--to=imre.deak@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=ville.syrjala@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