]> www.infradead.org Git - users/willy/xarray.git/commitdiff
drm/i915: Reuse intel_dp_supports_dsc() for MST
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 17 May 2024 14:53:54 +0000 (17:53 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 14 Jun 2024 17:28:23 +0000 (20:28 +0300)
intel_dp_supports_dsc() now works for MST as well, reuse it.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240517145356.26103-6-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/display/intel_dp.c
drivers/gpu/drm/i915/display/intel_dp.h
drivers/gpu/drm/i915/display/intel_dp_mst.c

index b19ffd160bf8119c97f783a3545e4b6760a0a658..926b0beed666f38bd02b5086736e9fcf4d84b52f 100644 (file)
@@ -1432,8 +1432,8 @@ bool intel_dp_supports_fec(struct intel_dp *intel_dp,
                drm_dp_sink_supports_fec(connector->dp.fec_capability);
 }
 
-static bool intel_dp_supports_dsc(const struct intel_connector *connector,
-                                 const struct intel_crtc_state *crtc_state)
+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;
index 212fe041018c027530ddd0ed53f71512f5f875e2..a0f990a95ecca3dd759bc4762dccb96cebfb3d58 100644 (file)
@@ -171,6 +171,9 @@ bool intel_dp_supports_fec(struct intel_dp *intel_dp,
                           const struct intel_connector *connector,
                           const struct intel_crtc_state *pipe_config);
 
+bool intel_dp_supports_dsc(const struct intel_connector *connector,
+                          const struct intel_crtc_state *crtc_state);
+
 u32 intel_dp_dsc_nearest_valid_bpp(struct drm_i915_private *i915, u32 bpp, u32 pipe_bpp);
 
 void intel_ddi_update_pipe(struct intel_atomic_state *state,
index a9a07dcf3ab45b58628af1ac9fa4095c43f8a809..e1f09108f19a9674ad9903e902ace9893e7c0bfe 100644 (file)
@@ -421,18 +421,6 @@ static int intel_dp_mst_update_slots(struct intel_encoder *encoder,
        return 0;
 }
 
-static bool
-intel_dp_mst_dsc_source_support(const struct intel_crtc_state *crtc_state)
-{
-       struct drm_i915_private *i915 = to_i915(crtc_state->uapi.crtc->dev);
-
-       /*
-        * FIXME: Enabling DSC on ICL results in blank screen and FIFO pipe /
-        * transcoder underruns, re-enable DSC after fixing this issue.
-        */
-       return DISPLAY_VER(i915) >= 12 && intel_dsc_source_support(crtc_state);
-}
-
 static int mode_hblank_period_ns(const struct drm_display_mode *mode)
 {
        return DIV_ROUND_CLOSEST_ULL(mul_u32_u32(mode->htotal - mode->hdisplay,
@@ -477,7 +465,7 @@ adjust_limits_for_dsc_hblank_expansion_quirk(const struct intel_connector *conne
                return true;
 
        if (!dsc) {
-               if (intel_dp_mst_dsc_source_support(crtc_state)) {
+               if (intel_dp_supports_dsc(connector, crtc_state)) {
                        drm_dbg_kms(&i915->drm,
                                    "[CRTC:%d:%s][CONNECTOR:%d:%s] DSC needed by hblank expansion quirk\n",
                                    crtc->base.base.id, crtc->base.name,
@@ -623,7 +611,7 @@ static int intel_dp_mst_compute_config(struct intel_encoder *encoder,
                            str_yes_no(ret), str_yes_no(joiner_needs_dsc),
                            str_yes_no(intel_dp->force_dsc_en));
 
-               if (!intel_dp_mst_dsc_source_support(pipe_config))
+               if (!intel_dp_supports_dsc(connector, pipe_config))
                        return -EINVAL;
 
                if (!intel_dp_mst_compute_config_limits(intel_dp,