summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/omapdrm/dss/base.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2018-05-27 22:01:24 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2018-09-03 16:13:28 +0300
commit1298977f0c8a06743dad0bf64d9a9e5a1e863fa3 (patch)
tree2f6a4ccb1ed9b978fed5e8889bfc8a20c9ddeb5a /drivers/gpu/drm/omapdrm/dss/base.c
parenta4e9ecf4bb19f13bbd346fae646e7d9ce33db3b8 (diff)
downloadlinux-1298977f0c8a06743dad0bf64d9a9e5a1e863fa3.tar.bz2
drm/omap: Check omap_dss_device type based on the output_type field
Various functions that need to differentiate between omap_dss_device instances corresponding to displays and to internal encoders use the omap_dss_device.driver field, which is only set for display instances. This gets in the way of the omap_dss_device operations refactoring. Replace that with a check based on the output_type field which is set for all omap_dss_device instances but displays. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/dss/base.c')
-rw-r--r--drivers/gpu/drm/omapdrm/dss/base.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/omapdrm/dss/base.c b/drivers/gpu/drm/omapdrm/dss/base.c
index 2051bab30484..614331b7d702 100644
--- a/drivers/gpu/drm/omapdrm/dss/base.c
+++ b/drivers/gpu/drm/omapdrm/dss/base.c
@@ -164,7 +164,8 @@ struct omap_dss_device *omapdss_device_get_next(struct omap_dss_device *from,
* Accept display entities if the display type is requested,
* and output entities if the output type is requested.
*/
- if ((type & OMAP_DSS_DEVICE_TYPE_DISPLAY) && dssdev->driver)
+ if ((type & OMAP_DSS_DEVICE_TYPE_DISPLAY) &&
+ !dssdev->output_type)
goto done;
if ((type & OMAP_DSS_DEVICE_TYPE_OUTPUT) && dssdev->id &&
dssdev->next)
@@ -223,7 +224,7 @@ void omapdss_device_disconnect(struct omap_dss_device *src,
dev_dbg(dst->dev, "disconnect\n");
if (!dst->id && !omapdss_device_is_connected(dst)) {
- WARN_ON(!dst->driver);
+ WARN_ON(dst->output_type);
return;
}