From ae25660f354015b765d824a686875a0e5757ed9f Mon Sep 17 00:00:00 2001 From: Zheng Yang Date: Mon, 27 Mar 2017 11:32:45 +0800 Subject: [PATCH] drm: bridge/dw_hdmi: check is_hdmi2 in hdmi_config_AVI If a display support HDMI2.0, it must support SCDC or YCbCr420. So we check the connector->scdc_present and mode->flags to check the connected display is HDMI 2.0. Change-Id: I3b868d43791089fcdef77f99ec90396553008b9a Signed-off-by: Zheng Yang --- drivers/gpu/drm/bridge/dw-hdmi.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/dw-hdmi.c b/drivers/gpu/drm/bridge/dw-hdmi.c index 334bb2863067..d8593bce4e15 100644 --- a/drivers/gpu/drm/bridge/dw-hdmi.c +++ b/drivers/gpu/drm/bridge/dw-hdmi.c @@ -1274,9 +1274,13 @@ static void hdmi_config_AVI(struct dw_hdmi *hdmi, struct drm_display_mode *mode) { struct hdmi_avi_infoframe frame; u8 val; + bool is_hdmi2 = false; + if ((mode->flags & DRM_MODE_FLAG_420_MASK) || + hdmi->connector.scdc_present) + is_hdmi2 = true; /* Initialise info frame from DRM mode */ - drm_hdmi_avi_infoframe_from_display_mode(&frame, mode, false); + drm_hdmi_avi_infoframe_from_display_mode(&frame, mode, is_hdmi2); if (hdmi->hdmi_data.enc_out_format == YCBCR444) frame.colorspace = HDMI_COLORSPACE_YUV444; -- 2.34.1