drm/i915/ptl/dp_mst: Fix slave transcoder enabling wrt. DDI function
authorImre Deak <imre.deak@intel.com>
Wed, 30 Oct 2024 19:23:09 +0000 (21:23 +0200)
committerImre Deak <imre.deak@intel.com>
Wed, 6 Nov 2024 16:13:29 +0000 (18:13 +0200)
On PTL during modeset enabling configure the DDI function without
enabling it for MST slave transcoders before programming the data and
link M/N values. The DDI function gets enabled separately later in the
transcoder enabling sequence.

This fixes a slave transcoder getting stuck during enabling, leading
to page flip timeout errors on the corresponding pipe.

The spec requires the same programming step for ADLP+ platforms, that
will be addressed separately (on those platforms the above transcoder
getting stuck issue was not observed).

Bspec: 68849
Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241030192313.4030617-2-imre.deak@intel.com
drivers/gpu/drm/i915/display/intel_ddi.c
drivers/gpu/drm/i915/display/intel_ddi.h
drivers/gpu/drm/i915/display/intel_dp_mst.c

index 49b5cc0..7b95b12 100644 (file)
@@ -619,7 +619,7 @@ void intel_ddi_enable_transcoder_func(struct intel_encoder *encoder,
  * Same as intel_ddi_enable_transcoder_func(), but it does not set the enable
  * bit.
  */
-static void
+void
 intel_ddi_config_transcoder_func(struct intel_encoder *encoder,
                                 const struct intel_crtc_state *crtc_state)
 {
index 640851d..b7fdf0a 100644 (file)
@@ -57,6 +57,8 @@ void intel_wait_ddi_buf_idle(struct drm_i915_private *dev_priv,
 void intel_ddi_init(struct intel_display *display,
                    const struct intel_bios_encoder_data *devdata);
 bool intel_ddi_get_hw_state(struct intel_encoder *encoder, enum pipe *pipe);
+void intel_ddi_config_transcoder_func(struct intel_encoder *encoder,
+                                     const struct intel_crtc_state *crtc_state);
 void intel_ddi_enable_transcoder_func(struct intel_encoder *encoder,
                                      const struct intel_crtc_state *crtc_state);
 void intel_ddi_disable_transcoder_func(const struct intel_crtc_state *crtc_state);
index 5bba078..bd5a595 100644 (file)
@@ -1224,6 +1224,9 @@ static void intel_mst_pre_enable_dp(struct intel_atomic_state *state,
        if (DISPLAY_VER(dev_priv) < 12 || !first_mst_stream)
                intel_ddi_enable_transcoder_clock(encoder, pipe_config);
 
+       if (DISPLAY_VER(dev_priv) >= 30 && !first_mst_stream)
+               intel_ddi_config_transcoder_func(encoder, pipe_config);
+
        intel_dsc_dp_pps_write(&dig_port->base, pipe_config);
        intel_ddi_set_dp_msa(pipe_config, conn_state);
 }