From: Jai Luthra <j-luthra@ti.com>
To: Mauro Carvalho Chehab <mchehab@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Cc: <linux-media@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<devicetree@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Mauro Carvalho Chehab <mchehab+samsung@kernel.org>,
Maxime Ripard <mripard@kernel.org>,
<niklas.soderlund+renesas@ragnatech.se>,
Benoit Parrot <bparrot@ti.com>,
Vaishnav Achath <vaishnav.a@ti.com>,
Vignesh Raghavendra <vigneshr@ti.com>, <nm@ti.com>,
<devarsht@ti.com>, <j-luthra@ti.com>, <a-bhatia1@ti.com>,
Martyn Welch <martyn.welch@collabora.com>,
Julien Massot <julien.massot@collabora.com>
Subject: [PATCH v10 11/13] media: cadence: csi2rx: Add link validation
Date: Mon, 9 Oct 2023 18:39:37 +0530 [thread overview]
Message-ID: <20231009-upstream_csi-v10-11-330aaed24c5d@ti.com> (raw)
In-Reply-To: <20231009-upstream_csi-v10-0-330aaed24c5d@ti.com>
From: Pratyush Yadav <p.yadav@ti.com>
Add media link validation to make sure incorrectly configured pipelines
are caught.
Signed-off-by: Pratyush Yadav <p.yadav@ti.com>
Tested-by: Julien Massot <julien.massot@collabora.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Reviewed-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Jai Luthra <j-luthra@ti.com>
---
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 d0c2a5b3d0d5..889f4fbbafb3 100644
--- a/drivers/media/platform/cadence/cdns-csi2rx.c
+++ b/drivers/media/platform/cadence/cdns-csi2rx.c
@@ -453,6 +453,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_connection *asd)
@@ -669,6 +673,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.42.0
next prev parent reply other threads:[~2023-10-09 13:10 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-09 13:09 [PATCH v10 00/13] CSI2RX support on J721E and AM62 Jai Luthra
2023-10-09 13:09 ` [PATCH v10 01/13] media: dt-bindings: Make sure items in data-lanes are unique Jai Luthra
2023-10-09 13:09 ` [PATCH v10 02/13] media: dt-bindings: cadence-csi2rx: Add TI compatible string Jai Luthra
2023-10-09 13:09 ` [PATCH v10 03/13] media: cadence: csi2rx: Unregister v4l2 async notifier Jai Luthra
2023-10-09 13:09 ` [PATCH v10 04/13] media: cadence: csi2rx: Cleanup media entity properly Jai Luthra
2023-10-09 13:09 ` [PATCH v10 05/13] media: cadence: csi2rx: Add get_fmt and set_fmt pad ops Jai Luthra
2023-10-09 13:09 ` [PATCH v10 06/13] media: cadence: csi2rx: Configure DPHY using link freq Jai Luthra
2023-10-09 13:09 ` [PATCH v10 07/13] media: cadence: csi2rx: Soft reset the streams before starting capture Jai Luthra
2023-10-09 13:09 ` [PATCH v10 08/13] media: cadence: csi2rx: Set the STOP bit when stopping a stream Jai Luthra
2023-10-09 13:09 ` [PATCH v10 09/13] media: cadence: csi2rx: Fix stream data configuration Jai Luthra
2023-10-09 13:09 ` [PATCH v10 10/13] media: cadence: csi2rx: Populate subdev devnode Jai Luthra
2023-10-09 13:09 ` Jai Luthra [this message]
2023-10-09 13:09 ` [PATCH v10 12/13] media: dt-bindings: Add TI J721E CSI2RX Jai Luthra
2023-10-09 13:09 ` [PATCH v10 13/13] media: ti: Add CSI2RX support for J721E Jai Luthra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231009-upstream_csi-v10-11-330aaed24c5d@ti.com \
--to=j-luthra@ti.com \
--cc=a-bhatia1@ti.com \
--cc=bparrot@ti.com \
--cc=conor+dt@kernel.org \
--cc=devarsht@ti.com \
--cc=devicetree@vger.kernel.org \
--cc=julien.massot@collabora.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=martyn.welch@collabora.com \
--cc=mchehab+samsung@kernel.org \
--cc=mchehab@kernel.org \
--cc=mripard@kernel.org \
--cc=niklas.soderlund+renesas@ragnatech.se \
--cc=nm@ti.com \
--cc=robh+dt@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=tomi.valkeinen@ideasonboard.com \
--cc=vaishnav.a@ti.com \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).