summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/display/intel_dp.c
diff options
context:
space:
mode:
authorImre Deak <imre.deak@intel.com>2023-10-06 16:37:20 +0300
committerImre Deak <imre.deak@intel.com>2023-10-16 17:01:25 +0300
commit11a33d6b265faf898ae591a535b65fe9ca0eb532 (patch)
tree0061706e30ba39cabece4dd87ba0448ef0f7c8bb /drivers/gpu/drm/i915/display/intel_dp.c
parent6a60a8fa7c3af598885a554d1966ec0723ed39a6 (diff)
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ä <ville.syrjala@linux.intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231006133727.1822579-13-imre.deak@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/display/intel_dp.c')
-rw-r--r--drivers/gpu/drm/i915/display/intel_dp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 0d15e3f97dca..744c73a5a796 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -1608,9 +1608,9 @@ static int intel_dp_source_dsc_version_minor(struct drm_i915_private *i915)
return DISPLAY_VER(i915) >= 14 ? 2 : 1;
}
-static int intel_dp_sink_dsc_version_minor(struct intel_dp *intel_dp)
+static int intel_dp_sink_dsc_version_minor(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE])
{
- return (intel_dp->dsc_dpcd[DP_DSC_REV - DP_DSC_SUPPORT] & DP_DSC_MINOR_MASK) >>
+ return (dsc_dpcd[DP_DSC_REV - DP_DSC_SUPPORT] & DP_DSC_MINOR_MASK) >>
DP_DSC_MINOR_SHIFT;
}
@@ -1665,7 +1665,7 @@ static int intel_dp_dsc_compute_params(struct intel_encoder *encoder,
DP_DSC_MAJOR_MASK) >> DP_DSC_MAJOR_SHIFT;
vdsc_cfg->dsc_version_minor =
min(intel_dp_source_dsc_version_minor(i915),
- intel_dp_sink_dsc_version_minor(intel_dp));
+ intel_dp_sink_dsc_version_minor(intel_dp->dsc_dpcd));
if (vdsc_cfg->convert_rgb)
vdsc_cfg->convert_rgb =
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,
break;
case INTEL_OUTPUT_FORMAT_YCBCR420:
if (min(intel_dp_source_dsc_version_minor(i915),
- intel_dp_sink_dsc_version_minor(intel_dp)) < 2)
+ intel_dp_sink_dsc_version_minor(intel_dp->dsc_dpcd)) < 2)
return false;
sink_dsc_format = DP_DSC_YCbCr420_Native;
break;