From bea131966ffab271e8c3b33e37244ad340fb7876 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Mon, 5 Mar 2018 14:28:06 +0200 Subject: drm/omap: dss: Add function to retrieve display for an output Add a new omapdss_display_get() function to retrieve the omap_dss_device for a given DSS output. This will be used when reversing the direction of the DSS pipeline handling logic. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/dss/display.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'drivers/gpu/drm/omapdrm/dss/display.c') diff --git a/drivers/gpu/drm/omapdrm/dss/display.c b/drivers/gpu/drm/omapdrm/dss/display.c index 53cb46f6503d..34b2a4ef63a4 100644 --- a/drivers/gpu/drm/omapdrm/dss/display.c +++ b/drivers/gpu/drm/omapdrm/dss/display.c @@ -49,3 +49,12 @@ void omapdss_display_init(struct omap_dss_device *dssdev) "display%u", id); } EXPORT_SYMBOL_GPL(omapdss_display_init); + +struct omap_dss_device *omapdss_display_get(struct omap_dss_device *output) +{ + while (output->next) + output = output->next; + + return omapdss_device_get(output); +} +EXPORT_SYMBOL_GPL(omapdss_display_get); -- cgit v1.2.3