mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
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: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20211015133921.4609-5-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
@@ -2179,12 +2179,13 @@ static int intel_hdmi_compute_output_format(struct intel_encoder *encoder,
|
||||
|
||||
ret = intel_hdmi_compute_clock(encoder, crtc_state);
|
||||
if (ret) {
|
||||
if (!intel_hdmi_is_ycbcr420(crtc_state) &&
|
||||
connector->ycbcr_420_allowed &&
|
||||
drm_mode_is_420_also(&connector->display_info, adjusted_mode)) {
|
||||
crtc_state->output_format = INTEL_OUTPUT_FORMAT_YCBCR420;
|
||||
ret = intel_hdmi_compute_clock(encoder, crtc_state);
|
||||
}
|
||||
if (intel_hdmi_is_ycbcr420(crtc_state) ||
|
||||
!connector->ycbcr_420_allowed ||
|
||||
!drm_mode_is_420_also(&connector->display_info, adjusted_mode))
|
||||
return ret;
|
||||
|
||||
crtc_state->output_format = INTEL_OUTPUT_FORMAT_YCBCR420;
|
||||
ret = intel_hdmi_compute_clock(encoder, crtc_state);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user