summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/omapdrm/dss/omapdss.h
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2018-03-04 23:28:25 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2018-09-03 16:13:27 +0300
commitf7e376aece4636afb0c4da5ce54d5e805ce47a76 (patch)
treeacd5140259b66edaaef296be10ea53f76a318d17 /drivers/gpu/drm/omapdrm/dss/omapdss.h
parent27d624527d99265c2df999af3615ff71c29d06f4 (diff)
downloadlinux-f7e376aece4636afb0c4da5ce54d5e805ce47a76.tar.xz
drm/omap: dss: Add for_each_dss_output() macro
Similarly to for_each_dss_display(), the for_each_dss_output() macro iterates over all the DSS connected outputs. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/dss/omapdss.h')
-rw-r--r--drivers/gpu/drm/omapdrm/dss/omapdss.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/gpu/drm/omapdrm/dss/omapdss.h b/drivers/gpu/drm/omapdrm/dss/omapdss.h
index 5d3e4ced73d1..5cbbfb16369b 100644
--- a/drivers/gpu/drm/omapdrm/dss/omapdss.h
+++ b/drivers/gpu/drm/omapdrm/dss/omapdss.h
@@ -385,6 +385,11 @@ struct omap_dss_device_ops {
};
};
+enum omap_dss_device_type {
+ OMAP_DSS_DEVICE_TYPE_OUTPUT = (1 << 0),
+ OMAP_DSS_DEVICE_TYPE_DISPLAY = (1 << 1),
+};
+
struct omap_dss_device {
struct kobject kobj;
struct device *dev;
@@ -488,9 +493,9 @@ static inline bool omapdss_is_initialized(void)
return !!omapdss_get_dss();
}
-void omapdss_display_init(struct omap_dss_device *dssdev);
#define for_each_dss_display(d) \
- while ((d = omapdss_device_get_next(d, true)) != NULL)
+ while ((d = omapdss_device_get_next(d, OMAP_DSS_DEVICE_TYPE_DISPLAY)) != NULL)
+void omapdss_display_init(struct omap_dss_device *dssdev);
void omapdss_device_register(struct omap_dss_device *dssdev);
void omapdss_device_unregister(struct omap_dss_device *dssdev);
@@ -499,7 +504,7 @@ void omapdss_device_put(struct omap_dss_device *dssdev);
struct omap_dss_device *omapdss_find_device_by_port(struct device_node *src,
unsigned int port);
struct omap_dss_device *omapdss_device_get_next(struct omap_dss_device *from,
- bool display_only);
+ enum omap_dss_device_type type);
int omapdss_device_connect(struct dss_device *dss,
struct omap_dss_device *src,
struct omap_dss_device *dst);
@@ -511,6 +516,8 @@ int omap_dss_get_num_overlay_managers(void);
int omap_dss_get_num_overlays(void);
+#define for_each_dss_output(d) \
+ while ((d = omapdss_device_get_next(d, OMAP_DSS_DEVICE_TYPE_OUTPUT)) != NULL)
int omapdss_output_set_device(struct omap_dss_device *out,
struct omap_dss_device *dssdev);
int omapdss_output_unset_device(struct omap_dss_device *out);