Skip to content

Commit 6a60a8f

Browse files
committed
drm/i915/dp: Pass only the required i915 to intel_dp_source_dsc_version_minor()
intel_dp_source_dsc_version_minor() only requires the i915 pointer, 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 cc81951 commit 6a60a8f

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1603,10 +1603,8 @@ int intel_dp_dsc_compute_max_bpp(const struct intel_connector *connector,
16031603
return 0;
16041604
}
16051605

1606-
static int intel_dp_source_dsc_version_minor(struct intel_dp *intel_dp)
1606+
static int intel_dp_source_dsc_version_minor(struct drm_i915_private *i915)
16071607
{
1608-
struct drm_i915_private *i915 = dp_to_i915(intel_dp);
1609-
16101608
return DISPLAY_VER(i915) >= 14 ? 2 : 1;
16111609
}
16121610

@@ -1666,7 +1664,7 @@ static int intel_dp_dsc_compute_params(struct intel_encoder *encoder,
16661664
(intel_dp->dsc_dpcd[DP_DSC_REV - DP_DSC_SUPPORT] &
16671665
DP_DSC_MAJOR_MASK) >> DP_DSC_MAJOR_SHIFT;
16681666
vdsc_cfg->dsc_version_minor =
1669-
min(intel_dp_source_dsc_version_minor(intel_dp),
1667+
min(intel_dp_source_dsc_version_minor(i915),
16701668
intel_dp_sink_dsc_version_minor(intel_dp));
16711669
if (vdsc_cfg->convert_rgb)
16721670
vdsc_cfg->convert_rgb =
@@ -1697,6 +1695,7 @@ static int intel_dp_dsc_compute_params(struct intel_encoder *encoder,
16971695
static bool intel_dp_dsc_supports_format(struct intel_dp *intel_dp,
16981696
enum intel_output_format output_format)
16991697
{
1698+
struct drm_i915_private *i915 = dp_to_i915(intel_dp);
17001699
u8 sink_dsc_format;
17011700

17021701
switch (output_format) {
@@ -1707,7 +1706,7 @@ static bool intel_dp_dsc_supports_format(struct intel_dp *intel_dp,
17071706
sink_dsc_format = DP_DSC_YCbCr444;
17081707
break;
17091708
case INTEL_OUTPUT_FORMAT_YCBCR420:
1710-
if (min(intel_dp_source_dsc_version_minor(intel_dp),
1709+
if (min(intel_dp_source_dsc_version_minor(i915),
17111710
intel_dp_sink_dsc_version_minor(intel_dp)) < 2)
17121711
return false;
17131712
sink_dsc_format = DP_DSC_YCbCr420_Native;

0 commit comments

Comments
 (0)