Use the connector's DSC DPCD capabilities in
drm_dp_dsc_sink_supported_input_bpcs().

Signed-off-by: Imre Deak <imre.d...@intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp.c     | 2 +-
 drivers/gpu/drm/i915/display/intel_dp_mst.c | 4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c 
b/drivers/gpu/drm/i915/display/intel_dp.c
index ff4090a602b4b..1bb00ac655c78 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -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)
diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c 
b/drivers/gpu/drm/i915/display/intel_dp_mst.c
index 3ff429c30f300..303734ab7ef4e 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
@@ -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",
-- 
2.39.2

Reply via email to