From: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: "Jacopo Mondi" <jacopo.mondi@ideasonboard.com>,
linux-media@vger.kernel.org, hans@jjverkuil.nl,
laurent.pinchart@ideasonboard.com,
Prabhakar <prabhakar.csengg@gmail.com>,
"Kate Hsuan" <hpa@redhat.com>,
"Alexander Shiyan" <eagle.alexander923@gmail.com>,
"Dave Stevenson" <dave.stevenson@raspberrypi.com>,
"Tommaso Merciai" <tomm.merciai@gmail.com>,
"Benjamin Mugnier" <benjamin.mugnier@foss.st.com>,
"Sylvain Petinot" <sylvain.petinot@foss.st.com>,
"Christophe JAILLET" <christophe.jaillet@wanadoo.fr>,
"Julien Massot" <julien.massot@collabora.com>,
"Naushir Patuck" <naush@raspberrypi.com>,
"Yan, Dongcheng" <dongcheng.yan@intel.com>,
"Cao, Bingbu" <bingbu.cao@intel.com>,
"Qiu, Tian Shu" <tian.shu.qiu@intel.com>,
"Stefan Klug" <stefan.klug@ideasonboard.com>,
"Mirela Rabulea" <mirela.rabulea@nxp.com>,
"André Apitzsch" <git@apitzsch.eu>,
"Heimir Thor Sverrisson" <heimir.sverrisson@gmail.com>,
"Kieran Bingham" <kieran.bingham@ideasonboard.com>,
"Mehdi Djait" <mehdi.djait@linux.intel.com>,
"Ricardo Ribalda Delgado" <ribalda@kernel.org>,
"Hans de Goede" <hansg@kernel.org>,
"Tomi Valkeinen" <tomi.valkeinen@ideasonboard.com>,
"David Plowman" <david.plowman@raspberrypi.com>,
"Yu, Ong Hock" <ong.hock.yu@intel.com>,
"Ng, Khai Wen" <khai.wen.ng@intel.com>
Subject: Re: [PATCH v2 00/14] Metadata series preparation
Date: Mon, 16 Feb 2026 09:50:32 +0100 [thread overview]
Message-ID: <aZLXdfGKn9XNscnd@zed> (raw)
In-Reply-To: <aY9cfEGnI0MQxH_x@kekkonen.localdomain>
Hi Sakari
On Fri, Feb 13, 2026 at 07:16:44PM +0200, Sakari Ailus wrote:
> Hi Jacopo,
>
> Thank you for reviewing this!
>
> On Fri, Feb 13, 2026 at 03:36:43PM +0100, Jacopo Mondi wrote:
> > Hi Sakari
> >
> > On Wed, Feb 11, 2026 at 11:09:06AM +0200, Sakari Ailus wrote:
> > > Hi folks,
> > >
> > > This smallish set contains patches that prepare for merging the metadata
> > > series.
> > >
> > > There are simple cleanups but also two noteworthy changes: the addition of
> > > the VALIDATE_LATE media link flag and the addition of the new struct
> > > v4l2_subdev_client_info struct to the get_fmt, set_fmt, get_selection and
> > > set_selection pad operation arguments.
> > >
> > > The VALIDATE_LATE allows using the link_validate callback as the way to
> > > validate the links connected to the sink pads of video nodes on pipelines
> > > with multiple capture video nodes. Without this flag, the entire pipeline
> > > will be validated at the time of the first streamon, with the V4L2 pixel
> > > (or other) format set on the other capture video nodes at the time,
> > > requiring all formats to be set before starting streaming anywhere. But
> > > this does generally not match with what the userspace would do, hence the
> >
> > What would userspace do instead ?
> >
> > Is there a use case for formats not being known at pipeline start time ?
>
> Yes. Try capturing from two video nodes with e.g. yavta.
>
maybe yavta is not the right tool to handle streaming on a complex
platform, or should at least be modified to delay start stream after
all formats are set up.
Anyway..
> I recall the vsp driver does link validation as part of the streamon
> operation without involving the link_validate callback for this reason.
>
> >
> > Is the userspace expected to enable all links with the VALIDATE_LATE
> > flags ?
>
> It's not supposed to be a user-settable flag. The purpose is really to
> allow the framework to do the job it's supposed to.
>
This doesn't explain me nothing.
The only documentation patch for this in
[PATCH v2 07/14] media: mc: Add MEDIA_LNK_FL_VALIDATE_LATE
just reports:
+The ``VALIDATE_LATE`` flag is used to signal that the validation of the link may
+be delayed until actual hardware operation even if the rest of the pipeline
+would be validated at an earlier point of time.
in Documentation/userspace-api/media/mediactl/media-ioc-setup-link.rst
Have I missed any other part of the documentation maybe ?
How are drivers supposed to use it ? Create links to multiplexed
subdevs with this flag ?
Again, if the problem is a userspace tool not setting up all formats
before calling s_stream, a driver flag to accommodate it doesn't seem
right.
> >
> > for_each_video_node() {
> > set_format()
> > clear_validate_late();
> > vidioc_streamon()
> > }
> >
> > As I understand it, the use case is solely delay setting the format on
> > the video device and its sink pads ?
>
> Correct.
>
Still not sure why we should allow that.
I'll ask-again:
Is there a use case for formats not being known at pipeline start time ?
> >
> > > new flag. The patches in the upcoming metadata series version adds the
> > > support for the flag to the IPU6 driver.
> > >
> > > Secondly, the new struct v4l2_subdev_client_info enables passing around
> > > file handler specific client capability information, which is used to
> > > differentiate UAPI between existing users and those that are aware of the
> > > new common raw sensor model. This is effectively required if we want to
> > > add support for the new model to existing raw sensor drivers: the new
> > > model is in a direct conflict with how things worked before the model.
> >
> > Can you elaborate a little on why a per-ioctl flag is required ?
> > Doesn't this open the door to possible mixups ?
> >
> > I fail to see what the advantage is over per-subdev_fh client
> > capabilities.
>
> It's a per-file handle flag, but the sub-device IOCTL handlers currently
> don't take the file handle (or information related to it) as an argument.
Could you elaborate on the reason why the flag should be an operation
argument an not a per-file handle setting ?
> Therefore this needs to be added to the relevant ops -- it could also be
> all pad ops; it would be possible to avoid adding new functions that take
> client_info pointer and work on the active state (see the third-last
> patch).
>
> >
> > > There still needs to be a single driver internal state, the different
> > > UAPIs simply offer a different view to that state. In-kernel users that do
> > > not deal with capabilities just use NULL when calling these ops. This also
> > > means that whatever client capabilities are being used, there may not be a
> > > change to inter-driver interfaces such as get_fmt() when dealing with
> > > external pads.
> >
> > Do we expect drivers that still use in-kernel operation calls to be
> > ported to use streams ?
>
> Those that benefit from it can be ported. But interoperability is good
> between those that use streams than those that don't so there's no hurry.
>
> >
> > I'll review the rest of the series in the meantime.
>
> Thank you. I'm down to ~ 80 patches once these are merged.
>
I really hoped we could have landed the 66 patch series to start
building on it
> --
> Kind regards,
>
> Sakari Ailus
next prev parent reply other threads:[~2026-02-16 8:50 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-11 9:09 [PATCH v2 00/14] Metadata series preparation Sakari Ailus
2026-02-11 9:09 ` [PATCH v2 01/14] media: imx219: Rename "PIXEL_ARRAY" as "CROP" Sakari Ailus
2026-02-13 14:42 ` Jacopo Mondi
2026-02-13 17:24 ` Sakari Ailus
2026-02-11 9:09 ` [PATCH v2 02/14] media: v4l2-subdev: Allow accessing routes with STREAMS client capability Sakari Ailus
2026-02-13 14:48 ` Jacopo Mondi
2026-02-15 14:18 ` Mirela Rabulea
2026-02-11 9:09 ` [PATCH v2 03/14] media: Documentation: Improve LINK_FREQ documentation Sakari Ailus
2026-02-13 14:49 ` Jacopo Mondi
2026-02-15 14:37 ` Mirela Rabulea
2026-02-16 8:42 ` Sakari Ailus
2026-02-11 9:09 ` [PATCH v2 04/14] media: Documentation: Improve pixel rate calculation documentation Sakari Ailus
2026-02-13 14:49 ` Jacopo Mondi
2026-02-15 14:38 ` Mirela Rabulea
2026-02-11 9:09 ` [PATCH v2 05/14] media: v4l2-subdev: Refactor returning routes Sakari Ailus
2026-02-13 15:01 ` Jacopo Mondi
2026-02-13 17:29 ` Sakari Ailus
2026-02-15 14:39 ` Mirela Rabulea
2026-02-16 9:02 ` Sakari Ailus
2026-02-16 10:09 ` Mirela Rabulea
2026-02-11 9:09 ` [PATCH v2 06/14] media: mc: Separate single link validation into a new function Sakari Ailus
2026-02-15 14:42 ` Mirela Rabulea
2026-02-16 9:18 ` Sakari Ailus
2026-02-11 9:09 ` [PATCH v2 07/14] media: mc: Add MEDIA_LNK_FL_VALIDATE_LATE Sakari Ailus
2026-02-16 13:19 ` Mirela Rabulea
2026-02-16 21:14 ` Sakari Ailus
2026-02-11 9:09 ` [PATCH v2 08/14] media: mc: Don't care about unsettable flags in MEDIA_IOC_LINK_SETUP Sakari Ailus
2026-02-16 13:55 ` Mirela Rabulea
2026-02-16 21:31 ` Sakari Ailus
2026-02-11 9:09 ` [PATCH v2 09/14] media: Document enable_streams and disable_streams behaviour Sakari Ailus
2026-02-16 14:03 ` Mirela Rabulea
2026-02-17 8:37 ` Sakari Ailus
2026-03-25 9:16 ` Sakari Ailus
2026-02-11 9:09 ` [PATCH v2 10/14] media: v4l2-subdev: Move subdev client capabilities into a new struct Sakari Ailus
2026-02-16 15:40 ` Mirela Rabulea
2026-02-11 9:09 ` [PATCH v2 11/14] media: v4l2-subdev: Add struct v4l2_subdev_client_info pointer to pad ops Sakari Ailus
2026-02-16 15:40 ` Mirela Rabulea
2026-02-16 21:35 ` Sakari Ailus
2026-02-11 9:09 ` [PATCH v2 12/14] media: v4l2-subdev: Add v4l2_subdev_call_ci_active_state Sakari Ailus
2026-02-16 16:20 ` Mirela Rabulea
2026-02-17 8:09 ` Sakari Ailus
2026-02-11 9:09 ` [PATCH v2 13/14] media: v4l2-subdev: Perform client info changes to i2c drivers Sakari Ailus
2026-02-11 9:09 ` [PATCH v2 14/14] media: v4l2-subdev: Add struct v4l2_subdev_client_info argument to pad ops Sakari Ailus
2026-02-13 14:36 ` [PATCH v2 00/14] Metadata series preparation Jacopo Mondi
2026-02-13 17:16 ` Sakari Ailus
2026-02-16 8:50 ` Jacopo Mondi [this message]
2026-02-16 11:19 ` Sakari Ailus
2026-02-16 11:56 ` Jacopo Mondi
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=aZLXdfGKn9XNscnd@zed \
--to=jacopo.mondi@ideasonboard.com \
--cc=benjamin.mugnier@foss.st.com \
--cc=bingbu.cao@intel.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=dave.stevenson@raspberrypi.com \
--cc=david.plowman@raspberrypi.com \
--cc=dongcheng.yan@intel.com \
--cc=eagle.alexander923@gmail.com \
--cc=git@apitzsch.eu \
--cc=hans@jjverkuil.nl \
--cc=hansg@kernel.org \
--cc=heimir.sverrisson@gmail.com \
--cc=hpa@redhat.com \
--cc=julien.massot@collabora.com \
--cc=khai.wen.ng@intel.com \
--cc=kieran.bingham@ideasonboard.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=mehdi.djait@linux.intel.com \
--cc=mirela.rabulea@nxp.com \
--cc=naush@raspberrypi.com \
--cc=ong.hock.yu@intel.com \
--cc=prabhakar.csengg@gmail.com \
--cc=ribalda@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=stefan.klug@ideasonboard.com \
--cc=sylvain.petinot@foss.st.com \
--cc=tian.shu.qiu@intel.com \
--cc=tomi.valkeinen@ideasonboard.com \
--cc=tomm.merciai@gmail.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