diff options
| author | Ujwal Patel <ujwalp@codeaurora.org> | 2012-12-12 12:52:18 -0800 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 20:13:37 -0700 |
| commit | c0120c986a2df327a787a348199358bc8302f8a2 (patch) | |
| tree | 998c2b2b8e13668f8c6fc238e35895924d7c5e90 /drivers/video/fbdev | |
| parent | 5688faebd92ac1ca8f6b79a2e0e548cfe70a8190 (diff) | |
mdss: hdmi: Fix suspend/resume watchdog crash during HDMI mirroring
During device suspend, HDMI driver holds MDSS suspend context until
audio is turned off. Continuous polling for audio off results in
unnecessary delay in MDSS suspend as well as watchdog crash. To fix this
enable/disable MDSS GDSC regulator during HDMI hpd on/off. This will
make HDMI independent of MDSS module in terms of register accesses. Also
increase the sleep time between consecutive poll reads in order to
prevent watchdog crash.
CRs-Fixed: 425536
Change-Id: I7969f0ed8bcce4a356ee6a1e29ed2af76dd345ef
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
Diffstat (limited to 'drivers/video/fbdev')
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_hdmi_tx.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/video/fbdev/msm/mdss_hdmi_tx.c b/drivers/video/fbdev/msm/mdss_hdmi_tx.c index 4f71fc675aab..3d6edfd45eb2 100644 --- a/drivers/video/fbdev/msm/mdss_hdmi_tx.c +++ b/drivers/video/fbdev/msm/mdss_hdmi_tx.c @@ -1753,7 +1753,7 @@ static int hdmi_tx_audio_setup(struct hdmi_tx_ctrl *hdmi_ctrl) static void hdmi_tx_audio_off(struct hdmi_tx_ctrl *hdmi_ctrl) { - u32 i, status, max_reads, timeout_us, timeout_sec = 15; + u32 i, status, sleep_us, timeout_us, timeout_sec = 15; struct dss_io_data *io = NULL; if (!hdmi_ctrl) { @@ -1770,12 +1770,12 @@ static void hdmi_tx_audio_off(struct hdmi_tx_ctrl *hdmi_ctrl) /* Check if audio engine is turned off by QDSP or not */ /* send off notification after every 1 sec for 15 seconds */ for (i = 0; i < timeout_sec; i++) { - max_reads = 500; - timeout_us = 1000 * 2; + sleep_us = 5000; /* Maximum time to sleep between two reads */ + timeout_us = 1000 * 1000; /* Total time for condition to meet */ - if (readl_poll_timeout_noirq((io->base + HDMI_AUDIO_CFG), + if (readl_poll_timeout((io->base + HDMI_AUDIO_CFG), status, ((status & BIT(0)) == 0), - max_reads, timeout_us)) { + sleep_us, timeout_us)) { DEV_ERR("%s: audio still on after %d sec. try again\n", __func__, i+1); @@ -2383,9 +2383,6 @@ static int hdmi_tx_panel_event_handler(struct mdss_panel_data *panel_data, break; case MDSS_EVENT_TIMEGEN_OFF: - /* If a power off is already underway, wait for it to finish */ - if (hdmi_ctrl->panel_suspend) - flush_work_sync(&hdmi_ctrl->power_off_work); break; case MDSS_EVENT_CLOSE: |
