summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/omapdrm/dss/output.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2018-03-06 01:25:13 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2018-09-03 16:13:28 +0300
commit713165561b7e372cd21f34bfeb82188361569f74 (patch)
treeb510b0ae1fa4976198088e5d8e6228c41b968724 /drivers/gpu/drm/omapdrm/dss/output.c
parent79ddb2f0c348e991edca106a0e5ab414a822ccfc (diff)
downloadlwn-713165561b7e372cd21f34bfeb82188361569f74.tar.gz
lwn-713165561b7e372cd21f34bfeb82188361569f74.zip
drm/omap: dss: Move display type validation to initialization time
The display type is validated when the display is connected to the DSS output. We already have all the information we need for validation when initializing the outputs. Move validation to output initialization to simplify pipeline connection handling. 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/output.c')
-rw-r--r--drivers/gpu/drm/omapdrm/dss/output.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/drivers/gpu/drm/omapdrm/dss/output.c b/drivers/gpu/drm/omapdrm/dss/output.c
index 96d74218cf91..be544dd48bf4 100644
--- a/drivers/gpu/drm/omapdrm/dss/output.c
+++ b/drivers/gpu/drm/omapdrm/dss/output.c
@@ -26,23 +26,16 @@
static DEFINE_MUTEX(output_lock);
-int omapdss_output_set_device(struct omap_dss_device *out,
- struct omap_dss_device *dssdev)
+int omapdss_output_validate(struct omap_dss_device *out)
{
- int r = 0;
-
- mutex_lock(&output_lock);
-
- if (out->output_type != dssdev->type) {
+ if (out->next && out->output_type != out->next->type) {
dev_err(out->dev, "output type and display type don't match\n");
- r = -EINVAL;
+ return -EINVAL;
}
- mutex_unlock(&output_lock);
-
- return r;
+ return 0;
}
-EXPORT_SYMBOL(omapdss_output_set_device);
+EXPORT_SYMBOL(omapdss_output_validate);
int omapdss_output_unset_device(struct omap_dss_device *out)
{