]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/i915/dp: Pass connector DSC DPCD to drm_dp_dsc_sink_supported_input_bpcs()
authorImre Deak <imre.deak@intel.com>
Fri, 6 Oct 2023 13:37:18 +0000 (16:37 +0300)
committerImre Deak <imre.deak@intel.com>
Mon, 16 Oct 2023 14:01:17 +0000 (17:01 +0300)
Use the connector's DSC DPCD capabilities in
drm_dp_dsc_sink_supported_input_bpcs().

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231006133727.1822579-11-imre.deak@intel.com
drivers/gpu/drm/i915/display/intel_dp.c
drivers/gpu/drm/i915/display/intel_dp_mst.c

index 2eb7645410aff488b41bab871294c997b6663b32..33de923e584ddb50f751bb0df55d2b217ef7fe0e 100644 (file)
@@ -2037,7 +2037,7 @@ static int intel_dp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp,
         * Get the maximum DSC bpc that will be supported by any valid
         * link configuration and compressed bpp.
         */
-       num_bpc = drm_dp_dsc_sink_supported_input_bpcs(intel_dp->dsc_dpcd, dsc_bpc);
+       num_bpc = drm_dp_dsc_sink_supported_input_bpcs(connector->dp.dsc_dpcd, dsc_bpc);
        for (i = 0; i < num_bpc; i++) {
                pipe_bpp = dsc_bpc[i] * 3;
                if (pipe_bpp < dsc_min_bpp)
index 3ff429c30f3003543151e0e55ee06575aa4e0614..303734ab7ef4e637b89cf472f06b7989b0ddaa3a 100644 (file)
@@ -185,8 +185,6 @@ static int intel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder,
                                                struct drm_connector_state *conn_state,
                                                struct link_config_limits *limits)
 {
-       struct intel_dp_mst_encoder *intel_mst = enc_to_mst(encoder);
-       struct intel_dp *intel_dp = &intel_mst->primary->dp;
        struct intel_connector *connector =
                to_intel_connector(conn_state->connector);
        struct drm_i915_private *i915 = to_i915(connector->base.dev);
@@ -209,7 +207,7 @@ static int intel_dp_dsc_mst_compute_link_config(struct intel_encoder *encoder,
        max_bpp = min_t(u8, dsc_max_bpc * 3, limits->pipe.max_bpp);
        min_bpp = limits->pipe.min_bpp;
 
-       num_bpc = drm_dp_dsc_sink_supported_input_bpcs(intel_dp->dsc_dpcd,
+       num_bpc = drm_dp_dsc_sink_supported_input_bpcs(connector->dp.dsc_dpcd,
                                                       dsc_bpc);
 
        drm_dbg_kms(&i915->drm, "DSC Source supported min bpp %d max bpp %d\n",