From dd37ccac7ff7f121cdd7722b7f59449b259ff964 Mon Sep 17 00:00:00 2001 From: Algea Cao Date: Wed, 21 Mar 2018 14:02:15 +0800 Subject: [PATCH] drm/bridge: synopsys: dw-hdmi: Update criteria to determine whether uboot logo is on If hdmi plug in when kernel starting, hdmi may be without output. Because the old criteria that to determine whether uboot logo is on is hdmi phy pll locked and hdmi is connected. But in some platform(such as rk3229), hdmi phy pll is locked even hdmi phy is power down. In this case, the old criteria is unreliable. So we add a new criteria that check Frame Composer register.If the register value is not 0, we think that uboot logo is on, hdmi has been setup. Change-Id: Ifaa27030e5f5d551bec8f971694ff5d9c34a7c1d Signed-off-by: Algea Cao --- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c index 5ab3d816cc6e..91a747d57cc7 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c @@ -3609,7 +3609,8 @@ int dw_hdmi_bind(struct device *dev, struct device *master, hdmi->phy.name); ret = hdmi_readb(hdmi, HDMI_PHY_STAT0); - if ((ret & HDMI_PHY_TX_PHY_LOCK) && (ret & HDMI_PHY_HPD)) { + if ((ret & HDMI_PHY_TX_PHY_LOCK) && (ret & HDMI_PHY_HPD) && + hdmi_readb(hdmi, HDMI_FC_EXCTRLDUR)) { hdmi->mc_clkdis = hdmi_readb(hdmi, HDMI_MC_CLKDIS); hdmi->disabled = false; hdmi->bridge_is_on = true;