From 73d0b88323d937d593d0ee59892a13402a20b7c2 Mon Sep 17 00:00:00 2001 From: Huicong Xu Date: Tue, 23 Jan 2018 16:45:34 +0800 Subject: [PATCH] drm: bridge: dw-hdmi: fix wrong color if get edid error at bootup if get edid error at bootup the input bus format will be set as rgb and hdmi is no reinit, so hdmi color will be wrong if set yuv in uboot, now reinit hdmi in this case. Change-Id: I8d117b6e241079ceab44793f6566adf91e9d84c6 Signed-off-by: Huicong Xu --- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c index c592a7a030a1..651034c0cf84 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c @@ -2409,6 +2409,9 @@ dw_hdmi_connector_atomic_flush(struct drm_connector *connector, connector); struct drm_display_mode *mode = NULL; void *data = hdmi->plat_data->phy_data; + unsigned int in_bus_format = hdmi->hdmi_data.enc_in_bus_format; + unsigned int out_bus_format = hdmi->hdmi_data.enc_out_bus_format; + if (!hdmi->hpd_state || !conn_state->crtc) return; @@ -2439,7 +2442,11 @@ dw_hdmi_connector_atomic_flush(struct drm_connector *connector, hdmi->hdmi_data.video_mode.previous_pixelclock = mode->clock; hdmi->hdmi_data.video_mode.previous_tmdsclock = mode->clock; hdmi->phy.enabled = true; - return; + if (in_bus_format != hdmi->hdmi_data.enc_in_bus_format || + out_bus_format != hdmi->hdmi_data.enc_out_bus_format) + hdmi->hdmi_data.update = true; + else + return; } if (hdmi->hdmi_data.update) {