Commit 8de66736 authored by Ville Syrjälä's avatar Ville Syrjälä
Browse files

drm/i915: Use intel_dp_has_dsc() during .compute_config()



Reuse intel_dp_has_dsc() during .compute_config() instead of
repeating some of the checks again by hand. We'll be adding
more checks to intel_dp_has_dsc() and this will make sure
we cover both .mode_valid() and .compute_config() with them.

Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240517145356.26103-5-ville.syrjala@linux.intel.com


Reviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 0c0543ff
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1435,11 +1435,13 @@ bool intel_dp_supports_fec(struct intel_dp *intel_dp,
static bool intel_dp_supports_dsc(const struct intel_connector *connector,
				  const struct intel_crtc_state *crtc_state)
{
	if (!intel_dp_has_dsc(connector))
		return false;

	if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_DP) && !crtc_state->fec_enable)
		return false;

	return intel_dsc_source_support(crtc_state) &&
		drm_dp_sink_supports_dsc(connector->dp.dsc_dpcd);
	return intel_dsc_source_support(crtc_state);
}

static int intel_dp_hdmi_compute_bpc(struct intel_dp *intel_dp,