Skip to content

Commit 11a33d6

Browse files
committed
drm/i915/dp: Pass only the required DSC DPCD to intel_dp_sink_dsc_version_minor()
intel_dp_sink_dsc_version_minor() only requires the DSC DPCD, so pass only this to the function. Reviewed-by: Ville Syrjälä <[email protected]> Signed-off-by: Imre Deak <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 6a60a8f commit 11a33d6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1608,9 +1608,9 @@ static int intel_dp_source_dsc_version_minor(struct drm_i915_private *i915)
16081608
return DISPLAY_VER(i915) >= 14 ? 2 : 1;
16091609
}
16101610

1611-
static int intel_dp_sink_dsc_version_minor(struct intel_dp *intel_dp)
1611+
static int intel_dp_sink_dsc_version_minor(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE])
16121612
{
1613-
return (intel_dp->dsc_dpcd[DP_DSC_REV - DP_DSC_SUPPORT] & DP_DSC_MINOR_MASK) >>
1613+
return (dsc_dpcd[DP_DSC_REV - DP_DSC_SUPPORT] & DP_DSC_MINOR_MASK) >>
16141614
DP_DSC_MINOR_SHIFT;
16151615
}
16161616

@@ -1665,7 +1665,7 @@ static int intel_dp_dsc_compute_params(struct intel_encoder *encoder,
16651665
DP_DSC_MAJOR_MASK) >> DP_DSC_MAJOR_SHIFT;
16661666
vdsc_cfg->dsc_version_minor =
16671667
min(intel_dp_source_dsc_version_minor(i915),
1668-
intel_dp_sink_dsc_version_minor(intel_dp));
1668+
intel_dp_sink_dsc_version_minor(intel_dp->dsc_dpcd));
16691669
if (vdsc_cfg->convert_rgb)
16701670
vdsc_cfg->convert_rgb =
16711671
intel_dp->dsc_dpcd[DP_DSC_DEC_COLOR_FORMAT_CAP - DP_DSC_SUPPORT] &
@@ -1707,7 +1707,7 @@ static bool intel_dp_dsc_supports_format(struct intel_dp *intel_dp,
17071707
break;
17081708
case INTEL_OUTPUT_FORMAT_YCBCR420:
17091709
if (min(intel_dp_source_dsc_version_minor(i915),
1710-
intel_dp_sink_dsc_version_minor(intel_dp)) < 2)
1710+
intel_dp_sink_dsc_version_minor(intel_dp->dsc_dpcd)) < 2)
17111711
return false;
17121712
sink_dsc_format = DP_DSC_YCbCr420_Native;
17131713
break;

0 commit comments

Comments
 (0)