aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2012-12-04 06:12:39 -0500
committerTomi Valkeinen <tomi.valkeinen@ti.com>2012-12-07 09:55:04 -0500
commit6b6f1edfdb6c41e630e4a70d64a8e8817b3170c2 (patch)
tree3b2fac32b6b45f949c706254233f45be4d552941 /drivers/video/omap2
parent486c0e17b7d1a4f8f057a97f2e48f715208f950d (diff)
OMAPFB: connect ovl managers to all dssdevs
Commit 5d89bcc341771d95e3a2996218e5949a6627f59e (OMAPDSS: remove initial display code from omapdss) moved setting up the initial overlay, overlay manager, output and display connections from omapdss to omapfb. However, currently omapfb only handles the connection related to the default display, which means that no overlay managers are connected to other displays. This patch changes omapfb to go through all dssdevs, and connect an overlay manager to them. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2')
-rw-r--r--drivers/video/omap2/omapfb/omapfb-main.c38
1 files changed, 24 insertions, 14 deletions
diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c
index c2dbfb832a07..1f60741a7886 100644
--- a/drivers/video/omap2/omapfb/omapfb-main.c
+++ b/drivers/video/omap2/omapfb/omapfb-main.c
@@ -2349,27 +2349,37 @@ static int omapfb_init_display(struct omapfb2_device *fbdev,
2349} 2349}
2350 2350
2351static int omapfb_init_connections(struct omapfb2_device *fbdev, 2351static int omapfb_init_connections(struct omapfb2_device *fbdev,
2352 struct omap_dss_device *dssdev) 2352 struct omap_dss_device *def_dssdev)
2353{ 2353{
2354 int i, r; 2354 int i, r;
2355 struct omap_overlay_manager *mgr = NULL; 2355 struct omap_overlay_manager *mgr;
2356 2356
2357 for (i = 0; i < fbdev->num_managers; i++) { 2357 if (!def_dssdev->output) {
2358 mgr = fbdev->managers[i]; 2358 dev_err(fbdev->dev, "no output for the default display\n");
2359 2359 return -EINVAL;
2360 if (dssdev->channel == mgr->id)
2361 break;
2362 } 2360 }
2363 2361
2364 if (i == fbdev->num_managers) 2362 for (i = 0; i < fbdev->num_displays; ++i) {
2365 return -ENODEV; 2363 struct omap_dss_device *dssdev = fbdev->displays[i].dssdev;
2364 struct omap_dss_output *out = dssdev->output;
2366 2365
2367 if (mgr->output) 2366 mgr = omap_dss_get_overlay_manager(dssdev->channel);
2368 mgr->unset_output(mgr);
2369 2367
2370 r = mgr->set_output(mgr, dssdev->output); 2368 if (!mgr || !out)
2371 if (r) 2369 continue;
2372 return r; 2370
2371 if (mgr->output)
2372 mgr->unset_output(mgr);
2373
2374 mgr->set_output(mgr, out);
2375 }
2376
2377 mgr = def_dssdev->output->manager;
2378
2379 if (!mgr) {
2380 dev_err(fbdev->dev, "no ovl manager for the default display\n");
2381 return -EINVAL;
2382 }
2373 2383
2374 for (i = 0; i < fbdev->num_overlays; i++) { 2384 for (i = 0; i < fbdev->num_overlays; i++) {
2375 struct omap_overlay *ovl = fbdev->overlays[i]; 2385 struct omap_overlay *ovl = fbdev->overlays[i];