Commit f4fdf376 authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915/hdmi: Unify "4:2:0 also" logic between .mode_valid() and .compute_config()

Currently .mode_valid() and .compute_config() have their "4:2:0 also"
logic inverted. Unify things so that we use the same logic on both
sides.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211015133921.4609-5-ville.syrjala@linux.intel.comReviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
parent 59908256
...@@ -2179,12 +2179,13 @@ static int intel_hdmi_compute_output_format(struct intel_encoder *encoder, ...@@ -2179,12 +2179,13 @@ static int intel_hdmi_compute_output_format(struct intel_encoder *encoder,
ret = intel_hdmi_compute_clock(encoder, crtc_state); ret = intel_hdmi_compute_clock(encoder, crtc_state);
if (ret) { if (ret) {
if (!intel_hdmi_is_ycbcr420(crtc_state) && if (intel_hdmi_is_ycbcr420(crtc_state) ||
connector->ycbcr_420_allowed && !connector->ycbcr_420_allowed ||
drm_mode_is_420_also(&connector->display_info, adjusted_mode)) { !drm_mode_is_420_also(&connector->display_info, adjusted_mode))
crtc_state->output_format = INTEL_OUTPUT_FORMAT_YCBCR420; return ret;
ret = intel_hdmi_compute_clock(encoder, crtc_state);
} crtc_state->output_format = INTEL_OUTPUT_FORMAT_YCBCR420;
ret = intel_hdmi_compute_clock(encoder, crtc_state);
} }
return ret; return ret;
......
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