summaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/omapfb/omapfb-main.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2013-04-23 15:35:35 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2013-06-17 14:00:42 +0300
commitbe8e8e1c62678765868c0bc7b8b5209c38af105c (patch)
tree405e8641bb55bbd9ab0b82f304961bb1a19474d7 /drivers/video/omap2/omapfb/omapfb-main.c
parente724366498ead17579686f7ad83235f911a9c4f7 (diff)
OMAPDSS: add helpers to get mgr or output from display
Add two helper functions that can be used to find either the DSS output or the overlay manager that is connected to the given display. This hides how the output and the manager are actually connected, making it easier to change the connections in the future. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2/omapfb/omapfb-main.c')
-rw-r--r--drivers/video/omap2/omapfb/omapfb-main.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c
index 856917b3361..cc8953c4faa 100644
--- a/drivers/video/omap2/omapfb/omapfb-main.c
+++ b/drivers/video/omap2/omapfb/omapfb-main.c
@@ -2363,18 +2363,16 @@ static int omapfb_init_connections(struct omapfb2_device *fbdev,
int i, r;
struct omap_overlay_manager *mgr;
- if (!def_dssdev->output) {
- dev_err(fbdev->dev, "no output for the default display\n");
- return -EINVAL;
- }
-
for (i = 0; i < fbdev->num_displays; ++i) {
struct omap_dss_device *dssdev = fbdev->displays[i].dssdev;
- struct omap_dss_output *out = dssdev->output;
+ struct omap_dss_output *out;
- mgr = omap_dss_get_overlay_manager(out->dispc_channel);
+ out = omapdss_find_output_from_display(dssdev);
+ if (!out)
+ continue;
- if (!mgr || !out)
+ mgr = omap_dss_get_overlay_manager(out->dispc_channel);
+ if (!mgr)
continue;
if (mgr->output)
@@ -2383,7 +2381,7 @@ static int omapfb_init_connections(struct omapfb2_device *fbdev,
mgr->set_output(mgr, out);
}
- mgr = def_dssdev->output->manager;
+ mgr = omapdss_find_mgr_from_display(def_dssdev);
if (!mgr) {
dev_err(fbdev->dev, "no ovl manager for the default display\n");