summaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/dss/apply.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2011-11-16 12:03:22 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2011-12-02 08:54:46 +0200
commit7609893c637b422eec88b57d204f02d8798cfc65 (patch)
tree6cc513addacc53df1d6644349df3e8f151a19a22 /drivers/video/omap2/dss/apply.c
parent34861378a54e3fcac0eb87317ded2554b087494e (diff)
downloadblackbird-op-linux-7609893c637b422eec88b57d204f02d8798cfc65.tar.gz
blackbird-op-linux-7609893c637b422eec88b57d204f02d8798cfc65.zip
OMAPDSS: APPLY: clean up isr_handler
Add a helper function mgr_clear_shadow_dirty(), which clears the shadow_dirty flags for the given manager and for the overlays on that manager. This lets us simplify the code in the dss_apply_irq_handler(). Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss/apply.c')
-rw-r--r--drivers/video/omap2/dss/apply.c52
1 files changed, 28 insertions, 24 deletions
diff --git a/drivers/video/omap2/dss/apply.c b/drivers/video/omap2/dss/apply.c
index 3bb5149b3a28..8b157b03d4b6 100644
--- a/drivers/video/omap2/dss/apply.c
+++ b/drivers/video/omap2/dss/apply.c
@@ -508,47 +508,51 @@ static void dss_unregister_vsync_isr(void)
dss_data.irq_enabled = false;
}
-static void dss_apply_irq_handler(void *data, u32 mask)
+static void mgr_clear_shadow_dirty(struct omap_overlay_manager *mgr)
{
struct omap_overlay *ovl;
- struct omap_overlay_manager *mgr;
struct mgr_priv_data *mp;
struct ovl_priv_data *op;
- const int num_ovls = dss_feat_get_num_ovls();
+
+ mp = get_mgr_priv(mgr);
+ mp->shadow_dirty = false;
+
+ list_for_each_entry(ovl, &mgr->overlays, list) {
+ op = get_ovl_priv(ovl);
+ op->shadow_dirty = false;
+ op->shadow_extra_info_dirty = false;
+ }
+}
+
+static void dss_apply_irq_handler(void *data, u32 mask)
+{
const int num_mgrs = dss_feat_get_num_mgrs();
int i;
spin_lock(&data_lock);
+ /* clear busy, updating flags, shadow_dirty flags */
for (i = 0; i < num_mgrs; i++) {
+ struct omap_overlay_manager *mgr;
+ struct mgr_priv_data *mp;
+
mgr = omap_dss_get_overlay_manager(i);
mp = get_mgr_priv(mgr);
- mp->busy = dispc_mgr_go_busy(i);
- mp->updating = dispc_mgr_is_enabled(i);
- }
-
- for (i = 0; i < num_ovls; ++i) {
- ovl = omap_dss_get_overlay(i);
- op = get_ovl_priv(ovl);
-
- if (!op->enabled)
+ if (!mp->enabled)
continue;
- mp = get_mgr_priv(ovl->manager);
-
- if (!mp->busy) {
- op->shadow_dirty = false;
- op->shadow_extra_info_dirty = false;
- }
- }
+ mp->updating = dispc_mgr_is_enabled(i);
- for (i = 0; i < num_mgrs; ++i) {
- mgr = omap_dss_get_overlay_manager(i);
- mp = get_mgr_priv(mgr);
+ if (!mgr_manual_update(mgr)) {
+ mp->busy = dispc_mgr_go_busy(i);
- if (!mp->busy)
- mp->shadow_dirty = false;
+ if (!mp->busy)
+ mgr_clear_shadow_dirty(mgr);
+ } else {
+ if (!mp->updating)
+ mgr_clear_shadow_dirty(mgr);
+ }
}
dss_write_regs();
OpenPOWER on IntegriCloud