drm: rockchip: dw-hdmi: fix rk3288 hdmi check YCbCr420 error

For platforms that do not support YCbCr420 output, it is not enough
to check only the pixel clock.

Change-Id: I0113ffb18aa4667384c621c4e80de2b68e4e8469
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
This commit is contained in:
Zheng Yang
2019-02-15 09:49:16 +08:00
committed by Tao Huang
parent c66526ad82
commit 01c37928eb

View File

@@ -488,11 +488,13 @@ dw_hdmi_rockchip_mode_valid(struct drm_connector *connector,
return MODE_BAD;
/*
* If sink max TMDS clock < 340MHz, we should check the mode pixel
* clock > 340MHz is YCbCr420 or not.
* clock > 340MHz is YCbCr420 or not and whether the platform supports
* YCbCr420.
*/
if (mode->clock > 340000 &&
connector->display_info.max_tmds_clock < 340000 &&
!drm_mode_is_420(&connector->display_info, mode))
(!drm_mode_is_420(&connector->display_info, mode) ||
!connector->ycbcr_420_allowed))
return MODE_BAD;
if (!encoder) {