drm/i915: Introduce ilk_pch_pre_enable()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 24 Jan 2022 19:31:36 +0000 (21:31 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 26 Jan 2022 05:57:24 +0000 (07:57 +0200)
Complete the ilk pch modeset abstraction by adding ilk_pch_pre_enable().
I did the disable vs. post_disable split already for the disable
sequence, but the enable sequence was still left with the naked
ilk_fdi_pll_enable() call for some reason.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220124193136.2397-2-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/display/intel_display.c
drivers/gpu/drm/i915/display/intel_pch_display.c
drivers/gpu/drm/i915/display/intel_pch_display.h

index 8537d2373bb641e67d9c013d41162e83a36056bc..f3f8704378f8dec4f2820612190ccd805ded1ae4 100644 (file)
@@ -1858,10 +1858,7 @@ static void ilk_crtc_enable(struct intel_atomic_state *state,
        intel_encoders_pre_enable(state, crtc);
 
        if (new_crtc_state->has_pch_encoder) {
-               /* Note: FDI PLL enabling _must_ be done before we enable the
-                * cpu pipes, hence this is separate from all the other fdi/pch
-                * enabling. */
-               ilk_fdi_pll_enable(new_crtc_state);
+               ilk_pch_pre_enable(state, crtc);
        } else {
                assert_fdi_tx_disabled(dev_priv, pipe);
                assert_fdi_rx_disabled(dev_priv, pipe);
index a55c4bfacd0dfc9a9ffc53219ea7021c6e02f51d..0c528c612cb2a00b9ea924d5de6a5ac478ae8c21 100644 (file)
@@ -211,6 +211,20 @@ static void ilk_disable_pch_transcoder(struct intel_crtc *crtc)
        }
 }
 
+void ilk_pch_pre_enable(struct intel_atomic_state *state,
+                       struct intel_crtc *crtc)
+{
+       const struct intel_crtc_state *crtc_state =
+               intel_atomic_get_new_crtc_state(state, crtc);
+
+       /*
+        * Note: FDI PLL enabling _must_ be done before we enable the
+        * cpu pipes, hence this is separate from all the other fdi/pch
+        * enabling.
+        */
+       ilk_fdi_pll_enable(crtc_state);
+}
+
 /*
  * Enable PCH resources required for PCH ports:
  *   - PCH PLLs
index 2c387fe3a467c235cf9289561f4d2f32da6bd816..f915fa4241d752f88ed3deb6a437e89f2f07110e 100644 (file)
@@ -10,6 +10,8 @@ struct intel_atomic_state;
 struct intel_crtc;
 struct intel_crtc_state;
 
+void ilk_pch_pre_enable(struct intel_atomic_state *state,
+                       struct intel_crtc *crtc);
 void ilk_pch_enable(struct intel_atomic_state *state,
                    struct intel_crtc *crtc);
 void ilk_pch_disable(struct intel_atomic_state *state,