summaryrefslogtreecommitdiff
path: root/drivers/video/tegra/dc/dc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/tegra/dc/dc.c')
-rw-r--r--drivers/video/tegra/dc/dc.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/drivers/video/tegra/dc/dc.c b/drivers/video/tegra/dc/dc.c
index da439b935683..a08cd189234c 100644
--- a/drivers/video/tegra/dc/dc.c
+++ b/drivers/video/tegra/dc/dc.c
@@ -2061,15 +2061,16 @@ static void tegra_dc_one_shot_irq(struct tegra_dc *dc, unsigned long status)
/* Schedule any additional bottom-half vblank actvities. */
schedule_work(&dc->vblank_work);
-
- /* Mark the vblank as complete. */
- complete(&dc->vblank_complete);
-
}
/* Check underflow at frame end */
- if (status & FRAME_END_INT)
+ if (status & FRAME_END_INT) {
tegra_dc_underflow_handler(dc);
+
+ /* Mark the frame_end as complete. */
+ if (completion_done(&dc->frame_end_complete))
+ complete(&dc->frame_end_complete);
+ }
}
static void tegra_dc_continuous_irq(struct tegra_dc *dc, unsigned long status)
@@ -2080,13 +2081,15 @@ static void tegra_dc_continuous_irq(struct tegra_dc *dc, unsigned long status)
/* Schedule any additional bottom-half vblank actvities. */
schedule_work(&dc->vblank_work);
-
- /* Mark the vblank as complete. */
- complete(&dc->vblank_complete);
}
- if (status & FRAME_END_INT)
+ if (status & FRAME_END_INT) {
+ /* Mark the frame_end as complete. */
+ if (completion_done(&dc->frame_end_complete))
+ complete(&dc->frame_end_complete);
+
tegra_dc_trigger_windows(dc);
+ }
}
#endif
@@ -2682,7 +2685,7 @@ static int tegra_dc_probe(struct nvhost_device *ndev)
dc->enabled = true;
mutex_init(&dc->lock);
- init_completion(&dc->vblank_complete);
+ init_completion(&dc->frame_end_complete);
init_waitqueue_head(&dc->wq);
#ifdef CONFIG_ARCH_TEGRA_2x_SOC
INIT_WORK(&dc->reset_work, tegra_dc_reset_worker);