aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2013-04-23 07:35:40 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2013-06-17 07:00:57 -0400
commitefedce1425976fc73154a826552aad4f54086a25 (patch)
tree66fe0f21efd3ff2d2efb275e91f51e3a488a5108
parent5d47dbc85228de3ce82dea11af3c169e66cbf520 (diff)
OMAPDSS: modify get/find functions to go through the device chain
In the future will have arbitrarily long video pipeline chains, instead of the current two-entities-per-pipeline model. This patch changes the affected get/find style functions so that they properly go through the video pipeline chain, for example when getting the overlay manager connected to a given display. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r--drivers/video/omap2/dss/apply.c14
-rw-r--r--drivers/video/omap2/dss/output.c8
2 files changed, 20 insertions, 2 deletions
diff --git a/drivers/video/omap2/dss/apply.c b/drivers/video/omap2/dss/apply.c
index 752b98592908..d6212d63cfb2 100644
--- a/drivers/video/omap2/dss/apply.c
+++ b/drivers/video/omap2/dss/apply.c
@@ -422,7 +422,19 @@ static void wait_pending_extra_info_updates(void)
422 422
423static struct omap_dss_device *dss_mgr_get_device(struct omap_overlay_manager *mgr) 423static struct omap_dss_device *dss_mgr_get_device(struct omap_overlay_manager *mgr)
424{ 424{
425 return mgr->output ? mgr->output->device : NULL; 425 struct omap_dss_device *dssdev;
426
427 dssdev = mgr->output;
428 if (dssdev == NULL)
429 return NULL;
430
431 while (dssdev->device)
432 dssdev = dssdev->device;
433
434 if (dssdev->driver)
435 return dssdev;
436 else
437 return NULL;
426} 438}
427 439
428static struct omap_dss_device *dss_ovl_get_device(struct omap_overlay *ovl) 440static struct omap_dss_device *dss_ovl_get_device(struct omap_overlay *ovl)
diff --git a/drivers/video/omap2/dss/output.c b/drivers/video/omap2/dss/output.c
index 0ba168e23907..3f5c0a758b32 100644
--- a/drivers/video/omap2/dss/output.c
+++ b/drivers/video/omap2/dss/output.c
@@ -146,7 +146,13 @@ EXPORT_SYMBOL(omap_dss_find_output_by_node);
146 146
147struct omap_dss_device *omapdss_find_output_from_display(struct omap_dss_device *dssdev) 147struct omap_dss_device *omapdss_find_output_from_display(struct omap_dss_device *dssdev)
148{ 148{
149 return omap_dss_get_device(dssdev->output); 149 while (dssdev->output)
150 dssdev = dssdev->output;
151
152 if (dssdev->id != 0)
153 return omap_dss_get_device(dssdev);
154
155 return NULL;
150} 156}
151EXPORT_SYMBOL(omapdss_find_output_from_display); 157EXPORT_SYMBOL(omapdss_find_output_from_display);
152 158