[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220121142904.4091481-10-p.yadav@ti.com>
Date: Fri, 21 Jan 2022 19:58:59 +0530
From: Pratyush Yadav <p.yadav@...com>
To: Mauro Carvalho Chehab <mchehab@...nel.org>
CC: Pratyush Yadav <p.yadav@...com>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Nikhil Devshatwar <nikhil.nd@...com>,
Tomi Valkeinen <tomi.valkeinen@...asonboard.com>,
Benoit Parrot <bparrot@...com>,
Maxime Ripard <mripard@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Niklas Söderlund
<niklas.soderlund+renesas@...natech.se>,
<devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linux-media@...r.kernel.org>
Subject: [PATCH v6 09/14] media: cadence: csi2rx: Add link validation
Add media link validation to make sure incorrectly configured pipelines
are caught.
Signed-off-by: Pratyush Yadav <p.yadav@...com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@...asonboard.com>
---
Changes in v6:
- Drop transcoding from the commit message.
- Make csi2rx_media_ops const.
- Add Laurent's R-by.
Changes in v5:
- New in v5.
drivers/media/platform/cadence/cdns-csi2rx.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/media/platform/cadence/cdns-csi2rx.c b/drivers/media/platform/cadence/cdns-csi2rx.c
index 28fb2078d10d..08866bc64c33 100644
--- a/drivers/media/platform/cadence/cdns-csi2rx.c
+++ b/drivers/media/platform/cadence/cdns-csi2rx.c
@@ -479,6 +479,10 @@ static const struct v4l2_subdev_ops csi2rx_subdev_ops = {
.pad = &csi2rx_pad_ops,
};
+static const struct media_entity_operations csi2rx_media_ops = {
+ .link_validate = v4l2_subdev_link_validate,
+};
+
static int csi2rx_async_bound(struct v4l2_async_notifier *notifier,
struct v4l2_subdev *s_subdev,
struct v4l2_async_subdev *asd)
@@ -678,6 +682,7 @@ static int csi2rx_probe(struct platform_device *pdev)
for (i = CSI2RX_PAD_SOURCE_STREAM0; i < CSI2RX_PAD_MAX; i++)
csi2rx->pads[i].flags = MEDIA_PAD_FL_SOURCE;
csi2rx->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
+ csi2rx->subdev.entity.ops = &csi2rx_media_ops;
ret = media_entity_pads_init(&csi2rx->subdev.entity, CSI2RX_PAD_MAX,
csi2rx->pads);
--
2.34.1
Powered by blists - more mailing lists