summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2026-06-02 11:32:45 +0300
committerJani Nikula <jani.nikula@intel.com>2026-06-04 13:50:09 +0300
commit19cae40d70301ed1881317eb2ff1aa7df4160ea8 (patch)
tree8c93a07e6e34d495b69c4ef1745cb8fe8418a1a6
parent1908dbad53d9515bcef14ee7b990d3e47f0b3f63 (diff)
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>
-rw-r--r--drivers/gpu/drm/i915/display/intel_display_driver.c11
-rw-r--r--drivers/gpu/drm/i915/i915_driver.c9
-rw-r--r--drivers/gpu/drm/xe/display/xe_display.c22
3 files changed, 13 insertions, 29 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c
index 9be4c94740dc..41a2244985fa 100644
--- a/drivers/gpu/drm/i915/display/intel_display_driver.c
+++ b/drivers/gpu/drm/i915/display/intel_display_driver.c
@@ -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)
diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
index bd73d64c1ccb..f161723f653e 100644
--- a/drivers/gpu/drm/i915/i915_driver.c
+++ b/drivers/gpu/drm/i915/i915_driver.c
@@ -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);
diff --git a/drivers/gpu/drm/xe/display/xe_display.c b/drivers/gpu/drm/xe/display/xe_display.c
index 7f4ad09f9cce..3a84154febe9 100644
--- a/drivers/gpu/drm/xe/display/xe_display.c
+++ b/drivers/gpu/drm/xe/display/xe_display.c
@@ -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);