]> www.infradead.org Git - users/willy/xarray.git/commitdiff
drm/i915: Use intel_dp_has_dsc() during .compute_config()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 17 May 2024 14:53:53 +0000 (17:53 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 14 Jun 2024 17:26:44 +0000 (20:26 +0300)
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: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240517145356.26103-5-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/display/intel_dp.c

index 4364af21d5d8b50f25b4617e91887132cd61a556..b19ffd160bf8119c97f783a3545e4b6760a0a658 100644 (file)
@@ -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,