Skip to content

Commit 926b726

Browse files
committed
drm/i915/dp: Use connector DSC DPCD in intel_dp_dsc_supports_format()
Use the connector's DSC DPCD capabilities in intel_dp_dsc_supports_format(). 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 2c4907c commit 926b726

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1691,10 +1691,10 @@ static int intel_dp_dsc_compute_params(const struct intel_connector *connector,
16911691
return drm_dsc_compute_rc_parameters(vdsc_cfg);
16921692
}
16931693

1694-
static bool intel_dp_dsc_supports_format(struct intel_dp *intel_dp,
1694+
static bool intel_dp_dsc_supports_format(const struct intel_connector *connector,
16951695
enum intel_output_format output_format)
16961696
{
1697-
struct drm_i915_private *i915 = dp_to_i915(intel_dp);
1697+
struct drm_i915_private *i915 = to_i915(connector->base.dev);
16981698
u8 sink_dsc_format;
16991699

17001700
switch (output_format) {
@@ -1706,15 +1706,15 @@ static bool intel_dp_dsc_supports_format(struct intel_dp *intel_dp,
17061706
break;
17071707
case INTEL_OUTPUT_FORMAT_YCBCR420:
17081708
if (min(intel_dp_source_dsc_version_minor(i915),
1709-
intel_dp_sink_dsc_version_minor(intel_dp->dsc_dpcd)) < 2)
1709+
intel_dp_sink_dsc_version_minor(connector->dp.dsc_dpcd)) < 2)
17101710
return false;
17111711
sink_dsc_format = DP_DSC_YCbCr420_Native;
17121712
break;
17131713
default:
17141714
return false;
17151715
}
17161716

1717-
return drm_dp_dsc_sink_supports_format(intel_dp->dsc_dpcd, sink_dsc_format);
1717+
return drm_dp_dsc_sink_supports_format(connector->dp.dsc_dpcd, sink_dsc_format);
17181718
}
17191719

17201720
static bool is_bw_sufficient_for_dsc_config(u16 compressed_bpp, u32 link_clock,
@@ -2124,7 +2124,7 @@ int intel_dp_dsc_compute_config(struct intel_dp *intel_dp,
21242124
if (!intel_dp_supports_dsc(connector, pipe_config))
21252125
return -EINVAL;
21262126

2127-
if (!intel_dp_dsc_supports_format(intel_dp, pipe_config->output_format))
2127+
if (!intel_dp_dsc_supports_format(connector, pipe_config->output_format))
21282128
return -EINVAL;
21292129

21302130
/*

0 commit comments

Comments
 (0)