@@ -42,6 +42,7 @@ struct hdmi {
/* video state: */
bool power_on;
+ bool phy_power_on;
unsigned long int pixclock;
void __iomem *mmio;
@@ -148,7 +148,11 @@ static void msm_hdmi_bridge_atomic_pre_enable(struct drm_bridge *bridge,
msm_hdmi_audio_update(hdmi);
}
+ if (hdmi->phy_power_on)
+ msm_hdmi_phy_powerdown(phy);
+
msm_hdmi_phy_powerup(phy, hdmi->pixclock);
+ hdmi->phy_power_on = true;
msm_hdmi_set_mode(hdmi, true);
@@ -170,6 +174,7 @@ static void msm_hdmi_bridge_atomic_post_disable(struct drm_bridge *bridge,
msm_hdmi_set_mode(hdmi, false);
msm_hdmi_phy_powerdown(phy);
+ hdmi->phy_power_on = false;
if (hdmi->power_on) {
power_off(bridge);
In preparation to converting MSM HDMI driver to use PHY framework, which requires phy_power_on() calls to be paired with phy_power_off(), add a conditional call to msm_hdmi_phy_powerdown() before the call to msm_hdmi_phy_powerup(). Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> --- drivers/gpu/drm/msm/hdmi/hdmi.h | 1 + drivers/gpu/drm/msm/hdmi/hdmi_bridge.c | 5 +++++ 2 files changed, 6 insertions(+)