summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/omapdrm/dss/display.c
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2016-05-02 14:55:38 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2017-04-03 12:36:40 +0300
commit7c79e8d67fde332f1cda26c8a0845fa167815351 (patch)
tree82e3b4cf308305f708e14ec87e9dbdd4d272fcfb /drivers/gpu/drm/omapdrm/dss/display.c
parentbe2d68c69e5c5a54cd2179aa6971d42cc3a49375 (diff)
downloadlinux-7c79e8d67fde332f1cda26c8a0845fa167815351.tar.bz2
drm/omap: dss: Functions to check components in the display/output list
The functions can be used to check a component (by it's of_node) if it is part of the omapdss display or output list. If the component is found, it means that the driver is loaded. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/dss/display.c')
-rw-r--r--drivers/gpu/drm/omapdrm/dss/display.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/gpu/drm/omapdrm/dss/display.c b/drivers/gpu/drm/omapdrm/dss/display.c
index e567ff68b216..94c012e0584b 100644
--- a/drivers/gpu/drm/omapdrm/dss/display.c
+++ b/drivers/gpu/drm/omapdrm/dss/display.c
@@ -132,6 +132,24 @@ void omapdss_unregister_display(struct omap_dss_device *dssdev)
}
EXPORT_SYMBOL(omapdss_unregister_display);
+bool omapdss_component_is_display(struct device_node *node)
+{
+ struct omap_dss_device *dssdev;
+ bool found = false;
+
+ mutex_lock(&panel_list_mutex);
+ list_for_each_entry(dssdev, &panel_list, panel_list) {
+ if (dssdev->dev->of_node == node) {
+ found = true;
+ goto out;
+ }
+ }
+out:
+ mutex_unlock(&panel_list_mutex);
+ return found;
+}
+EXPORT_SYMBOL(omapdss_component_is_display);
+
struct omap_dss_device *omap_dss_get_device(struct omap_dss_device *dssdev)
{
if (!try_module_get(dssdev->owner))