Skip to content

Commit a92e390

Browse files
ideakjlahtine-intel
authored andcommitted
drm/i915/dp_mst: Use the correct connector while computing the link BPP limit on MST
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 <[email protected]> Fixes: 1c5b72d ("drm/i915/dp: Set the DSC link limits in intel_dp_compute_config_link_bpp_limits") Reviewed-by: Ankit Nautiyal <[email protected]> Reviewed-by: Luca Coelho <[email protected]> Signed-off-by: Imre Deak <[email protected]> Link: https://lore.kernel.org/r/[email protected] (cherry picked from commit 266e2fc) Signed-off-by: Joonas Lahtinen <[email protected]>
1 parent 1faeeb3 commit a92e390

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

drivers/gpu/drm/i915/display/intel_dp.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2524,6 +2524,7 @@ intel_dp_dsc_compute_pipe_bpp_limits(struct intel_dp *intel_dp,
25242524

25252525
bool
25262526
intel_dp_compute_config_limits(struct intel_dp *intel_dp,
2527+
struct intel_connector *connector,
25272528
struct intel_crtc_state *crtc_state,
25282529
bool respect_downstream_limits,
25292530
bool dsc,
@@ -2577,7 +2578,7 @@ intel_dp_compute_config_limits(struct intel_dp *intel_dp,
25772578
intel_dp_test_compute_config(intel_dp, crtc_state, limits);
25782579

25792580
return intel_dp_compute_config_link_bpp_limits(intel_dp,
2580-
intel_dp->attached_connector,
2581+
connector,
25812582
crtc_state,
25822583
dsc,
25832584
limits);
@@ -2638,7 +2639,7 @@ intel_dp_compute_link_config(struct intel_encoder *encoder,
26382639
joiner_needs_dsc = intel_dp_joiner_needs_dsc(display, num_joined_pipes);
26392640

26402641
dsc_needed = joiner_needs_dsc || intel_dp->force_dsc_en ||
2641-
!intel_dp_compute_config_limits(intel_dp, pipe_config,
2642+
!intel_dp_compute_config_limits(intel_dp, connector, pipe_config,
26422643
respect_downstream_limits,
26432644
false,
26442645
&limits);
@@ -2672,7 +2673,7 @@ intel_dp_compute_link_config(struct intel_encoder *encoder,
26722673
str_yes_no(ret), str_yes_no(joiner_needs_dsc),
26732674
str_yes_no(intel_dp->force_dsc_en));
26742675

2675-
if (!intel_dp_compute_config_limits(intel_dp, pipe_config,
2676+
if (!intel_dp_compute_config_limits(intel_dp, connector, pipe_config,
26762677
respect_downstream_limits,
26772678
true,
26782679
&limits))

drivers/gpu/drm/i915/display/intel_dp.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ void intel_dp_wait_source_oui(struct intel_dp *intel_dp);
194194
int intel_dp_output_bpp(enum intel_output_format output_format, int bpp);
195195

196196
bool intel_dp_compute_config_limits(struct intel_dp *intel_dp,
197+
struct intel_connector *connector,
197198
struct intel_crtc_state *crtc_state,
198199
bool respect_downstream_limits,
199200
bool dsc,

drivers/gpu/drm/i915/display/intel_dp_mst.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -599,12 +599,13 @@ adjust_limits_for_dsc_hblank_expansion_quirk(struct intel_dp *intel_dp,
599599

600600
static bool
601601
mst_stream_compute_config_limits(struct intel_dp *intel_dp,
602-
const struct intel_connector *connector,
602+
struct intel_connector *connector,
603603
struct intel_crtc_state *crtc_state,
604604
bool dsc,
605605
struct link_config_limits *limits)
606606
{
607-
if (!intel_dp_compute_config_limits(intel_dp, crtc_state, false, dsc,
607+
if (!intel_dp_compute_config_limits(intel_dp, connector,
608+
crtc_state, false, dsc,
608609
limits))
609610
return false;
610611

0 commit comments

Comments
 (0)