video: tegra: dc: Fix HDMI powergating issue
Chao Xu [Tue, 24 Sep 2013 23:14:45 +0000 (16:14 -0700)]
Setting DISPB connected state after pending HPD is handled so DC won't
powergate DIPB accidentally.

Bug 1364348

Change-Id: Ib71267a73c205d1957972d462987e8f4cb542712
Signed-off-by: Chao Xu <cxu@nvidia.com>
Reviewed-on: http://git-master/r/278533
Reviewed-by: Automatic_Commit_Validation_User
(cherry picked from commit d6bee34206954a33f3245dea13d39c35b5fb9a5f)
Signed-off-by: Ajay Nandakumar <anandakumarm@nvidia.com>

drivers/video/tegra/dc/hdmi.c

index b7c6fb7..decd31f 100644 (file)
@@ -757,8 +757,15 @@ bool tegra_dc_hdmi_mode_filter(const struct tegra_dc *dc,
 /* used by tegra_dc_probe() to detect hpd/hdmi status at boot */
 static bool tegra_dc_hdmi_detect(struct tegra_dc *dc)
 {
+       int hdmi_state;
+
        hdmi_state_machine_set_pending_hpd();
        /* result isn't used by dc */
+
+       hdmi_state = hdmi_state_machine_get_state();
+       if (hdmi_state != HDMI_STATE_DONE_DISABLED &&
+               hdmi_state != HDMI_STATE_RESET)
+               dc->connected = true;
        return true;
 }