From 3a61ef4874e182a852df306e49646bd2020bc4c1 Mon Sep 17 00:00:00 2001 From: Zheng Yang Date: Wed, 31 Jan 2018 18:16:12 +0800 Subject: [PATCH] drm: bridge: synopsys: update mc_clkdis in dw_hdmi_bind If vop return error when showing kernel logo, connector atomic flush will not be call, and mc_clkdis can not be updated. This patch update mc_clkdis in the dw_hdmi_bind, when phy clock is locked and HPD is connected. Change-Id: I1498d787a993961fe75236c309ecc3c898d611a4 Signed-off-by: Zheng Yang --- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c index 1f705f0d81b4..6227a3c0fce4 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c @@ -2650,7 +2650,6 @@ dw_hdmi_connector_atomic_flush(struct drm_connector *connector, if (hdmi_bus_fmt_is_yuv420(hdmi->hdmi_data.enc_out_bus_format)) vmode->mtmdsclock /= 2; - hdmi->mc_clkdis = hdmi_readb(hdmi, HDMI_MC_CLKDIS); hdmi->phy.enabled = true; hdmi->bridge_is_on = true; if (in_bus_format != hdmi->hdmi_data.enc_in_bus_format || @@ -3599,6 +3598,9 @@ int dw_hdmi_bind(struct device *dev, struct device *master, prod_id1 & HDMI_PRODUCT_ID1_HDCP ? "with" : "without", hdmi->phy.name); + ret = hdmi_readb(hdmi, HDMI_PHY_STAT0); + if (ret & (HDMI_PHY_TX_PHY_LOCK | HDMI_PHY_HPD)) + hdmi->mc_clkdis = hdmi_readb(hdmi, HDMI_MC_CLKDIS); init_hpd_work(hdmi); initialize_hdmi_ih_mutes(hdmi);