drm/rockchip: dw-hdmi: Set 4K x 2k 60Hz/50Hz color to YUV420 if tmdsclk over the limit

When 4K x 2k 60Hz/50Hz tmds clock is above the max tmds clock, setting its
color to YUV420. A few TV edid declare that they can't support
4K x 2k 60Hz/50Hz YUV420, we still set color to YUV420 or 4K x 2k 60Hz/50Hz
tmds clock will over the limit.

Change-Id: Id57c9313ab52973927c578d0eb2a7b1b30cb9ec1
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
This commit is contained in:
Algea Cao
2018-05-30 17:28:50 +08:00
committed by Tao Huang
parent 131b1dd6a1
commit c1f9ea51ed

View File

@@ -668,11 +668,11 @@ dw_hdmi_rockchip_select_output(struct drm_connector_state *conn_state,
if (max_tmds_clock >= 594000) {
*color_depth = 8;
} else if (max_tmds_clock > 340000) {
if (drm_mode_is_420(info, mode))
if (drm_mode_is_420(info, mode) || tmdsclock >= 594000)
*color_format = DRM_HDMI_OUTPUT_YCBCR420;
} else {
*color_depth = 8;
if (drm_mode_is_420(info, mode))
if (drm_mode_is_420(info, mode) || tmdsclock >= 594000)
*color_format = DRM_HDMI_OUTPUT_YCBCR420;
}
}