Commit b762ae48 authored by Imre Deak's avatar Imre Deak
Browse files

drm/i915/dp_mst: Reuse the DP-SST helper function to compute FEC config



Reuse the DP-SST helper to compute the state for the FEC enabled state
for DP-MST as well.

Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
Reviewed-by: default avatarJouni Högander <jouni.hogander@intel.com>
Link: https://lore.kernel.org/r/20251015161934.262108-5-imre.deak@intel.com
parent cb6c8f1f
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -298,13 +298,11 @@ int intel_dp_mtp_tu_compute_config(struct intel_dp *intel_dp,
	 * after it was set by intel_dp_dsc_compute_config() ->
	 * intel_dp_needs_8b10b_fec().
	 */
	if (dsc) {
		if (!intel_dp_supports_fec(intel_dp, connector, crtc_state))
	crtc_state->fec_enable = intel_dp_needs_8b10b_fec(crtc_state, dsc);
	if (crtc_state->fec_enable &&
	    !intel_dp_supports_fec(intel_dp, connector, crtc_state))
		return -EINVAL;

		crtc_state->fec_enable = !intel_dp_is_uhbr(crtc_state);
	}

	max_dpt_bpp_x16 = fxp_q4_from_int(intel_dp_mst_max_dpt_bpp(crtc_state, dsc));
	if (max_dpt_bpp_x16 && max_bpp_x16 > max_dpt_bpp_x16) {
		drm_dbg_kms(display->drm, "Limiting bpp to max DPT bpp (" FXP_Q4_FMT " -> " FXP_Q4_FMT ")\n",