diff options
| -rw-r--r-- | drivers/gpu/drm/omapdrm/dss/display.c | 18 | ||||
| -rw-r--r-- | drivers/gpu/drm/omapdrm/dss/omapdss.h | 3 | ||||
| -rw-r--r-- | drivers/gpu/drm/omapdrm/dss/output.c | 13 |
3 files changed, 34 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) | |||
| 132 | } | 132 | } |
| 133 | EXPORT_SYMBOL(omapdss_unregister_display); | 133 | EXPORT_SYMBOL(omapdss_unregister_display); |
| 134 | 134 | ||
| 135 | bool omapdss_component_is_display(struct device_node *node) | ||
| 136 | { | ||
| 137 | struct omap_dss_device *dssdev; | ||
| 138 | bool found = false; | ||
| 139 | |||
| 140 | mutex_lock(&panel_list_mutex); | ||
| 141 | list_for_each_entry(dssdev, &panel_list, panel_list) { | ||
| 142 | if (dssdev->dev->of_node == node) { | ||
| 143 | found = true; | ||
| 144 | goto out; | ||
| 145 | } | ||
| 146 | } | ||
| 147 | out: | ||
| 148 | mutex_unlock(&panel_list_mutex); | ||
| 149 | return found; | ||
| 150 | } | ||
| 151 | EXPORT_SYMBOL(omapdss_component_is_display); | ||
| 152 | |||
| 135 | struct omap_dss_device *omap_dss_get_device(struct omap_dss_device *dssdev) | 153 | struct omap_dss_device *omap_dss_get_device(struct omap_dss_device *dssdev) |
| 136 | { | 154 | { |
| 137 | if (!try_module_get(dssdev->owner)) | 155 | if (!try_module_get(dssdev->owner)) |
diff --git a/drivers/gpu/drm/omapdrm/dss/omapdss.h b/drivers/gpu/drm/omapdrm/dss/omapdss.h index 4545f1824e66..7e1feb935137 100644 --- a/drivers/gpu/drm/omapdrm/dss/omapdss.h +++ b/drivers/gpu/drm/omapdrm/dss/omapdss.h | |||
| @@ -936,4 +936,7 @@ struct dispc_ops { | |||
| 936 | void dispc_set_ops(const struct dispc_ops *o); | 936 | void dispc_set_ops(const struct dispc_ops *o); |
| 937 | const struct dispc_ops *dispc_get_ops(void); | 937 | const struct dispc_ops *dispc_get_ops(void); |
| 938 | 938 | ||
| 939 | bool omapdss_component_is_display(struct device_node *node); | ||
| 940 | bool omapdss_component_is_output(struct device_node *node); | ||
| 941 | |||
| 939 | #endif /* __OMAP_DRM_DSS_H */ | 942 | #endif /* __OMAP_DRM_DSS_H */ |
diff --git a/drivers/gpu/drm/omapdrm/dss/output.c b/drivers/gpu/drm/omapdrm/dss/output.c index 2b999dc48621..655c5d73eac9 100644 --- a/drivers/gpu/drm/omapdrm/dss/output.c +++ b/drivers/gpu/drm/omapdrm/dss/output.c | |||
| @@ -107,6 +107,19 @@ void omapdss_unregister_output(struct omap_dss_device *out) | |||
| 107 | } | 107 | } |
| 108 | EXPORT_SYMBOL(omapdss_unregister_output); | 108 | EXPORT_SYMBOL(omapdss_unregister_output); |
| 109 | 109 | ||
| 110 | bool omapdss_component_is_output(struct device_node *node) | ||
| 111 | { | ||
| 112 | struct omap_dss_device *out; | ||
| 113 | |||
| 114 | list_for_each_entry(out, &output_list, list) { | ||
| 115 | if (out->dev->of_node == node) | ||
| 116 | return true; | ||
| 117 | } | ||
| 118 | |||
| 119 | return false; | ||
| 120 | } | ||
| 121 | EXPORT_SYMBOL(omapdss_component_is_output); | ||
| 122 | |||
| 110 | struct omap_dss_device *omap_dss_get_output(enum omap_dss_output_id id) | 123 | struct omap_dss_device *omap_dss_get_output(enum omap_dss_output_id id) |
| 111 | { | 124 | { |
| 112 | struct omap_dss_device *out; | 125 | struct omap_dss_device *out; |
