summaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/dss/manager.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/manager.c
parent5617ad097959cb39b96d08af0a9b3d51215deaba (diff)
downloadop-kernel-dev-07e327c9c18b382656bf455051759be8182627ae.zip
op-kernel-dev-07e327c9c18b382656bf455051759be8182627ae.tar.gz
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/manager.c')
-rw-r--r--drivers/video/omap2/dss/manager.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/video/omap2/dss/manager.c b/drivers/video/omap2/dss/manager.c
index a08cc6e..62bcc38 100644
--- a/drivers/video/omap2/dss/manager.c
+++ b/drivers/video/omap2/dss/manager.c
@@ -470,8 +470,8 @@ static struct kobj_type manager_ktype = {
static int omap_dss_set_device(struct omap_overlay_manager *mgr,
struct omap_dss_device *dssdev)
{
- int i;
int r;
+ struct omap_overlay *ovl;
if (dssdev->manager) {
DSSERR("display '%s' already has a manager '%s'\n",
@@ -485,10 +485,8 @@ static int omap_dss_set_device(struct omap_overlay_manager *mgr,
return -EINVAL;
}
- for (i = 0; i < mgr->num_overlays; i++) {
- struct omap_overlay *ovl = mgr->overlays[i];
-
- if (ovl->manager != mgr || !ovl->info.enabled)
+ list_for_each_entry(ovl, &mgr->overlays, list) {
+ if (!ovl->info.enabled)
continue;
r = dss_check_overlay(ovl, dssdev);
@@ -626,7 +624,7 @@ int dss_init_overlay_managers(struct platform_device *pdev)
mgr->supported_displays =
dss_feat_get_supported_displays(mgr->id);
- dss_overlay_setup_dispc_manager(mgr);
+ INIT_LIST_HEAD(&mgr->overlays);
r = kobject_init_and_add(&mgr->kobj, &manager_ktype,
&pdev->dev.kobj, "manager%d", i);
OpenPOWER on IntegriCloud