]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/i915/dp_mst: Use the correct connector while computing the link BPP limit on MST
authorImre Deak <imre.deak@intel.com>
Fri, 9 May 2025 18:03:28 +0000 (21:03 +0300)
committerJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
Tue, 13 May 2025 13:38:41 +0000 (16:38 +0300)
Atm, on an MST link in DSC mode
intel_dp_compute_config_link_bpp_limits() calculates the maximum link
bpp limit using the MST root connector's DSC capabilities. That's not
correct in general: the decompression could be performed by a branch
device downstream of the root branch device or the sink itself.

Fix the above by passing to intel_dp_compute_config_link_bpp_limits()
the actual connector being modeset, containing the correct DSC
capabilities.

Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Fixes: 1c5b72daff46 ("drm/i915/dp: Set the DSC link limits in intel_dp_compute_config_link_bpp_limits")
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Reviewed-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://lore.kernel.org/r/20250509180340.554867-2-imre.deak@intel.com
(cherry picked from commit 266e2fcfe2ea0d062ea392cd22f6250ae0d11c04)
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.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 593b29b56714a7064f2093de8a49d40e5bc9c198..ad1e4fc9c7fe369bec7353aa85ef290c2232c220 100644 (file)
@@ -2524,6 +2524,7 @@ intel_dp_dsc_compute_pipe_bpp_limits(struct intel_dp *intel_dp,
 
 bool
 intel_dp_compute_config_limits(struct intel_dp *intel_dp,
+                              struct intel_connector *connector,
                               struct intel_crtc_state *crtc_state,
                               bool respect_downstream_limits,
                               bool dsc,
@@ -2577,7 +2578,7 @@ intel_dp_compute_config_limits(struct intel_dp *intel_dp,
        intel_dp_test_compute_config(intel_dp, crtc_state, limits);
 
        return intel_dp_compute_config_link_bpp_limits(intel_dp,
-                                                      intel_dp->attached_connector,
+                                                      connector,
                                                       crtc_state,
                                                       dsc,
                                                       limits);
@@ -2638,7 +2639,7 @@ intel_dp_compute_link_config(struct intel_encoder *encoder,
        joiner_needs_dsc = intel_dp_joiner_needs_dsc(display, num_joined_pipes);
 
        dsc_needed = joiner_needs_dsc || intel_dp->force_dsc_en ||
-                    !intel_dp_compute_config_limits(intel_dp, pipe_config,
+                    !intel_dp_compute_config_limits(intel_dp, connector, pipe_config,
                                                     respect_downstream_limits,
                                                     false,
                                                     &limits);
@@ -2672,7 +2673,7 @@ intel_dp_compute_link_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_compute_config_limits(intel_dp, pipe_config,
+               if (!intel_dp_compute_config_limits(intel_dp, connector, pipe_config,
                                                    respect_downstream_limits,
                                                    true,
                                                    &limits))
index a7cc10800e0b42ecd888db2f3ff63a755b6cab73..742ae26ac4a9a9adef98856f55f5087e2b41c197 100644 (file)
@@ -194,6 +194,7 @@ void intel_dp_wait_source_oui(struct intel_dp *intel_dp);
 int intel_dp_output_bpp(enum intel_output_format output_format, int bpp);
 
 bool intel_dp_compute_config_limits(struct intel_dp *intel_dp,
+                                   struct intel_connector *connector,
                                    struct intel_crtc_state *crtc_state,
                                    bool respect_downstream_limits,
                                    bool dsc,
index aeda59f5fa7a47dc0e5658fb0795e55dbe9d7c22..c1fd6aceec2c0deafb5a62c5509d44917de8163f 100644 (file)
@@ -599,12 +599,13 @@ adjust_limits_for_dsc_hblank_expansion_quirk(struct intel_dp *intel_dp,
 
 static bool
 mst_stream_compute_config_limits(struct intel_dp *intel_dp,
-                                const struct intel_connector *connector,
+                                struct intel_connector *connector,
                                 struct intel_crtc_state *crtc_state,
                                 bool dsc,
                                 struct link_config_limits *limits)
 {
-       if (!intel_dp_compute_config_limits(intel_dp, crtc_state, false, dsc,
+       if (!intel_dp_compute_config_limits(intel_dp, connector,
+                                           crtc_state, false, dsc,
                                            limits))
                return false;