summaryrefslogtreecommitdiff
path: root/drivers/video/omap2
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2011-11-25 15:27:45 (GMT)
committerTomi Valkeinen <tomi.valkeinen@ti.com>2011-12-02 06:54:56 (GMT)
commit5b2141719aa8a14ebd242c60b4ce6a580276f7cd (patch)
tree92ac77d27f309280f5dfd014758ea02c3dfd0bd8 /drivers/video/omap2
parent9f808956d3cd07c8dc69e213931b19bad56344fb (diff)
downloadlinux-5b2141719aa8a14ebd242c60b4ce6a580276f7cd.tar.xz
OMAPDSS: APPLY: clear shadow dirty flags only if GO had been set
In the apply irq handler the code currently clears the shadow dirty flags whenever the manager in question is not busy (i.e. GO bit is down). However, this is not quite right, as the GO bit may have never been set. While not done in the current code, the above would cause bug in scenario where the registers are written, and thus shadow_dirty flag is set, but the GO bit will be set only later. In this case the shadow_dirty flags would be cleared, even if the HW is not using the new configurations. This patch fixes the issue by clearing the shadow flags only when the GO bit is clear, and the GO bit had been set. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2')
-rw-r--r--drivers/video/omap2/dss/apply.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/video/omap2/dss/apply.c b/drivers/video/omap2/dss/apply.c
index 98fef08..e2eaed2 100644
--- a/drivers/video/omap2/dss/apply.c
+++ b/drivers/video/omap2/dss/apply.c
@@ -824,6 +824,7 @@ static void dss_apply_irq_handler(void *data, u32 mask)
for (i = 0; i < num_mgrs; i++) {
struct omap_overlay_manager *mgr;
struct mgr_priv_data *mp;
+ bool was_updating;
mgr = omap_dss_get_overlay_manager(i);
mp = get_mgr_priv(mgr);
@@ -831,15 +832,17 @@ static void dss_apply_irq_handler(void *data, u32 mask)
if (!mp->enabled)
continue;
+ was_updating = mp->updating;
mp->updating = dispc_mgr_is_enabled(i);
if (!mgr_manual_update(mgr)) {
+ bool was_busy = mp->busy;
mp->busy = dispc_mgr_go_busy(i);
- if (!mp->busy)
+ if (was_busy && !mp->busy)
mgr_clear_shadow_dirty(mgr);
} else {
- if (!mp->updating)
+ if (was_updating && !mp->updating)
mgr_clear_shadow_dirty(mgr);
}
}