drm/{i915, xe}: move more stuff to __intel_display_driver_pm_suspend()

The calls leading up to __intel_display_driver_pm_suspend() are
surrounded by near identical display calls. Move the calls inside
__intel_display_driver_pm_suspend() to clean up and deduplicate.

There's a slight functional change in that
intel_display_driver_pm_suspend() returns early for
!HAS_DISPLAY(). Assume this is what we want, and there are no cases
where display engine is present but all pipes have been fused off.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/fdca3720537b6b79a754a83811d07b97d47e0db0.1780389001.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
Jani Nikula 2026-06-02 11:32:52 +03:00
parent ad317c4de5
commit 04bfc500ad
3 changed files with 8 additions and 27 deletions

View File

@ -684,13 +684,6 @@ void intel_display_driver_shutdown(struct intel_display *display)
__intel_display_driver_pm_suspend(display, true);
intel_encoder_block_all_hpds(display);
intel_hpd_cancel_work(display);
intel_display_driver_suspend_access(display);
intel_encoder_suspend_all(display);
intel_encoder_shutdown_all(display);
}
@ -748,6 +741,14 @@ static int __intel_display_driver_pm_suspend(struct intel_display *display, bool
intel_dp_mst_suspend(display);
intel_encoder_block_all_hpds(display);
intel_hpd_cancel_work(display);
intel_display_driver_suspend_access(display);
intel_encoder_suspend_all(display);
return ret;
}

View File

@ -61,7 +61,6 @@
#include "display/intel_dp.h"
#include "display/intel_dpt.h"
#include "display/intel_dram.h"
#include "display/intel_encoder.h"
#include "display/intel_fbdev.h"
#include "display/intel_gmbus.h"
#include "display/intel_hotplug.h"
@ -1107,15 +1106,6 @@ static int i915_drm_suspend(struct drm_device *dev)
intel_display_driver_pm_suspend(display);
intel_encoder_block_all_hpds(display);
intel_hpd_cancel_work(display);
if (intel_display_device_present(display))
intel_display_driver_suspend_access(display);
intel_encoder_suspend_all(display);
intel_irq_suspend(dev_priv);
/* Must be called before GGTT is suspended. */

View File

@ -30,7 +30,6 @@
#include "intel_dmc_wl.h"
#include "intel_dp.h"
#include "intel_dram.h"
#include "intel_encoder.h"
#include "intel_fbdev.h"
#include "intel_hdcp.h"
#include "intel_hotplug.h"
@ -299,15 +298,6 @@ void xe_display_pm_suspend(struct xe_device *xe)
intel_display_driver_pm_suspend(display);
intel_encoder_block_all_hpds(display);
intel_hpd_cancel_work(display);
if (intel_display_device_present(display)) {
intel_display_driver_suspend_access(display);
intel_encoder_suspend_all(display);
}
intel_opregion_suspend(display, s2idle ? PCI_D1 : PCI_D3cold);
intel_dmc_suspend(display);