* [CI] drm/{i915, xe}: move intel_opregion_suspend() to intel_display_driver_pm_suspend_late()
@ 2026-10-08 11:47 Jani Nikula
2026-10-08 12:12 ` Ville Syrjälä
2026-10-08 14:32 ` ✓ i915.CI.BAT: success for " Patchwork
0 siblings, 2 replies; 5+ messages in thread
From: Jani Nikula @ 2026-10-08 11:47 UTC (permalink / raw)
To: intel-gfx, intel-xe; +Cc: jani.nikula, Imre Deak
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.
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.
Reviewed-by: Imre Deak <imre.deak@intel.com>
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);
+
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 aab416485e3e..7d19f3c42e0e 100644
--- a/drivers/gpu/drm/xe/display/xe_display.c
+++ b/drivers/gpu/drm/xe/display/xe_display.c
@@ -238,14 +238,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
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [CI] drm/{i915, xe}: move intel_opregion_suspend() to intel_display_driver_pm_suspend_late() 2026-10-08 11:47 [CI] drm/{i915, xe}: move intel_opregion_suspend() to intel_display_driver_pm_suspend_late() Jani Nikula @ 2026-10-08 12:12 ` Ville Syrjälä 2026-10-08 14:00 ` Jani Nikula 2026-10-08 14:32 ` ✓ i915.CI.BAT: success for " Patchwork 1 sibling, 1 reply; 5+ messages in thread From: Ville Syrjälä @ 2026-10-08 12:12 UTC (permalink / raw) To: Jani Nikula; +Cc: intel-gfx, intel-xe, Imre Deak On Thu, Oct 08, 2026 at 02:47:35PM +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. > > This also changes behaviour for i915 hibernation, going for PCI_D3cold > instead of PCI_D1 on hibernate. Pretty sure I pointed out before that this isn't true. PCI_D3cold is what the current code also does. I suppose it *might* be the case if one does something like 'echo reboot > /sys/power/disk', but I've not actually checked what that sort of thing does to acpi_target_system_state()... > It's probably the correct thing to do > anyway, I don't think it should matter all that much, but fingers > crossed. > > Reviewed-by: Imre Deak <imre.deak@intel.com> > 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); > + > 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 aab416485e3e..7d19f3c42e0e 100644 > --- a/drivers/gpu/drm/xe/display/xe_display.c > +++ b/drivers/gpu/drm/xe/display/xe_display.c > @@ -238,14 +238,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 -- Ville Syrjälä Intel ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [CI] drm/{i915, xe}: move intel_opregion_suspend() to intel_display_driver_pm_suspend_late() 2026-10-08 12:12 ` Ville Syrjälä @ 2026-10-08 14:00 ` Jani Nikula 2026-10-08 23:03 ` Ville Syrjälä 0 siblings, 1 reply; 5+ messages in thread From: Jani Nikula @ 2026-10-08 14:00 UTC (permalink / raw) To: Ville Syrjälä; +Cc: intel-gfx, intel-xe, Imre Deak On Thu, 08 Oct 2026, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote: > On Thu, Oct 08, 2026 at 02:47:35PM +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. >> >> This also changes behaviour for i915 hibernation, going for PCI_D3cold >> instead of PCI_D1 on hibernate. > > Pretty sure I pointed out before that this isn't true. PCI_D3cold is > what the current code also does. Right, you did, but I failed to address it. Sorry. I have tried to track down what acpi_target_system_state() actually returns during .freeze_late and .poweroff_late struct dev_pm_ops calls, and it's far from obvious. I don't think you can reliably say acpi_target_system_state() == ACPI_STATE_S4 on the paths that pass hibernation=true. Are we good to go with the patch or do you want some changes? BR, Jani. > > I suppose it *might* be the case if one does something like > 'echo reboot > /sys/power/disk', but I've not actually checked > what that sort of thing does to acpi_target_system_state()... > >> It's probably the correct thing to do >> anyway, I don't think it should matter all that much, but fingers >> crossed. >> >> Reviewed-by: Imre Deak <imre.deak@intel.com> >> 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); >> + >> 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 aab416485e3e..7d19f3c42e0e 100644 >> --- a/drivers/gpu/drm/xe/display/xe_display.c >> +++ b/drivers/gpu/drm/xe/display/xe_display.c >> @@ -238,14 +238,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 -- Jani Nikula, Intel ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [CI] drm/{i915, xe}: move intel_opregion_suspend() to intel_display_driver_pm_suspend_late() 2026-10-08 14:00 ` Jani Nikula @ 2026-10-08 23:03 ` Ville Syrjälä 0 siblings, 0 replies; 5+ messages in thread From: Ville Syrjälä @ 2026-10-08 23:03 UTC (permalink / raw) To: Jani Nikula; +Cc: intel-gfx, intel-xe, Imre Deak On Thu, Oct 08, 2026 at 05:00:04PM +0300, Jani Nikula wrote: > On Thu, 08 Oct 2026, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote: > > On Thu, Oct 08, 2026 at 02:47:35PM +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. > >> > >> This also changes behaviour for i915 hibernation, going for PCI_D3cold > >> instead of PCI_D1 on hibernate. > > > > Pretty sure I pointed out before that this isn't true. PCI_D3cold is > > what the current code also does. > > Right, you did, but I failed to address it. Sorry. > > I have tried to track down what acpi_target_system_state() actually > returns during .freeze_late and .poweroff_late struct dev_pm_ops calls, > and it's far from obvious. > > I don't think you can reliably say acpi_target_system_state() == > ACPI_STATE_S4 on the paths that pass hibernation=true. After staring at it a bit I think what I said is correct. hibernation_snapshot() calls acpi_hibernation_begin() (assuming /sys/power/disk==platform) prior to dpm_suspend(PMSG_FREEZE), and hibernation_platform_enter() calls it again prior to dpm_suspend_start(PMSG_HIBERNATE). Also verified on an actual system, and both .freeze() and .poweroff() see PCI_D3cold. Looks like the thing that does change a bit is whether opregion suspend happens at all during error handling and some pm_test modes, because the _late() hooks may be skipped for those. > > Are we good to go with the patch or do you want some changes? > > > BR, > Jani. > > > > > > I suppose it *might* be the case if one does something like > > 'echo reboot > /sys/power/disk', but I've not actually checked > > what that sort of thing does to acpi_target_system_state()... > > > >> It's probably the correct thing to do > >> anyway, I don't think it should matter all that much, but fingers > >> crossed. > >> > >> Reviewed-by: Imre Deak <imre.deak@intel.com> > >> 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); > >> + > >> 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 aab416485e3e..7d19f3c42e0e 100644 > >> --- a/drivers/gpu/drm/xe/display/xe_display.c > >> +++ b/drivers/gpu/drm/xe/display/xe_display.c > >> @@ -238,14 +238,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 > > -- > Jani Nikula, Intel -- Ville Syrjälä Intel ^ permalink raw reply [flat|nested] 5+ messages in thread
* ✓ i915.CI.BAT: success for drm/{i915, xe}: move intel_opregion_suspend() to intel_display_driver_pm_suspend_late() 2026-10-08 11:47 [CI] drm/{i915, xe}: move intel_opregion_suspend() to intel_display_driver_pm_suspend_late() Jani Nikula 2026-10-08 12:12 ` Ville Syrjälä @ 2026-10-08 14:32 ` Patchwork 1 sibling, 0 replies; 5+ messages in thread From: Patchwork @ 2026-10-08 14:32 UTC (permalink / raw) To: Jani Nikula; +Cc: intel-gfx [-- Attachment #1: Type: text/plain, Size: 2057 bytes --] == Series Details == Series: drm/{i915, xe}: move intel_opregion_suspend() to intel_display_driver_pm_suspend_late() URL : https://patchwork.freedesktop.org/series/175764/ State : success == Summary == CI Bug Log - changes from CI_DRM_19298 -> Patchwork_175764v1 ==================================================== Summary ------- **SUCCESS** No regressions found. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_175764v1/index.html Participating hosts (39 -> 38) ------------------------------ Missing (1): bat-dg2-13 Known issues ------------ Here are the changes found in Patchwork_175764v1 that come from known issues: ### IGT changes ### #### Issues hit #### * igt@i915_selftest@live@late_gt_pm: - fi-cfl-8109u: [PASS][1] -> [DMESG-WARN][2] ([i915#13735]) +80 other tests dmesg-warn [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19298/fi-cfl-8109u/igt@i915_selftest@live@late_gt_pm.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_175764v1/fi-cfl-8109u/igt@i915_selftest@live@late_gt_pm.html * igt@kms_pipe_crc_basic@read-crc: - fi-cfl-8109u: [PASS][3] -> [DMESG-WARN][4] ([i915#13735] / [i915#15673]) +49 other tests dmesg-warn [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_19298/fi-cfl-8109u/igt@kms_pipe_crc_basic@read-crc.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_175764v1/fi-cfl-8109u/igt@kms_pipe_crc_basic@read-crc.html [i915#13735]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13735 [i915#15673]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/15673 Build changes ------------- * Linux: CI_DRM_19298 -> Patchwork_175764v1 CI-20190529: 20190529 CI_DRM_19298: 95bc52ddf34f72a3996b1f32e946304d3823be3c @ git://anongit.freedesktop.org/gfx-ci/linux IGT_9135: 9135 Patchwork_175764v1: 95bc52ddf34f72a3996b1f32e946304d3823be3c @ git://anongit.freedesktop.org/gfx-ci/linux == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_175764v1/index.html [-- Attachment #2: Type: text/html, Size: 2753 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-10-08 23:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-08 11:47 [CI] drm/{i915, xe}: move intel_opregion_suspend() to intel_display_driver_pm_suspend_late() Jani Nikula
2026-10-08 12:12 ` Ville Syrjälä
2026-10-08 14:00 ` Jani Nikula
2026-10-08 23:03 ` Ville Syrjälä
2026-10-08 14:32 ` ✓ i915.CI.BAT: success for " Patchwork
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox