summaryrefslogtreecommitdiff
path: root/drivers/video/tegra/dc/dc.c
diff options
context:
space:
mode:
authorAdam Jiang <chaoj@nvidia.com>2012-03-08 21:34:53 +0900
committerRohan Somvanshi <rsomvanshi@nvidia.com>2012-04-04 09:19:27 -0700
commitd0b210bd39f43799bae7f4ea8ca2e71d4ac47f2b (patch)
tree8deb2fe9f6da634613c2c7f67bf63864f5f99818 /drivers/video/tegra/dc/dc.c
parent3b693812e9c606561b92d665d2eb676616e27ac4 (diff)
dc: enabled recovery from resetting
Enabled recovery of DC from resetting. When underflow triggered serveral times(current > 4 for tegra2), DC driver will reset itself to prevent data corruption. Reopend nvhost connection when resetting finished. That helps system to show frames instead of a blank screen again. Fixed Bug 936613 Change-Id: I314c37258a4a446dc07167ac60d0420e79a5fb2d Signed-off-by: Adam Jiang <chaoj@nvidia.com> Reviewed-on: http://git-master/r/89406 Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Diffstat (limited to 'drivers/video/tegra/dc/dc.c')
-rw-r--r--drivers/video/tegra/dc/dc.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/video/tegra/dc/dc.c b/drivers/video/tegra/dc/dc.c
index 8b3bf04..113e64c 100644
--- a/drivers/video/tegra/dc/dc.c
+++ b/drivers/video/tegra/dc/dc.c
@@ -2101,8 +2101,11 @@ static void tegra_dc_underflow_handler(struct tegra_dc *dc)
dc->windows[i].underflows++;
#ifdef CONFIG_ARCH_TEGRA_2x_SOC
- if (dc->windows[i].underflows > 4)
+ if (dc->windows[i].underflows > 4) {
schedule_work(&dc->reset_work);
+ /* reset counter */
+ dc->windows[i].underflows = 0;
+ }
#endif
} else {
dc->windows[i].underflows = 0;
@@ -2734,6 +2737,13 @@ static void tegra_dc_reset_worker(struct work_struct *work)
_tegra_dc_controller_reset_enable(dc);
dc->enabled = true;
+
+ /* reopen host read bus */
+ val = tegra_dc_readl(dc, DC_CMD_CONT_SYNCPT_VSYNC);
+ val &= ~(0x00000100);
+ val |= 0x100;
+ tegra_dc_writel(dc, val, DC_CMD_CONT_SYNCPT_VSYNC);
+
unlock:
mutex_unlock(&dc->lock);
mutex_unlock(&shared_lock);