summaryrefslogtreecommitdiff
path: root/drivers/media/platform/vsp1/vsp1_drv.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2015-08-05 23:14:41 +0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-02-19 14:26:15 +0300
commitbabca007e7c7943215052c95bebfdaac0ca0db7c (patch)
tree51600f925610c91f8534c86135cdda30bc87d2a9 /drivers/media/platform/vsp1/vsp1_drv.c
parent3dbb6100146666df45ef83d1552d4da097c60f72 (diff)
downloadlinux-babca007e7c7943215052c95bebfdaac0ca0db7c.tar.xz
[media] v4l: vsp1: Don't validate links when the userspace API is disabled
As the pipeline is configured internally by the driver when the userspace API is disabled its configuration can be trusted and link validation isn't needed. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/platform/vsp1/vsp1_drv.c')
-rw-r--r--drivers/media/platform/vsp1/vsp1_drv.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/media/platform/vsp1/vsp1_drv.c b/drivers/media/platform/vsp1/vsp1_drv.c
index 63892b2f4484..1e10fc4723c5 100644
--- a/drivers/media/platform/vsp1/vsp1_drv.c
+++ b/drivers/media/platform/vsp1/vsp1_drv.c
@@ -21,6 +21,8 @@
#include <linux/platform_device.h>
#include <linux/videodev2.h>
+#include <media/v4l2-subdev.h>
+
#include "vsp1.h"
#include "vsp1_bru.h"
#include "vsp1_hsit.h"
@@ -214,6 +216,14 @@ static int vsp1_create_entities(struct vsp1_device *vsp1)
dev_name(mdev->dev));
media_device_init(mdev);
+ vsp1->media_ops.link_setup = vsp1_entity_link_setup;
+ /* Don't perform link validation when the userspace API is disabled as
+ * the pipeline is configured internally by the driver in that case, and
+ * its configuration can thus be trusted.
+ */
+ if (vsp1->pdata.uapi)
+ vsp1->media_ops.link_validate = v4l2_subdev_link_validate;
+
vdev->mdev = mdev;
ret = v4l2_device_register(vsp1->dev, vdev);
if (ret < 0) {