drm/i915/dp: Make sure the DSC PPS SDP is disabled whenever DSC is disabled
authorImre Deak <imre.deak@intel.com>
Tue, 24 Oct 2023 01:09:11 +0000 (04:09 +0300)
committerImre Deak <imre.deak@intel.com>
Wed, 8 Nov 2023 15:22:14 +0000 (17:22 +0200)
Atm the DSC PPS SDP will stay enabled after enabling and disabling DSC.
This leaves an output blank after switching off DSC on it. Make sure the
SDP is disabled for an uncompressed output.

v2:
- Disable the SDP already during output disabling. (Ville)

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231030155843.2251023-17-imre.deak@intel.com
drivers/gpu/drm/i915/display/intel_dp.c
drivers/gpu/drm/i915/display/intel_dp_mst.c

index 4dc923bc4c97a351e9330c706b18baf92bd46a72..8ee2d891558688b321259284d92ffd75405bcd23 100644 (file)
@@ -4069,7 +4069,10 @@ void intel_dp_set_infoframes(struct intel_encoder *encoder,
                         VIDEO_DIP_ENABLE_SPD_HSW | VIDEO_DIP_ENABLE_DRM_GLK;
        u32 val = intel_de_read(dev_priv, reg) & ~dip_enable;
 
-       /* TODO: Add DSC case (DIP_ENABLE_PPS) */
+       /* TODO: Sanitize DSC enabling wrt. intel_dsc_dp_pps_write(). */
+       if (!enable && HAS_DSC(dev_priv))
+               val &= ~VDIP_ENABLE_PPS;
+
        /* When PSR is enabled, this routine doesn't disable VSC DIP */
        if (!crtc_state->has_psr)
                val &= ~VIDEO_DIP_ENABLE_VSC_HSW;
index 5efc3cea73e5253f09eb5b9c951e80a0d3931abb..afa6d428cb0c6a14a70abc9bc666cd8d837fe703 100644 (file)
@@ -746,9 +746,8 @@ static void intel_mst_post_disable_dp(struct intel_atomic_state *state,
         * BSpec 4287: disable DIP after the transcoder is disabled and before
         * the transcoder clock select is set to none.
         */
-       if (last_mst_stream)
-               intel_dp_set_infoframes(&dig_port->base, false,
-                                       old_crtc_state, NULL);
+       intel_dp_set_infoframes(&dig_port->base, false,
+                               old_crtc_state, NULL);
        /*
         * From TGL spec: "If multi-stream slave transcoder: Configure
         * Transcoder Clock Select to direct no clock to the transcoder"