Skip to content

Commit 5a1527e

Browse files
committed
drm/i915/mst: Check intel_dp_joiner_needs_dsc()
intel_dp_mst_compute_config() is missing the "does the joiner need DSC?" check despite claiming to have a lot of other joiner/dsc stuff in there (albeit disabled). Replicate the logic from the SST side. TODO: refactor all this duplicated code! Tested-by: Vidya Srinivas <vidya.srinivas@intel.com> Reviewed-by: Uma Shankar <uma.shankar@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240404213441.17637-10-ville.syrjala@linux.intel.com
1 parent aa09940 commit 5a1527e

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ static int intel_dp_mst_compute_config(struct intel_encoder *encoder,
532532
const struct drm_display_mode *adjusted_mode =
533533
&pipe_config->hw.adjusted_mode;
534534
struct link_config_limits limits;
535-
bool dsc_needed;
535+
bool dsc_needed, joiner_needs_dsc;
536536
int ret = 0;
537537

538538
if (pipe_config->fec_enable &&
@@ -546,7 +546,9 @@ static int intel_dp_mst_compute_config(struct intel_encoder *encoder,
546546
pipe_config->output_format = INTEL_OUTPUT_FORMAT_RGB;
547547
pipe_config->has_pch_encoder = false;
548548

549-
dsc_needed = intel_dp->force_dsc_en ||
549+
joiner_needs_dsc = intel_dp_joiner_needs_dsc(dev_priv, pipe_config->bigjoiner_pipes);
550+
551+
dsc_needed = joiner_needs_dsc || intel_dp->force_dsc_en ||
550552
!intel_dp_mst_compute_config_limits(intel_dp,
551553
connector,
552554
pipe_config,
@@ -566,8 +568,8 @@ static int intel_dp_mst_compute_config(struct intel_encoder *encoder,
566568

567569
/* enable compression if the mode doesn't fit available BW */
568570
if (dsc_needed) {
569-
drm_dbg_kms(&dev_priv->drm, "Try DSC (fallback=%s, force=%s)\n",
570-
str_yes_no(ret),
571+
drm_dbg_kms(&dev_priv->drm, "Try DSC (fallback=%s, joiner=%s, force=%s)\n",
572+
str_yes_no(ret), str_yes_no(joiner_needs_dsc),
571573
str_yes_no(intel_dp->force_dsc_en));
572574

573575
if (!intel_dp_mst_dsc_source_support(pipe_config))

0 commit comments

Comments
 (0)