summaryrefslogtreecommitdiff
path: root/drivers/video/omap2/dss/overlay.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2011-11-05 10:59:59 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2011-12-02 08:54:35 +0200
commit07e327c9c18b382656bf455051759be8182627ae (patch)
tree2f9988c87a01df6cd231a598160b334634247e0f /drivers/video/omap2/dss/overlay.c
parent5617ad097959cb39b96d08af0a9b3d51215deaba (diff)
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/overlay.c')
-rw-r--r--drivers/video/omap2/dss/overlay.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/video/omap2/dss/overlay.c b/drivers/video/omap2/dss/overlay.c
index ccd6127d2eef..3c940654ef91 100644
--- a/drivers/video/omap2/dss/overlay.c
+++ b/drivers/video/omap2/dss/overlay.c
@@ -566,6 +566,7 @@ static int omap_dss_set_manager(struct omap_overlay *ovl,
}
ovl->manager = mgr;
+ list_add_tail(&ovl->list, &mgr->overlays);
ovl->manager_changed = true;
/* XXX: When there is an overlay on a DSI manual update display, and
@@ -597,6 +598,7 @@ static int omap_dss_unset_manager(struct omap_overlay *ovl)
}
ovl->manager = NULL;
+ list_del(&ovl->list);
ovl->manager_changed = true;
return 0;
@@ -617,14 +619,6 @@ struct omap_overlay *omap_dss_get_overlay(int num)
}
EXPORT_SYMBOL(omap_dss_get_overlay);
-static struct omap_overlay *dispc_overlays[MAX_DSS_OVERLAYS];
-
-void dss_overlay_setup_dispc_manager(struct omap_overlay_manager *mgr)
-{
- mgr->num_overlays = dss_feat_get_num_ovls();
- mgr->overlays = dispc_overlays;
-}
-
void dss_init_overlays(struct platform_device *pdev)
{
int i, r;
@@ -684,8 +678,6 @@ void dss_init_overlays(struct platform_device *pdev)
if (r)
DSSERR("failed to create sysfs file\n");
-
- dispc_overlays[i] = ovl;
}
}