From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: linux-media@vger.kernel.org
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
tomi.valkeinen@ideasonboard.com, bingbu.cao@intel.com,
hongju.wang@intel.com, hverkuil@xs4all.nl
Subject: [PATCH 3/7] media: v4l: subdev: Support INTERNAL pads in routing IOCTLs
Date: Fri, 30 Jun 2023 23:43:34 +0300 [thread overview]
Message-ID: <20230630204338.126583-4-sakari.ailus@linux.intel.com> (raw)
In-Reply-To: <20230630204338.126583-1-sakari.ailus@linux.intel.com>
Take the new INTERNAL pad flag into account in validating routing IOCTL
argument. Effectively this is a SINK pad in this respect. Due to the union
there's no need to check for the particular name.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
drivers/media/v4l2-core/v4l2-subdev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/media/v4l2-core/v4l2-subdev.c b/drivers/media/v4l2-core/v4l2-subdev.c
index 2ec179cd1264..36886a9047c4 100644
--- a/drivers/media/v4l2-core/v4l2-subdev.c
+++ b/drivers/media/v4l2-core/v4l2-subdev.c
@@ -1787,7 +1787,8 @@ int v4l2_subdev_routing_validate(struct v4l2_subdev *sd,
/* Validate the sink and source pad numbers. */
if (route->sink_pad >= sd->entity.num_pads ||
- !(sd->entity.pads[route->sink_pad].flags & MEDIA_PAD_FL_SINK)) {
+ !(sd->entity.pads[route->sink_pad].flags &
+ MEDIA_PAD_FL_SINK)) {
dev_dbg(sd->dev, "route %u sink (%u) is not a sink pad\n",
i, route->sink_pad);
goto out;
--
2.39.2
next prev parent reply other threads:[~2023-06-30 20:43 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-30 20:43 [PATCH 0/7] Generic line based metadata support, internal pads Sakari Ailus
2023-06-30 20:43 ` [PATCH 1/7] media: mc: Check pad flag validity Sakari Ailus
2023-07-03 7:53 ` Jacopo Mondi
2023-07-05 14:40 ` Sakari Ailus
2023-06-30 20:43 ` [PATCH 2/7] media: mc: Add INTERNAL pad flag Sakari Ailus
2023-06-30 20:43 ` Sakari Ailus [this message]
2023-07-02 11:57 ` [PATCH 3/7] media: v4l: subdev: Support INTERNAL pads in routing IOCTLs Andrey Konovalov
2023-07-05 14:39 ` Sakari Ailus
2023-06-30 20:43 ` [PATCH 4/7] media: uapi: v4l: Document source routes Sakari Ailus
2023-07-03 7:47 ` Jacopo Mondi
2023-07-06 10:20 ` Sakari Ailus
2023-07-08 12:13 ` Sakari Ailus
2023-07-10 12:53 ` Jacopo Mondi
2023-08-01 14:56 ` Sakari Ailus
2023-06-30 20:43 ` [PATCH 5/7] media: uapi: Add generic serial metadata mbus formats Sakari Ailus
2023-06-30 20:43 ` [PATCH 6/7] media: uapi: Add generic 8-bit metadata format definitions Sakari Ailus
2023-06-30 20:43 ` [PATCH 7/7] media: v4l: Support line-based metadata capture Sakari Ailus
2023-07-04 12:57 ` [PATCH 0/7] Generic line based metadata support, internal pads Laurent Pinchart
2023-07-05 8:27 ` Sakari Ailus
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=20230630204338.126583-4-sakari.ailus@linux.intel.com \
--to=sakari.ailus@linux.intel.com \
--cc=bingbu.cao@intel.com \
--cc=hongju.wang@intel.com \
--cc=hverkuil@xs4all.nl \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=tomi.valkeinen@ideasonboard.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