mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 14:04:27 -04:00
drm/{i915, xe}: move more calls inside intel_display_driver_pm_suspend()
The intel_display_driver_pm_suspend() calls are surrounded by near identical display calls. Move the calls inside intel_display_driver_pm_suspend(). 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/82cfac0b966a8a82c8cf85e6b7b050223b7d5e33.1780389001.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
@@ -686,6 +686,17 @@ int intel_display_driver_pm_suspend(struct intel_display *display)
|
||||
if (!HAS_DISPLAY(display))
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* We do a lot of poking in a lot of registers, make sure they work
|
||||
* properly.
|
||||
*/
|
||||
intel_display_power_disable(display);
|
||||
|
||||
drm_client_dev_suspend(display->drm);
|
||||
|
||||
drm_kms_helper_poll_disable(display->drm);
|
||||
intel_display_driver_disable_user_access(display);
|
||||
|
||||
state = drm_atomic_helper_suspend(display->drm);
|
||||
ret = PTR_ERR_OR_ZERO(state);
|
||||
if (ret)
|
||||
|
||||
@@ -1130,15 +1130,6 @@ static int i915_drm_suspend(struct drm_device *dev)
|
||||
|
||||
disable_rpm_wakeref_asserts(&dev_priv->runtime_pm);
|
||||
|
||||
/* We do a lot of poking in a lot of registers, make sure they work
|
||||
* properly. */
|
||||
intel_display_power_disable(display);
|
||||
drm_client_dev_suspend(dev);
|
||||
if (intel_display_device_present(display)) {
|
||||
drm_kms_helper_poll_disable(dev);
|
||||
intel_display_driver_disable_user_access(display);
|
||||
}
|
||||
|
||||
intel_display_driver_pm_suspend(display);
|
||||
|
||||
intel_encoder_block_all_hpds(display);
|
||||
|
||||
@@ -219,14 +219,7 @@ void xe_display_shutdown(struct xe_device *xe)
|
||||
if (!xe->info.probe_display)
|
||||
return;
|
||||
|
||||
intel_display_power_disable(display);
|
||||
drm_client_dev_suspend(&xe->drm);
|
||||
|
||||
if (intel_display_device_present(display)) {
|
||||
drm_kms_helper_poll_disable(&xe->drm);
|
||||
intel_display_driver_disable_user_access(display);
|
||||
intel_display_driver_pm_suspend(display);
|
||||
}
|
||||
intel_display_driver_pm_suspend(display);
|
||||
|
||||
intel_encoder_block_all_hpds(display);
|
||||
intel_hpd_cancel_work(display);
|
||||
@@ -318,18 +311,7 @@ void xe_display_pm_suspend(struct xe_device *xe)
|
||||
if (!xe->info.probe_display)
|
||||
return;
|
||||
|
||||
/*
|
||||
* We do a lot of poking in a lot of registers, make sure they work
|
||||
* properly.
|
||||
*/
|
||||
intel_display_power_disable(display);
|
||||
drm_client_dev_suspend(&xe->drm);
|
||||
|
||||
if (intel_display_device_present(display)) {
|
||||
drm_kms_helper_poll_disable(&xe->drm);
|
||||
intel_display_driver_disable_user_access(display);
|
||||
intel_display_driver_pm_suspend(display);
|
||||
}
|
||||
intel_display_driver_pm_suspend(display);
|
||||
|
||||
intel_encoder_block_all_hpds(display);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user