]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/i915/dp_mst: Fix check for FEC support for an uncompressed stream
authorImre Deak <imre.deak@intel.com>
Tue, 28 Oct 2025 11:35:36 +0000 (13:35 +0200)
committerImre Deak <imre.deak@intel.com>
Wed, 29 Oct 2025 18:00:34 +0000 (20:00 +0200)
The reason for enabling FEC for an uncompressed stream on an MST link is
that the DSC compression is enabled for another stream on the same link.
For such an uncompressed stream FEC doesn't need to be supported on the
whole path until the (DP-SST) sink DPRX. For instance if a branch device
- like a monitor with an MST branch device within it - is plugged to a
DFP connector of an MST docking station and the monitor's branch
device does not support FEC, the docking station's branch device will
still enable the link to the monitor correctly, disabling the FEC on
that link as expected. Since it's been verified already that FEC is
supported for the compressed stream above, the corresponding check for
the uncompressed stream can be dropped: the check for the compressed
stream implies already that FEC is supported on the link between the
source DPTX and immediate downstream branch device. If FEC is not
supported on the whole path until the sink DPRX, FEC will be disabled by
a downstream branch device on the path as described above for the MST
dock + MST monitor configuration example.

This fixes a problem in the above MST dock + MST monitor example, where
the dock supports FEC, but the monitor doesn't support it and FEC gets
enabled on the link due to DSC getting enabled for another monitor's
stream on the same link.

Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/14254
Reviewed-by: Jouni Högander <jouni.hogander@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patch.msgid.link/20251028113536.602352-1-imre.deak@intel.com
drivers/gpu/drm/i915/display/intel_dp_mst.c

index a845b2612a3fa8c0bc3c42704f2702994cca25e1..21a60b8c880ee70a1570b237a0b5505455a70dfd 100644 (file)
@@ -299,7 +299,14 @@ int intel_dp_mtp_tu_compute_config(struct intel_dp *intel_dp,
         * intel_dp_needs_8b10b_fec().
         */
        crtc_state->fec_enable = intel_dp_needs_8b10b_fec(crtc_state, dsc);
-       if (crtc_state->fec_enable &&
+       /*
+        * If FEC gets enabled only because of another compressed stream, FEC
+        * may not be supported for this uncompressed stream on the whole link
+        * path until the sink DPRX. In this case a downstream branch device
+        * will disable FEC for the uncompressed stream as expected and so the
+        * FEC support doesn't need to be checked for this uncompressed stream.
+        */
+       if (crtc_state->fec_enable && dsc &&
            !intel_dp_supports_fec(intel_dp, connector, crtc_state))
                return -EINVAL;