From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Jai Luthra <jai.luthra@ideasonboard.com>
Cc: Hans Verkuil <hverkuil@kernel.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>,
Jacopo Mondi <jacopo.mondi@ideasonboard.com>,
linux-media@vger.kernel.org,
Ricardo Ribalda <ribalda@chromium.org>,
Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
Al Viro <viro@zeniv.linux.org.uk>, Ma Ke <make24@iscas.ac.cn>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 01/10] media: v4l2-core: Introduce state management for video devices
Date: Wed, 24 Sep 2025 12:15:45 +0200 [thread overview]
Message-ID: <20250924121545.1456cbea@foz.lan> (raw)
In-Reply-To: <20250919-vdev-state-v2-1-b2c42426965c@ideasonboard.com>
Em Fri, 19 Sep 2025 15:25:53 +0530
Jai Luthra <jai.luthra@ideasonboard.com> escreveu:
> Similar to V4L2 subdev states, introduce state support for video devices
> to provide a centralized location for storing device state information.
> This includes the current (active) pixelformat used by the device and
> the temporary (try) pixelformat used during format negotiation.
I didn't look at the patch series yet, so I may be just jumping too
fast here, but storing "try" attempts doesn't seem the right thing to
do.
Btw, IMHO, the first patch on this series should be against documentation,
where you would be describing not only the new feature with the supported
states, but also the state machine transitions that are supported,
preferably with some graphs.
So, before actually looking on any code changes, I'd like to see a clear
description of this new feature, what it is proposing to address, how
and what impacts (if any) this would bring to userspace.
The current diffstat:
include/media/v4l2-ctrls.h | 5 +-
include/media/v4l2-dev.h | 84 +++++
include/media/v4l2-fh.h | 2 +
include/media/v4l2-ioctl.h | 238 ++++++-------
include/media/v4l2-mem2mem.h | 48 ++-
include/media/videobuf2-v4l2.h | 33 +-
implies that this affects for now only Documentation/driver-api/media/...
> In the
> future, this may be extended or subclassed by device drivers to store
> their internal state variables.
>
> Also introduce a flag for drivers that wish to use this state
> management. When set, the framework automatically allocates the state
> during device registration and stores a pointer to it within the
> video_device structure.
>
> This change aligns video devices with V4L2 subdevices by storing
> hardware state in a common framework-allocated structure. This is the
> first step towards enabling the multiplexing of the underlying hardware
> by using different software "contexts", each represented by the combined
> state of all video devices and V4L2 subdevices in a complex media graph.
... but when you mention "contexts", I'm assuming that you're aiming
at either userspace API changes and/or behavoral changes that will
affect uAPI as well.
Thanks,
Mauro
next prev parent reply other threads:[~2025-09-24 10:15 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-19 9:55 [PATCH v2 00/10] media: Introduce video device state management Jai Luthra
2025-09-19 9:55 ` [PATCH v2 01/10] media: v4l2-core: Introduce state management for video devices Jai Luthra
2025-09-22 7:44 ` Hans Verkuil
2025-09-22 8:00 ` Hans Verkuil
2025-09-29 15:30 ` Jai Luthra
2025-09-29 20:02 ` Michael Riesch
2025-09-30 7:26 ` Jacopo Mondi
2025-09-30 7:15 ` Jacopo Mondi
2025-09-30 7:24 ` Hans Verkuil
2025-09-24 7:06 ` Hans Verkuil
2025-09-24 10:15 ` Mauro Carvalho Chehab [this message]
2025-09-29 16:50 ` Jai Luthra
2025-09-19 9:55 ` [PATCH v2 02/10] media: v4l2-dev: Add support for try state Jai Luthra
2025-09-22 7:52 ` Hans Verkuil
2025-09-22 7:58 ` Hans Verkuil
2025-09-29 16:15 ` Jai Luthra
2025-09-30 7:30 ` Hans Verkuil
2025-09-30 9:35 ` Jacopo Mondi
2025-09-30 10:07 ` Hans Verkuil
2025-09-19 9:55 ` [PATCH v2 03/10] media: v4l2-dev: Add callback for initializing video device state Jai Luthra
2025-09-19 9:55 ` [PATCH v2 04/10] media: v4l2-dev: Add helpers to get current format from the state Jai Luthra
2025-09-22 8:06 ` Hans Verkuil
2025-09-29 16:16 ` Jai Luthra
2025-09-19 9:55 ` [PATCH v2 05/10] media: v4l2-ioctl: Add video_device_state argument to v4l2 ioctl wrappers Jai Luthra
2025-09-22 8:09 ` Hans Verkuil
2025-09-22 8:10 ` Hans Verkuil
2025-09-19 9:55 ` [PATCH v2 06/10] media: Replace void * with video_device_state * in all driver ioctl implementations Jai Luthra
2026-03-07 19:49 ` David Dull
2026-03-08 10:37 ` Laurent Pinchart
2026-03-07 20:06 ` David Dull
2025-09-19 9:55 ` [PATCH v2 07/10] media: v4l2-ioctl: Pass device state for G/S/TRY_FMT ioctls Jai Luthra
2025-09-22 8:11 ` Hans Verkuil
2025-09-19 9:56 ` [PATCH v2 08/10] media: ti: j721e-csi2rx: Use video_device_state Jai Luthra
2025-09-22 8:16 ` Hans Verkuil
2025-09-29 16:21 ` Jai Luthra
2025-09-19 9:56 ` [PATCH v2 09/10] media: rkisp1: " Jai Luthra
2025-09-19 9:56 ` [PATCH v2 10/10] media: rkisp1: Calculate format information on demand Jai Luthra
2025-09-20 10:48 ` [PATCH v2 00/10] media: Introduce video device state management Andy Shevchenko
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=20250924121545.1456cbea@foz.lan \
--to=mchehab+huawei@kernel.org \
--cc=hverkuil@kernel.org \
--cc=jacopo.mondi@ideasonboard.com \
--cc=jai.luthra@ideasonboard.com \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=make24@iscas.ac.cn \
--cc=mchehab@kernel.org \
--cc=ribalda@chromium.org \
--cc=sakari.ailus@linux.intel.com \
--cc=tomi.valkeinen@ideasonboard.com \
--cc=viro@zeniv.linux.org.uk \
/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