[SRU][O][PATCH 2/3] drm/xe/display: Separate the d3cold and non-d3cold runtime PM handling
Thibault Ferrante
thibault.ferrante at canonical.com
Fri Mar 14 10:06:38 UTC 2025
From: Imre Deak <imre.deak at intel.com>
BugLink: https://bugs.launchpad.net/bugs/2102378
For clarity separate the d3cold and non-d3cold runtime PM handling. The
only change in behavior is disabling polling later during runtime
resume. This shouldn't make a difference, since the poll disabling is
handled from a work, which could run at any point wrt. the runtime
resume handler. The work will also require a runtime PM reference,
syncing it with the resume handler.
Cc: Rodrigo Vivi <rodrigo.vivi at intel.com>
Reviewed-by: Jonathan Cavitt <jonathan.cavitt at intel.com>
Signed-off-by: Imre Deak <imre.deak at intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241009194358.1321200-4-imre.deak@intel.com
(backported from commit a4de6beb83fc5adee788518350247c629568901e)
[thibf: intel_opregion_resume() takes xe as argument instead of display]
Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
Signed-off-by: Thibault Ferrante <thibault.ferrante at canonical.com>
---
drivers/gpu/drm/xe/display/xe_display.c | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c
index 04e99d1beb21..b011a1e3ffa3 100644
--- a/drivers/gpu/drm/xe/display/xe_display.c
+++ b/drivers/gpu/drm/xe/display/xe_display.c
@@ -337,6 +337,9 @@ static void __xe_display_pm_suspend(struct xe_device *xe, bool runtime)
intel_opregion_suspend(xe, s2idle ? PCI_D1 : PCI_D3cold);
intel_dmc_suspend(xe);
+
+ if (runtime && has_display(xe))
+ intel_hpd_poll_enable(xe);
}
void xe_display_pm_suspend(struct xe_device *xe)
@@ -349,8 +352,10 @@ void xe_display_pm_runtime_suspend(struct xe_device *xe)
if (!xe->info.enable_display)
return;
- if (xe->d3cold.allowed)
+ if (xe->d3cold.allowed) {
__xe_display_pm_suspend(xe, true);
+ return;
+ }
intel_hpd_poll_enable(xe);
}
@@ -398,9 +403,11 @@ static void __xe_display_pm_resume(struct xe_device *xe, bool runtime)
intel_display_driver_resume(xe);
drm_kms_helper_poll_enable(&xe->drm);
intel_display_driver_enable_user_access(xe);
- intel_hpd_poll_disable(xe);
}
+ if (has_display(xe))
+ intel_hpd_poll_disable(xe);
+
intel_opregion_resume(xe);
intel_fbdev_set_suspend(&xe->drm, FBINFO_STATE_RUNNING, false);
@@ -418,10 +425,12 @@ void xe_display_pm_runtime_resume(struct xe_device *xe)
if (!xe->info.enable_display)
return;
- intel_hpd_poll_disable(xe);
-
- if (xe->d3cold.allowed)
+ if (xe->d3cold.allowed) {
__xe_display_pm_resume(xe, true);
+ return;
+ }
+
+ intel_hpd_poll_disable(xe);
}
--
2.45.2
More information about the kernel-team
mailing list