]> Git Repo - linux.git/commitdiff
drm/xe: Use the encoder suspend helper also used by the i915 driver
authorImre Deak <[email protected]>
Tue, 18 Jun 2024 12:52:55 +0000 (15:52 +0300)
committerImre Deak <[email protected]>
Thu, 20 Jun 2024 16:48:01 +0000 (19:48 +0300)
Use the suspend encoders helper which is also used by the i915 driver.
This fixes an issue in the xe driver where the encoder
suspend_complete() hook is not called and was an overlook when this hook
was added in commit b61fad5f7e5d ("drm/i915/tc: Call TypeC port
flush_work/cleanup without modeset locks held") for i915, but not added
to the xe driver (which was still in a separate source tree at the above
point).

v2: Fix checkpatch warn in commit log. (Rodrigo)

Reviewed-by: Rodrigo Vivi <[email protected]>
Reviewed-by: Jani Nikula <[email protected]>
Signed-off-by: Imre Deak <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
drivers/gpu/drm/xe/display/xe_display.c

index 78cccbe2894758f61d3b1e8629d5f58556379a4f..8b83dcff72e17a41d7695c76c8f8c8a9d5508294 100644 (file)
@@ -23,6 +23,7 @@
 #include "intel_display_types.h"
 #include "intel_dmc.h"
 #include "intel_dp.h"
+#include "intel_encoder.h"
 #include "intel_fbdev.h"
 #include "intel_hdcp.h"
 #include "intel_hotplug.h"
@@ -270,21 +271,6 @@ void xe_display_irq_postinstall(struct xe_device *xe, struct xe_gt *gt)
                gen11_de_irq_postinstall(xe);
 }
 
-static void intel_suspend_encoders(struct xe_device *xe)
-{
-       struct drm_device *dev = &xe->drm;
-       struct intel_encoder *encoder;
-
-       if (has_display(xe))
-               return;
-
-       drm_modeset_lock_all(dev);
-       for_each_intel_encoder(dev, encoder)
-               if (encoder->suspend)
-                       encoder->suspend(encoder);
-       drm_modeset_unlock_all(dev);
-}
-
 static bool suspend_to_idle(void)
 {
 #if IS_ENABLED(CONFIG_ACPI_SLEEP)
@@ -315,7 +301,7 @@ void xe_display_pm_suspend(struct xe_device *xe, bool runtime)
 
        intel_hpd_cancel_work(xe);
 
-       intel_suspend_encoders(xe);
+       intel_encoder_suspend_all(&xe->display);
 
        intel_opregion_suspend(xe, s2idle ? PCI_D1 : PCI_D3cold);
 
This page took 0.05196 seconds and 4 git commands to generate.