summaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2012-12-04 13:12:39 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2012-12-07 16:55:04 +0200
commit6b6f1edfdb6c41e630e4a70d64a8e8817b3170c2 (patch)
tree3b2fac32b6b45f949c706254233f45be4d552941 /drivers/video/omap2
parent486c0e17b7d1a4f8f057a97f2e48f715208f950d (diff)
downloadop-kernel-dev-6b6f1edfdb6c41e630e4a70d64a8e8817b3170c2.zip
op-kernel-dev-6b6f1edfdb6c41e630e4a70d64a8e8817b3170c2.tar.gz
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 c2dbfb8..1f60741 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,
}
static int omapfb_init_connections(struct omapfb2_device *fbdev,
- struct omap_dss_device *dssdev)
+ struct omap_dss_device *def_dssdev)
{
int i, r;
- struct omap_overlay_manager *mgr = NULL;
+ struct omap_overlay_manager *mgr;
- for (i = 0; i < fbdev->num_managers; i++) {
- mgr = fbdev->managers[i];
-
- if (dssdev->channel == mgr->id)
- break;
+ if (!def_dssdev->output) {
+ dev_err(fbdev->dev, "no output for the default display\n");
+ return -EINVAL;
}
- if (i == fbdev->num_managers)
- return -ENODEV;
+ for (i = 0; i < fbdev->num_displays; ++i) {
+ struct omap_dss_device *dssdev = fbdev->displays[i].dssdev;
+ struct omap_dss_output *out = dssdev->output;
- if (mgr->output)
- mgr->unset_output(mgr);
+ mgr = omap_dss_get_overlay_manager(dssdev->channel);
- r = mgr->set_output(mgr, dssdev->output);
- if (r)
- return r;
+ if (!mgr || !out)
+ continue;
+
+ if (mgr->output)
+ mgr->unset_output(mgr);
+
+ mgr->set_output(mgr, out);
+ }
+
+ mgr = def_dssdev->output->manager;
+
+ if (!mgr) {
+ dev_err(fbdev->dev, "no ovl manager for the default display\n");
+ return -EINVAL;
+ }
for (i = 0; i < fbdev->num_overlays; i++) {
struct omap_overlay *ovl = fbdev->overlays[i];
OpenPOWER on IntegriCloud