* [PATCH v2 1/8] drm/i915: call intel_uncore_runtime_resume() for each gt
2026-06-24 14:36 [PATCH v2 0/8] drm/{i915,xe}: unify runtime pm calls Jani Nikula
@ 2026-06-24 14:36 ` Jani Nikula
2026-06-24 14:36 ` [PATCH v2 2/8] drm/i915: call intel_display_power_runtime_resume() on suspend error path Jani Nikula
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Jani Nikula @ 2026-06-24 14:36 UTC (permalink / raw)
To: intel-gfx, intel-xe; +Cc: jani.nikula, rodrigo.vivi, ville.syrjala
All uncore suspend/resume calls are done on each gt. Follow suit in
vlv_suspend_complete() error path purely for completeness, even if
VLV/CHV only have one.
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/i915_driver.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
index 43f747c3c31f..f6c7270300c9 100644
--- a/drivers/gpu/drm/i915/i915_driver.c
+++ b/drivers/gpu/drm/i915/i915_driver.c
@@ -1545,7 +1545,9 @@ static int i915_pm_runtime_suspend(struct device *kdev)
if (ret) {
drm_err(&dev_priv->drm,
"Runtime suspend failed, disabling it (%d)\n", ret);
- intel_uncore_runtime_resume(&dev_priv->uncore);
+
+ for_each_gt(gt, dev_priv, i)
+ intel_uncore_runtime_resume(gt->uncore);
intel_irq_resume(dev_priv);
--
2.47.3
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH v2 2/8] drm/i915: call intel_display_power_runtime_resume() on suspend error path
2026-06-24 14:36 [PATCH v2 0/8] drm/{i915,xe}: unify runtime pm calls Jani Nikula
2026-06-24 14:36 ` [PATCH v2 1/8] drm/i915: call intel_uncore_runtime_resume() for each gt Jani Nikula
@ 2026-06-24 14:36 ` Jani Nikula
2026-06-24 14:36 ` [PATCH v2 3/8] drm/i915: move some display runtime suspend operations earlier Jani Nikula
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Jani Nikula @ 2026-06-24 14:36 UTC (permalink / raw)
To: intel-gfx, intel-xe; +Cc: jani.nikula, rodrigo.vivi, ville.syrjala
The vlv_suspend_complete() error path fails to call
intel_display_power_runtime_resume(). Fix it.
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/i915_driver.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
index f6c7270300c9..51b8bd751376 100644
--- a/drivers/gpu/drm/i915/i915_driver.c
+++ b/drivers/gpu/drm/i915/i915_driver.c
@@ -1546,6 +1546,8 @@ static int i915_pm_runtime_suspend(struct device *kdev)
drm_err(&dev_priv->drm,
"Runtime suspend failed, disabling it (%d)\n", ret);
+ intel_display_power_runtime_resume(display);
+
for_each_gt(gt, dev_priv, i)
intel_uncore_runtime_resume(gt->uncore);
--
2.47.3
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH v2 3/8] drm/i915: move some display runtime suspend operations earlier
2026-06-24 14:36 [PATCH v2 0/8] drm/{i915,xe}: unify runtime pm calls Jani Nikula
2026-06-24 14:36 ` [PATCH v2 1/8] drm/i915: call intel_uncore_runtime_resume() for each gt Jani Nikula
2026-06-24 14:36 ` [PATCH v2 2/8] drm/i915: call intel_display_power_runtime_resume() on suspend error path Jani Nikula
@ 2026-06-24 14:36 ` Jani Nikula
2026-06-24 14:36 ` [PATCH v2 4/8] drm/i915: add intel_display_driver_pm_runtime*() functions Jani Nikula
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Jani Nikula @ 2026-06-24 14:36 UTC (permalink / raw)
To: intel-gfx, intel-xe; +Cc: jani.nikula, rodrigo.vivi, ville.syrjala
In preparation for abstracting display runtime suspend/resume calls,
relocate opregion adapter notification and hotplug poll enable slightly
earlier. Even though this is intended to be a non-functional change, do
it as a separate step to pinpoint any issues here.
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/i915_driver.c | 54 ++++++++++++++++--------------
1 file changed, 28 insertions(+), 26 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
index 51b8bd751376..73616cb6ce7c 100644
--- a/drivers/gpu/drm/i915/i915_driver.c
+++ b/drivers/gpu/drm/i915/i915_driver.c
@@ -1541,11 +1541,39 @@ static int i915_pm_runtime_suspend(struct device *kdev)
intel_display_power_runtime_suspend(display);
+ /*
+ * FIXME: We really should find a document that references the arguments
+ * used below!
+ */
+ if (IS_BROADWELL(dev_priv)) {
+ /*
+ * On Broadwell, if we use PCI_D1 the PCH DDI ports will stop
+ * being detected, and the call we do at i915_pm_runtime_resume()
+ * won't be able to restore them. Since PCI_D3hot matches the
+ * actual specification and appears to be working, use it.
+ */
+ intel_opregion_notify_adapter(display, PCI_D3hot);
+ } else {
+ /*
+ * current versions of firmware which depend on this opregion
+ * notification have repurposed the D1 definition to mean
+ * "runtime suspended" vs. what you would normally expect (D3)
+ * to distinguish it from notifications that might be sent via
+ * the suspend path.
+ */
+ intel_opregion_notify_adapter(display, PCI_D1);
+ }
+
+ if (!IS_VALLEYVIEW(dev_priv) && !IS_CHERRYVIEW(dev_priv))
+ intel_hpd_poll_enable(display);
+
ret = vlv_suspend_complete(dev_priv);
if (ret) {
drm_err(&dev_priv->drm,
"Runtime suspend failed, disabling it (%d)\n", ret);
+ intel_opregion_notify_adapter(display, PCI_D0);
+
intel_display_power_runtime_resume(display);
for_each_gt(gt, dev_priv, i)
@@ -1577,34 +1605,8 @@ static int i915_pm_runtime_suspend(struct device *kdev)
if (root_pdev)
pci_d3cold_disable(root_pdev);
- /*
- * FIXME: We really should find a document that references the arguments
- * used below!
- */
- if (IS_BROADWELL(dev_priv)) {
- /*
- * On Broadwell, if we use PCI_D1 the PCH DDI ports will stop
- * being detected, and the call we do at i915_pm_runtime_resume()
- * won't be able to restore them. Since PCI_D3hot matches the
- * actual specification and appears to be working, use it.
- */
- intel_opregion_notify_adapter(display, PCI_D3hot);
- } else {
- /*
- * current versions of firmware which depend on this opregion
- * notification have repurposed the D1 definition to mean
- * "runtime suspended" vs. what you would normally expect (D3)
- * to distinguish it from notifications that might be sent via
- * the suspend path.
- */
- intel_opregion_notify_adapter(display, PCI_D1);
- }
-
assert_forcewakes_inactive(&dev_priv->uncore);
- if (!IS_VALLEYVIEW(dev_priv) && !IS_CHERRYVIEW(dev_priv))
- intel_hpd_poll_enable(display);
-
drm_dbg(&dev_priv->drm, "Device suspended\n");
return 0;
}
--
2.47.3
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH v2 4/8] drm/i915: add intel_display_driver_pm_runtime*() functions
2026-06-24 14:36 [PATCH v2 0/8] drm/{i915,xe}: unify runtime pm calls Jani Nikula
` (2 preceding siblings ...)
2026-06-24 14:36 ` [PATCH v2 3/8] drm/i915: move some display runtime suspend operations earlier Jani Nikula
@ 2026-06-24 14:36 ` Jani Nikula
2026-06-24 14:36 ` [PATCH v2 5/8] drm/{i915, xe}: add new intel_display_driver_runtime_pm_{enable, disable}() Jani Nikula
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Jani Nikula @ 2026-06-24 14:36 UTC (permalink / raw)
To: intel-gfx, intel-xe; +Cc: jani.nikula, rodrigo.vivi, ville.syrjala
Add new functions intel_display_driver_pm_runtime_suspend(),
intel_display_driver_pm_runtime_suspend_late(),
intel_display_driver_pm_runtime_resume_early(), and
intel_display_driver_pm_runtime_resume(). The IRQ suspend/resume is
meant to happen between the corresponding calls. For now,
intel_display_driver_pm_runtime_suspend() is empty, but is included for
completeness as a placeholder.
Initially, only migrate i915, as there are some differences with xe that
will be addressed later.
There's a functional change, which should be benign:
i915_pm_runtime_resume() moves intel_opregion_notify_adapter() call
slightly later.
In the interest of not introducing more severe functional changes, the
calls become slightly asymmetric. We might want to address this later.
v2:
- Rebase, move placement of suspend calls
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
.../drm/i915/display/intel_display_driver.c | 61 +++++++++++++++++++
.../drm/i915/display/intel_display_driver.h | 5 ++
drivers/gpu/drm/i915/i915_driver.c | 52 +++-------------
3 files changed, 74 insertions(+), 44 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c
index 462f78d5b020..0ea8a848a8e6 100644
--- a/drivers/gpu/drm/i915/display/intel_display_driver.c
+++ b/drivers/gpu/drm/i915/display/intel_display_driver.c
@@ -868,3 +868,64 @@ void intel_display_driver_pm_resume(struct intel_display *display)
intel_display_power_enable(display);
}
+
+/* before irq suspend */
+void intel_display_driver_pm_runtime_suspend(struct intel_display *display)
+{
+}
+
+/* after irq suspend */
+void intel_display_driver_pm_runtime_suspend_late(struct intel_display *display)
+{
+ intel_display_power_runtime_suspend(display);
+
+ /*
+ * FIXME: We really should find a document that references the arguments
+ * used below!
+ */
+ if (display->platform.broadwell) {
+ /*
+ * On Broadwell, if we use PCI_D1 the PCH DDI ports will stop
+ * being detected, and the call we do at i915_pm_runtime_resume()
+ * won't be able to restore them. Since PCI_D3hot matches the
+ * actual specification and appears to be working, use it.
+ */
+ intel_opregion_notify_adapter(display, PCI_D3hot);
+ } else {
+ /*
+ * current versions of firmware which depend on this opregion
+ * notification have repurposed the D1 definition to mean
+ * "runtime suspended" vs. what you would normally expect (D3)
+ * to distinguish it from notifications that might be sent via
+ * the suspend path.
+ */
+ intel_opregion_notify_adapter(display, PCI_D1);
+ }
+
+ if (!display->platform.valleyview && !display->platform.cherryview)
+ intel_hpd_poll_enable(display);
+}
+
+/* before irq resume */
+void intel_display_driver_pm_runtime_resume_early(struct intel_display *display)
+{
+ intel_opregion_notify_adapter(display, PCI_D0);
+
+ intel_display_power_runtime_resume(display);
+}
+
+/* after irq resume */
+void intel_display_driver_pm_runtime_resume(struct intel_display *display)
+{
+ /*
+ * On VLV/CHV display interrupts are part of the display
+ * power well, so hpd is reinitialized from there. For
+ * everyone else do it here.
+ */
+ if (!display->platform.valleyview && !display->platform.cherryview) {
+ intel_hpd_init(display);
+ intel_hpd_poll_disable(display);
+ }
+
+ skl_watermark_ipc_update(display);
+}
diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.h b/drivers/gpu/drm/i915/display/intel_display_driver.h
index 7eca3d17dd82..1b494337d629 100644
--- a/drivers/gpu/drm/i915/display/intel_display_driver.h
+++ b/drivers/gpu/drm/i915/display/intel_display_driver.h
@@ -43,5 +43,10 @@ void intel_display_driver_suspend_access(struct intel_display *display);
void intel_display_driver_resume_access(struct intel_display *display);
bool intel_display_driver_check_access(struct intel_display *display);
+void intel_display_driver_pm_runtime_suspend(struct intel_display *display);
+void intel_display_driver_pm_runtime_suspend_late(struct intel_display *display);
+void intel_display_driver_pm_runtime_resume_early(struct intel_display *display);
+void intel_display_driver_pm_runtime_resume(struct intel_display *display);
+
#endif /* __INTEL_DISPLAY_DRIVER_H__ */
diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
index 73616cb6ce7c..9ebafd339411 100644
--- a/drivers/gpu/drm/i915/i915_driver.c
+++ b/drivers/gpu/drm/i915/i915_driver.c
@@ -1534,47 +1534,21 @@ static int i915_pm_runtime_suspend(struct device *kdev)
for_each_gt(gt, dev_priv, i)
intel_gt_runtime_suspend(gt);
+ intel_display_driver_pm_runtime_suspend(display);
+
intel_irq_suspend(dev_priv);
for_each_gt(gt, dev_priv, i)
intel_uncore_suspend(gt->uncore);
- intel_display_power_runtime_suspend(display);
-
- /*
- * FIXME: We really should find a document that references the arguments
- * used below!
- */
- if (IS_BROADWELL(dev_priv)) {
- /*
- * On Broadwell, if we use PCI_D1 the PCH DDI ports will stop
- * being detected, and the call we do at i915_pm_runtime_resume()
- * won't be able to restore them. Since PCI_D3hot matches the
- * actual specification and appears to be working, use it.
- */
- intel_opregion_notify_adapter(display, PCI_D3hot);
- } else {
- /*
- * current versions of firmware which depend on this opregion
- * notification have repurposed the D1 definition to mean
- * "runtime suspended" vs. what you would normally expect (D3)
- * to distinguish it from notifications that might be sent via
- * the suspend path.
- */
- intel_opregion_notify_adapter(display, PCI_D1);
- }
-
- if (!IS_VALLEYVIEW(dev_priv) && !IS_CHERRYVIEW(dev_priv))
- intel_hpd_poll_enable(display);
+ intel_display_driver_pm_runtime_suspend_late(display);
ret = vlv_suspend_complete(dev_priv);
if (ret) {
drm_err(&dev_priv->drm,
"Runtime suspend failed, disabling it (%d)\n", ret);
- intel_opregion_notify_adapter(display, PCI_D0);
-
- intel_display_power_runtime_resume(display);
+ intel_display_driver_pm_runtime_resume_early(display);
for_each_gt(gt, dev_priv, i)
intel_uncore_runtime_resume(gt->uncore);
@@ -1584,6 +1558,8 @@ static int i915_pm_runtime_suspend(struct device *kdev)
for_each_gt(gt, dev_priv, i)
intel_gt_runtime_resume(gt);
+ intel_display_driver_pm_runtime_resume(display);
+
enable_rpm_wakeref_asserts(rpm);
return ret;
@@ -1629,8 +1605,6 @@ static int i915_pm_runtime_resume(struct device *kdev)
drm_WARN_ON_ONCE(&dev_priv->drm, atomic_read(&rpm->wakeref_count));
disable_rpm_wakeref_asserts(rpm);
- intel_opregion_notify_adapter(display, PCI_D0);
-
root_pdev = pcie_find_root_port(pdev);
if (root_pdev)
pci_d3cold_enable(root_pdev);
@@ -1639,7 +1613,7 @@ static int i915_pm_runtime_resume(struct device *kdev)
drm_dbg(&dev_priv->drm,
"Unclaimed access during suspend, bios?\n");
- intel_display_power_runtime_resume(display);
+ intel_display_driver_pm_runtime_resume_early(display);
ret = vlv_resume_prepare(dev_priv, true);
@@ -1657,17 +1631,7 @@ static int i915_pm_runtime_resume(struct device *kdev)
intel_pxp_runtime_resume(dev_priv->pxp);
- /*
- * On VLV/CHV display interrupts are part of the display
- * power well, so hpd is reinitialized from there. For
- * everyone else do it here.
- */
- if (!IS_VALLEYVIEW(dev_priv) && !IS_CHERRYVIEW(dev_priv)) {
- intel_hpd_init(display);
- intel_hpd_poll_disable(display);
- }
-
- skl_watermark_ipc_update(display);
+ intel_display_driver_pm_runtime_resume(display);
enable_rpm_wakeref_asserts(rpm);
--
2.47.3
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH v2 5/8] drm/{i915, xe}: add new intel_display_driver_runtime_pm_{enable, disable}()
2026-06-24 14:36 [PATCH v2 0/8] drm/{i915,xe}: unify runtime pm calls Jani Nikula
` (3 preceding siblings ...)
2026-06-24 14:36 ` [PATCH v2 4/8] drm/i915: add intel_display_driver_pm_runtime*() functions Jani Nikula
@ 2026-06-24 14:36 ` Jani Nikula
2026-06-24 14:36 ` [PATCH v2 6/8] drm/xe/display: separate d3cold handling from xe_display_pm_runtime_suspend_late() Jani Nikula
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Jani Nikula @ 2026-06-24 14:36 UTC (permalink / raw)
To: intel-gfx, intel-xe; +Cc: jani.nikula, rodrigo.vivi, ville.syrjala
Add new high-level functions intel_display_driver_runtime_pm_enable()
and intel_display_driver_runtime_pm_disable() to abstract the low-level
functions intel_display_power_enable() and
intel_display_power_disable(), respectively.
The asymmetry in the "runtime pm enable/disable" and "pm runtime
suspend/etc" naming is intentional, with the latter intended to be
called from the PM hooks.
Suggested-by: Ville Syrjala <ville.syrjala@linux.intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/display/intel_display_driver.c | 10 ++++++++++
drivers/gpu/drm/i915/display/intel_display_driver.h | 3 +++
drivers/gpu/drm/i915/i915_driver.c | 4 ++--
drivers/gpu/drm/xe/display/xe_display.c | 8 ++++----
4 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c
index 0ea8a848a8e6..eda34c05ed46 100644
--- a/drivers/gpu/drm/i915/display/intel_display_driver.c
+++ b/drivers/gpu/drm/i915/display/intel_display_driver.c
@@ -869,6 +869,16 @@ void intel_display_driver_pm_resume(struct intel_display *display)
intel_display_power_enable(display);
}
+void intel_display_driver_runtime_pm_enable(struct intel_display *display)
+{
+ intel_display_power_enable(display);
+}
+
+void intel_display_driver_runtime_pm_disable(struct intel_display *display)
+{
+ intel_display_power_disable(display);
+}
+
/* before irq suspend */
void intel_display_driver_pm_runtime_suspend(struct intel_display *display)
{
diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.h b/drivers/gpu/drm/i915/display/intel_display_driver.h
index 1b494337d629..1ae2ad7e95f6 100644
--- a/drivers/gpu/drm/i915/display/intel_display_driver.h
+++ b/drivers/gpu/drm/i915/display/intel_display_driver.h
@@ -43,6 +43,9 @@ void intel_display_driver_suspend_access(struct intel_display *display);
void intel_display_driver_resume_access(struct intel_display *display);
bool intel_display_driver_check_access(struct intel_display *display);
+void intel_display_driver_runtime_pm_enable(struct intel_display *display);
+void intel_display_driver_runtime_pm_disable(struct intel_display *display);
+
void intel_display_driver_pm_runtime_suspend(struct intel_display *display);
void intel_display_driver_pm_runtime_suspend_late(struct intel_display *display);
void intel_display_driver_pm_runtime_resume_early(struct intel_display *display);
diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
index 9ebafd339411..4ba0ae238f93 100644
--- a/drivers/gpu/drm/i915/i915_driver.c
+++ b/drivers/gpu/drm/i915/i915_driver.c
@@ -659,7 +659,7 @@ static int i915_driver_register(struct drm_i915_private *dev_priv)
intel_display_driver_register(display);
- intel_display_power_enable(display);
+ intel_display_driver_runtime_pm_enable(display);
intel_runtime_pm_enable(&dev_priv->runtime_pm);
if (i915_switcheroo_register(dev_priv))
@@ -681,7 +681,7 @@ static void i915_driver_unregister(struct drm_i915_private *dev_priv)
i915_switcheroo_unregister(dev_priv);
intel_runtime_pm_disable(&dev_priv->runtime_pm);
- intel_display_power_disable(display);
+ intel_display_driver_runtime_pm_disable(display);
intel_display_driver_unregister(display);
diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c
index a5768736dbbc..493e9e09b6c9 100644
--- a/drivers/gpu/drm/xe/display/xe_display.c
+++ b/drivers/gpu/drm/xe/display/xe_display.c
@@ -176,7 +176,7 @@ void xe_display_register(struct xe_device *xe)
return;
intel_display_driver_register(display);
- intel_display_power_enable(display);
+ intel_display_driver_runtime_pm_enable(display);
}
void xe_display_unregister(struct xe_device *xe)
@@ -186,7 +186,7 @@ void xe_display_unregister(struct xe_device *xe)
if (!xe->info.probe_display)
return;
- intel_display_power_disable(display);
+ intel_display_driver_runtime_pm_disable(display);
intel_display_driver_unregister(display);
}
@@ -331,7 +331,7 @@ static void xe_display_enable_d3cold(struct xe_device *xe)
* We do a lot of poking in a lot of registers, make sure they work
* properly.
*/
- intel_display_power_disable(display);
+ intel_display_driver_runtime_pm_disable(display);
intel_display_flush_cleanup_work(display);
@@ -364,7 +364,7 @@ static void xe_display_disable_d3cold(struct xe_device *xe)
intel_opregion_resume(display);
- intel_display_power_enable(display);
+ intel_display_driver_runtime_pm_enable(display);
}
void xe_display_pm_runtime_suspend(struct xe_device *xe)
--
2.47.3
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH v2 6/8] drm/xe/display: separate d3cold handling from xe_display_pm_runtime_suspend_late()
2026-06-24 14:36 [PATCH v2 0/8] drm/{i915,xe}: unify runtime pm calls Jani Nikula
` (4 preceding siblings ...)
2026-06-24 14:36 ` [PATCH v2 5/8] drm/{i915, xe}: add new intel_display_driver_runtime_pm_{enable, disable}() Jani Nikula
@ 2026-06-24 14:36 ` Jani Nikula
2026-06-24 14:36 ` [PATCH v2 7/8] drm/xe/display: add xe_display_pm_runtime_resume_early() Jani Nikula
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Jani Nikula @ 2026-06-24 14:36 UTC (permalink / raw)
To: intel-gfx, intel-xe; +Cc: jani.nikula, rodrigo.vivi, ville.syrjala
Make the special d3cold paths completely separate from the rest of the
runtime pm calls.
The intel_dmc_wl_flush_release_work() call right after
xe_display_pm_suspend_late() might be completely redundant, but this
avoids any functional changes.
Wiggle the comment while at it. It gets duplicated for now, but this
will be addressed in the follow-up.
v2: Update comments
Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/xe/display/xe_display.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c
index 493e9e09b6c9..bdafc010fae1 100644
--- a/drivers/gpu/drm/xe/display/xe_display.c
+++ b/drivers/gpu/drm/xe/display/xe_display.c
@@ -389,14 +389,14 @@ void xe_display_pm_runtime_suspend_late(struct xe_device *xe)
if (!xe->info.probe_display)
return;
- if (xe->d3cold.allowed)
+ if (xe->d3cold.allowed) {
xe_display_pm_suspend_late(xe);
+ /* Ensure the wakelock release work gets flushed */
+ intel_dmc_wl_flush_release_work(display);
+ return;
+ }
- /*
- * If xe_display_pm_suspend_late() is not called, it is likely
- * that we will be on dynamic DC states with DMC wakelock enabled. We
- * need to flush the release work in that case.
- */
+ /* Ensure the wakelock release work gets flushed */
intel_dmc_wl_flush_release_work(display);
}
--
2.47.3
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH v2 7/8] drm/xe/display: add xe_display_pm_runtime_resume_early()
2026-06-24 14:36 [PATCH v2 0/8] drm/{i915,xe}: unify runtime pm calls Jani Nikula
` (5 preceding siblings ...)
2026-06-24 14:36 ` [PATCH v2 6/8] drm/xe/display: separate d3cold handling from xe_display_pm_runtime_suspend_late() Jani Nikula
@ 2026-06-24 14:36 ` Jani Nikula
2026-06-24 14:36 ` [PATCH v2 8/8] drm/xe/display: unify runtime suspend/resume with i915 for non-d3cold Jani Nikula
2026-06-24 14:44 ` ✗ CI.KUnit: failure for drm/{i915,xe}: unify runtime pm calls (rev2) Patchwork
8 siblings, 0 replies; 10+ messages in thread
From: Jani Nikula @ 2026-06-24 14:36 UTC (permalink / raw)
To: intel-gfx, intel-xe; +Cc: jani.nikula, rodrigo.vivi, ville.syrjala
Add new display runtime PM hook xe_display_pm_runtime_resume_early(), to
be called before IRQ resume. This is initially a no-op placeholder.
Add comments on the timing relative to irq suspend/resume to all the
runtime PM hooks.
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/xe/display/xe_display.c | 13 +++++++++++++
drivers/gpu/drm/xe/display/xe_display.h | 1 +
drivers/gpu/drm/xe/xe_pm.c | 2 ++
3 files changed, 16 insertions(+)
diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c
index bdafc010fae1..a26b8bca1cb6 100644
--- a/drivers/gpu/drm/xe/display/xe_display.c
+++ b/drivers/gpu/drm/xe/display/xe_display.c
@@ -367,6 +367,7 @@ static void xe_display_disable_d3cold(struct xe_device *xe)
intel_display_driver_runtime_pm_enable(display);
}
+/* before irq suspend */
void xe_display_pm_runtime_suspend(struct xe_device *xe)
{
struct intel_display *display = xe->display;
@@ -382,6 +383,7 @@ void xe_display_pm_runtime_suspend(struct xe_device *xe)
intel_hpd_poll_enable(display);
}
+/* after irq suspend */
void xe_display_pm_runtime_suspend_late(struct xe_device *xe)
{
struct intel_display *display = xe->display;
@@ -400,6 +402,17 @@ void xe_display_pm_runtime_suspend_late(struct xe_device *xe)
intel_dmc_wl_flush_release_work(display);
}
+/* before irq resume */
+void xe_display_pm_runtime_resume_early(struct xe_device *xe)
+{
+ if (!xe->info.probe_display)
+ return;
+
+ if (xe->d3cold.allowed)
+ return;
+}
+
+/* after irq resume */
void xe_display_pm_runtime_resume(struct xe_device *xe)
{
struct intel_display *display = xe->display;
diff --git a/drivers/gpu/drm/xe/display/xe_display.h b/drivers/gpu/drm/xe/display/xe_display.h
index e5f9aed93206..52a5afed172c 100644
--- a/drivers/gpu/drm/xe/display/xe_display.h
+++ b/drivers/gpu/drm/xe/display/xe_display.h
@@ -43,6 +43,7 @@ void xe_display_pm_resume_early(struct xe_device *xe);
void xe_display_pm_resume(struct xe_device *xe);
void xe_display_pm_runtime_suspend(struct xe_device *xe);
void xe_display_pm_runtime_suspend_late(struct xe_device *xe);
+void xe_display_pm_runtime_resume_early(struct xe_device *xe);
void xe_display_pm_runtime_resume(struct xe_device *xe);
#define XE_DISPLAY_DRIVER_FEATURES (DRIVER_MODESET | DRIVER_ATOMIC)
diff --git a/drivers/gpu/drm/xe/xe_pm.c b/drivers/gpu/drm/xe/xe_pm.c
index 99562f691080..a5289a9df8d2 100644
--- a/drivers/gpu/drm/xe/xe_pm.c
+++ b/drivers/gpu/drm/xe/xe_pm.c
@@ -700,6 +700,8 @@ int xe_pm_runtime_resume(struct xe_device *xe)
if (xe->d3cold.allowed)
xe_sysctrl_pm_resume(xe);
+ xe_display_pm_runtime_resume_early(xe);
+
xe_irq_resume(xe);
for_each_gt(gt, xe, id) {
--
2.47.3
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH v2 8/8] drm/xe/display: unify runtime suspend/resume with i915 for non-d3cold
2026-06-24 14:36 [PATCH v2 0/8] drm/{i915,xe}: unify runtime pm calls Jani Nikula
` (6 preceding siblings ...)
2026-06-24 14:36 ` [PATCH v2 7/8] drm/xe/display: add xe_display_pm_runtime_resume_early() Jani Nikula
@ 2026-06-24 14:36 ` Jani Nikula
2026-06-24 14:44 ` ✗ CI.KUnit: failure for drm/{i915,xe}: unify runtime pm calls (rev2) Patchwork
8 siblings, 0 replies; 10+ messages in thread
From: Jani Nikula @ 2026-06-24 14:36 UTC (permalink / raw)
To: intel-gfx, intel-xe; +Cc: jani.nikula, rodrigo.vivi, ville.syrjala
With the special d3cold handling in xe runtime suspend/resume separated,
unify the non-d3cold paths with i915. There are multiple changes here at
once that probably wouldn't make much sense to split out further.
Add the call to intel_display_driver_pm_runtime_suspend(), which, for
the time being, is a no-op. The intel_hpd_poll_enable() is called later.
Add the call to intel_display_driver_pm_runtime_suspend_late(), which
starts calling intel_display_power_runtime_suspend() and
intel_opregion_notify_adapter(). Deep down, the former should take care
of intel_dmc_wl_flush_release_work(), allowing us to drop the extra call
in xe_display_pm_runtime_suspend_late(). The intel_hpd_poll_enable()
call is also done here, postponed from the previous location in
xe_display_pm_runtime_suspend().
Add the call to intel_display_driver_pm_runtime_resume_early(), which
contains the intel_display_power_runtime_resume() and
intel_opregion_notify_adapter() counterparts to the calls in
intel_display_power_runtime_suspend_late().
Finally, intel_display_driver_pm_runtime_resume() replaces the direct
calls to intel_hpd_init(), intel_hpd_poll_disable(), and
skl_watermark_ipc_update(). (The hotplug poll enable/disable calls are
asymmetric.)
v2:
- Rebase, move placement of the calls
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/xe/display/xe_display.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c
index a26b8bca1cb6..8e48853c276e 100644
--- a/drivers/gpu/drm/xe/display/xe_display.c
+++ b/drivers/gpu/drm/xe/display/xe_display.c
@@ -380,7 +380,7 @@ void xe_display_pm_runtime_suspend(struct xe_device *xe)
return;
}
- intel_hpd_poll_enable(display);
+ intel_display_driver_pm_runtime_suspend(display);
}
/* after irq suspend */
@@ -398,18 +398,21 @@ void xe_display_pm_runtime_suspend_late(struct xe_device *xe)
return;
}
- /* Ensure the wakelock release work gets flushed */
- intel_dmc_wl_flush_release_work(display);
+ intel_display_driver_pm_runtime_suspend_late(display);
}
/* before irq resume */
void xe_display_pm_runtime_resume_early(struct xe_device *xe)
{
+ struct intel_display *display = xe->display;
+
if (!xe->info.probe_display)
return;
if (xe->d3cold.allowed)
return;
+
+ intel_display_driver_pm_runtime_resume_early(display);
}
/* after irq resume */
@@ -425,9 +428,7 @@ void xe_display_pm_runtime_resume(struct xe_device *xe)
return;
}
- intel_hpd_init(display);
- intel_hpd_poll_disable(display);
- skl_watermark_ipc_update(display);
+ intel_display_driver_pm_runtime_resume(display);
}
--
2.47.3
^ permalink raw reply related [flat|nested] 10+ messages in thread* ✗ CI.KUnit: failure for drm/{i915,xe}: unify runtime pm calls (rev2)
2026-06-24 14:36 [PATCH v2 0/8] drm/{i915,xe}: unify runtime pm calls Jani Nikula
` (7 preceding siblings ...)
2026-06-24 14:36 ` [PATCH v2 8/8] drm/xe/display: unify runtime suspend/resume with i915 for non-d3cold Jani Nikula
@ 2026-06-24 14:44 ` Patchwork
8 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2026-06-24 14:44 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-xe
== Series Details ==
Series: drm/{i915,xe}: unify runtime pm calls (rev2)
URL : https://patchwork.freedesktop.org/series/168519/
State : failure
== Summary ==
+ trap cleanup EXIT
+ /kernel/tools/testing/kunit/kunit.py run --kunitconfig /kernel/drivers/gpu/drm/xe/.kunitconfig
ERROR:root:../drivers/gpu/drm/xe/xe_pm.c: In function ‘xe_pm_runtime_resume’:
../drivers/gpu/drm/xe/xe_pm.c:703:9: error: implicit declaration of function ‘xe_display_pm_runtime_resume_early’; did you mean ‘xe_display_pm_runtime_resume’? [-Werror=implicit-function-declaration]
703 | xe_display_pm_runtime_resume_early(xe);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| xe_display_pm_runtime_resume
cc1: some warnings being treated as errors
make[7]: *** [../scripts/Makefile.build:289: drivers/gpu/drm/xe/xe_pm.o] Error 1
make[7]: *** Waiting for unfinished jobs....
make[6]: *** [../scripts/Makefile.build:548: drivers/gpu/drm/xe] Error 2
make[5]: *** [../scripts/Makefile.build:548: drivers/gpu/drm] Error 2
make[4]: *** [../scripts/Makefile.build:548: drivers/gpu] Error 2
make[3]: *** [../scripts/Makefile.build:548: drivers] Error 2
make[2]: *** [/kernel/Makefile:2144: .] Error 2
make[1]: *** [/kernel/Makefile:248: __sub-make] Error 2
make: *** [Makefile:248: __sub-make] Error 2
[14:43:25] Configuring KUnit Kernel ...
Generating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
[14:43:30] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=48
+ cleanup
++ stat -c %u:%g /kernel
+ chown -R 1003:1003 /kernel
^ permalink raw reply [flat|nested] 10+ messages in thread