summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorAdam Cheney <acheney@nvidia.com>2012-06-15 19:22:35 -0700
committerLokesh Pathak <lpathak@nvidia.com>2012-06-20 07:50:51 -0700
commit03b3d64a3fef9419e1b6eec35ff9add0785dd045 (patch)
treeb03ec4acc9db6aaa199b6a23c3f353fe9b49bea3 /drivers/video
parent56c5946df8696c2dda6ac28077496212a38db0fb (diff)
video: tegra: dc: fix MC_DECERR display0_win errors on shutdown
When a DC window is being released, a NULL flip is used to indicate that the window should be disabled. To disable a window, 0 is written to WIN_OPTIONS. The MC_DECERR on window shutdown is a symptom of forgetting step 2) below when disabling windows, leaving no indication that there is anything to wait for. This causes DC to erroneously unpin the scanout buffer while the buffer is still actively being used. Summary of flip (window update) synchronization in DC: 1) program some window registers 2) set win->dirty=1 3) schedule the activation of the registers 4) request VBLANK or HBLANK interrupts 5) wait for win->dirty==0 In the trigger_windows ISR (every VBLANK or HBLANK): 1) if there is no window update pending in HW, clear dirty flag to indicate that ACTIVE registers are up-to-date. bug 991572 bug 995614 bug 989119 bug 983251 bug 960424 bug 866711 Change-Id: I8b710aac874b202838c3989608b7e0bd15425382 Signed-off-by: Adam Cheney <acheney@nvidia.com> Reviewed-on: http://git-master/r/109370 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Robert Morell <rmorell@nvidia.com> Reviewed-by: Nirav Patel <nipatel@nvidia.com> Reviewed-by: Jon Mayo <jmayo@nvidia.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/tegra/dc/dc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/video/tegra/dc/dc.c b/drivers/video/tegra/dc/dc.c
index db4efc95aab1..0b923693a937 100644
--- a/drivers/video/tegra/dc/dc.c
+++ b/drivers/video/tegra/dc/dc.c
@@ -931,6 +931,7 @@ int tegra_dc_update_windows(struct tegra_dc_win *windows[], int n)
update_mask |= WIN_A_ACT_REQ << win->idx;
if (!WIN_IS_ENABLED(win)) {
+ dc->windows[i].dirty = 1;
tegra_dc_writel(dc, 0, DC_WIN_WIN_OPTIONS);
continue;
}