Commit 0d8665e0 authored by Imre Deak's avatar Imre Deak

drm/i915/dp: Use connector DSC DPCD in intel_dp_supports_dsc()

Use the connector's DSC DPCD capabilities in intel_dp_supports_dsc().
Reviewed-by: default avatarStanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231006133727.1822579-9-imre.deak@intel.com
parent 987c945a
...@@ -1377,14 +1377,14 @@ static bool intel_dp_supports_fec(struct intel_dp *intel_dp, ...@@ -1377,14 +1377,14 @@ static bool intel_dp_supports_fec(struct intel_dp *intel_dp,
drm_dp_sink_supports_fec(connector->dp.fec_capability); drm_dp_sink_supports_fec(connector->dp.fec_capability);
} }
static bool intel_dp_supports_dsc(struct intel_dp *intel_dp, static bool intel_dp_supports_dsc(const struct intel_connector *connector,
const struct intel_crtc_state *crtc_state) const struct intel_crtc_state *crtc_state)
{ {
if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_DP) && !crtc_state->fec_enable) if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_DP) && !crtc_state->fec_enable)
return false; return false;
return intel_dsc_source_support(crtc_state) && return intel_dsc_source_support(crtc_state) &&
drm_dp_sink_supports_dsc(intel_dp->dsc_dpcd); drm_dp_sink_supports_dsc(connector->dp.dsc_dpcd);
} }
static int intel_dp_hdmi_compute_bpc(struct intel_dp *intel_dp, static int intel_dp_hdmi_compute_bpc(struct intel_dp *intel_dp,
...@@ -2120,7 +2120,7 @@ int intel_dp_dsc_compute_config(struct intel_dp *intel_dp, ...@@ -2120,7 +2120,7 @@ int intel_dp_dsc_compute_config(struct intel_dp *intel_dp,
pipe_config->fec_enable = !intel_dp_is_edp(intel_dp) && pipe_config->fec_enable = !intel_dp_is_edp(intel_dp) &&
intel_dp_supports_fec(intel_dp, connector, pipe_config); intel_dp_supports_fec(intel_dp, connector, pipe_config);
if (!intel_dp_supports_dsc(intel_dp, pipe_config)) if (!intel_dp_supports_dsc(connector, pipe_config))
return -EINVAL; return -EINVAL;
if (!intel_dp_dsc_supports_format(intel_dp, pipe_config->output_format)) if (!intel_dp_dsc_supports_format(intel_dp, pipe_config->output_format))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment