From: Zheng Yang Date: Mon, 27 Mar 2017 03:32:45 +0000 (+0800) Subject: drm: bridge/dw_hdmi: check is_hdmi2 in hdmi_config_AVI X-Git-Tag: firefly_0821_release~199 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ae25660f354015b765d824a686875a0e5757ed9f;p=firefly-linux-kernel-4.4.55.git 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 --- 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;