From: Imre Deak Date: Tue, 28 Oct 2025 11:35:36 +0000 (+0200) Subject: drm/i915/dp_mst: Fix check for FEC support for an uncompressed stream X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=06a691f0e7d08fb52a6020bd5b1f1f9cd091aaae;p=thirdparty%2Fkernel%2Flinux.git drm/i915/dp_mst: Fix check for FEC support for an uncompressed stream 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 Signed-off-by: Imre Deak Link: https://patch.msgid.link/20251028113536.602352-1-imre.deak@intel.com --- diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c index a845b2612a3fa..21a60b8c880ee 100644 --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c @@ -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;