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 <[email protected]> Cc: Ville Syrjälä <[email protected]> Signed-off-by: Jani Nikula <[email protected]> --- 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 306c853dd07a..8da4c457a4a0 100644 --- a/drivers/gpu/drm/xe/display/xe_display.c +++ b/drivers/gpu/drm/xe/display/xe_display.c @@ -362,7 +362,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 */ @@ -380,18 +380,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 */ @@ -407,9 +410,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
