aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2011-11-25 10:27:45 -0500
committerTomi Valkeinen <tomi.valkeinen@ti.com>2011-12-02 01:54:56 -0500
commit5b2141719aa8a14ebd242c60b4ce6a580276f7cd (patch)
tree92ac77d27f309280f5dfd014758ea02c3dfd0bd8 /drivers/video
parent9f808956d3cd07c8dc69e213931b19bad56344fb (diff)
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')
-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 98fef08da3ba..e2eaed2e9172 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)
824 for (i = 0; i < num_mgrs; i++) { 824 for (i = 0; i < num_mgrs; i++) {
825 struct omap_overlay_manager *mgr; 825 struct omap_overlay_manager *mgr;
826 struct mgr_priv_data *mp; 826 struct mgr_priv_data *mp;
827 bool was_updating;
827 828
828 mgr = omap_dss_get_overlay_manager(i); 829 mgr = omap_dss_get_overlay_manager(i);
829 mp = get_mgr_priv(mgr); 830 mp = get_mgr_priv(mgr);
@@ -831,15 +832,17 @@ static void dss_apply_irq_handler(void *data, u32 mask)
831 if (!mp->enabled) 832 if (!mp->enabled)
832 continue; 833 continue;
833 834
835 was_updating = mp->updating;
834 mp->updating = dispc_mgr_is_enabled(i); 836 mp->updating = dispc_mgr_is_enabled(i);
835 837
836 if (!mgr_manual_update(mgr)) { 838 if (!mgr_manual_update(mgr)) {
839 bool was_busy = mp->busy;
837 mp->busy = dispc_mgr_go_busy(i); 840 mp->busy = dispc_mgr_go_busy(i);
838 841
839 if (!mp->busy) 842 if (was_busy && !mp->busy)
840 mgr_clear_shadow_dirty(mgr); 843 mgr_clear_shadow_dirty(mgr);
841 } else { 844 } else {
842 if (!mp->updating) 845 if (was_updating && !mp->updating)
843 mgr_clear_shadow_dirty(mgr); 846 mgr_clear_shadow_dirty(mgr);
844 } 847 }
845 } 848 }