diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-11-05 10:59:59 +0200 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2011-12-02 08:54:35 +0200 |
commit | 07e327c9c18b382656bf455051759be8182627ae (patch) | |
tree | 2f9988c87a01df6cd231a598160b334634247e0f /drivers/video/omap2/dss/apply.c | |
parent | 5617ad097959cb39b96d08af0a9b3d51215deaba (diff) | |
download | blackbird-op-linux-07e327c9c18b382656bf455051759be8182627ae.tar.gz blackbird-op-linux-07e327c9c18b382656bf455051759be8182627ae.zip |
OMAPDSS: store overlays in a list for each manager
Current way of handling overlay-manager links is a bit strange: each
manager has a static array, containing pointers to all the overlays
(even those used by other managers). The overlays contain a pointer to
the manager being used.
This patch makes the system a bit saner: each manager has a linked list
of overlays, and only the overlays linked to that manager are in the
list.
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.c | 33 |
1 files changed, 7 insertions, 26 deletions
diff --git a/drivers/video/omap2/dss/apply.c b/drivers/video/omap2/dss/apply.c index ba1f73c136ce..34879d0628bd 100644 --- a/drivers/video/omap2/dss/apply.c +++ b/drivers/video/omap2/dss/apply.c @@ -398,8 +398,7 @@ void dss_mgr_start_update(struct omap_overlay_manager *mgr) { struct manager_cache_data *mc; struct overlay_cache_data *oc; - const int num_ovls = dss_feat_get_num_ovls(); - int i; + struct omap_overlay *ovl; mc = &dss_cache.manager_cache[mgr->id]; @@ -407,11 +406,8 @@ void dss_mgr_start_update(struct omap_overlay_manager *mgr) configure_dispc(); mc->do_manual_update = false; - for (i = 0; i < num_ovls; ++i) { - oc = &dss_cache.overlay_cache[i]; - if (oc->channel != mgr->id) - continue; - + list_for_each_entry(ovl, &mgr->overlays, list) { + oc = &dss_cache.overlay_cache[ovl->id]; oc->shadow_dirty = false; } @@ -584,8 +580,9 @@ static void omap_dss_mgr_apply_ovl_fifos(struct omap_overlay *ovl) int omap_dss_mgr_apply(struct omap_overlay_manager *mgr) { - int i, r; + int r; unsigned long flags; + struct omap_overlay *ovl; DSSDBG("omap_dss_mgr_apply(%s)\n", mgr->name); @@ -596,31 +593,15 @@ int omap_dss_mgr_apply(struct omap_overlay_manager *mgr) spin_lock_irqsave(&dss_cache.lock, flags); /* Configure overlays */ - for (i = 0; i < mgr->num_overlays; ++i) { - struct omap_overlay *ovl; - - ovl = mgr->overlays[i]; - - if (ovl->manager != mgr) - continue; - + list_for_each_entry(ovl, &mgr->overlays, list) omap_dss_mgr_apply_ovl(ovl); - } /* Configure manager */ omap_dss_mgr_apply_mgr(mgr); /* Configure overlay fifos */ - for (i = 0; i < mgr->num_overlays; ++i) { - struct omap_overlay *ovl; - - ovl = mgr->overlays[i]; - - if (ovl->manager != mgr) - continue; - + list_for_each_entry(ovl, &mgr->overlays, list) omap_dss_mgr_apply_ovl_fifos(ovl); - } r = 0; if (mgr->enabled && !mgr_manual_update(mgr)) { |