From: Michael Riesch <michael.riesch@collabora.com>
To: Jacopo Mondi <jacopo.mondi@ideasonboard.com>,
Dafna Hirschfeld <dafna@fastmail.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Keke Li <keke.li@amlogic.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Heiko Stuebner <heiko@sntech.de>,
Dan Scally <dan.scally@ideasonboard.com>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Antoine Bouyer <antoine.bouyer@nxp.com>
Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
linux-rockchip@lists.infradead.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v7 8/8] media: Documentation: kapi: Add v4l2 generic ISP support
Date: Tue, 14 Oct 2025 10:54:51 +0200 [thread overview]
Message-ID: <e4672b5e-8f22-4220-b666-4aad06787c71@collabora.com> (raw)
In-Reply-To: <20251014-extensible-parameters-validation-v7-8-6628bed5ca98@ideasonboard.com>
Hi Jacopo,
Thanks for your efforts!
On 10/14/25 10:01, Jacopo Mondi wrote:
> Add to the driver-api documentation the v4l2-isp.h types and
> helpers documentation.
>
> Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
> ---
> Documentation/driver-api/media/v4l2-core.rst | 1 +
> Documentation/driver-api/media/v4l2-isp.rst | 49 ++++++++++++++++++++++++++++
> MAINTAINERS | 1 +
> 3 files changed, 51 insertions(+)
>
> diff --git a/Documentation/driver-api/media/v4l2-core.rst b/Documentation/driver-api/media/v4l2-core.rst
> index ad987c34ad2a8460bb95e97adc4d850d624e0b81..a5f5102c64cca57b57b54ab95882b26286fb27de 100644
> --- a/Documentation/driver-api/media/v4l2-core.rst
> +++ b/Documentation/driver-api/media/v4l2-core.rst
> @@ -27,3 +27,4 @@ Video4Linux devices
> v4l2-common
> v4l2-tveeprom
> v4l2-jpeg
> + v4l2-isp
> diff --git a/Documentation/driver-api/media/v4l2-isp.rst b/Documentation/driver-api/media/v4l2-isp.rst
> new file mode 100644
> index 0000000000000000000000000000000000000000..42c2550602979609e92a09e3cd1fe3dcbafd6416
> --- /dev/null
> +++ b/Documentation/driver-api/media/v4l2-isp.rst
> @@ -0,0 +1,49 @@
> +.. SPDX-License-Identifier: GPL-2.0
> +
> +V4L2 generic ISP parameters and statistics support
> +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> +
> +Design rationale
> +================
> +
> +ISP configuration parameters and statistics are processed and collected by
> +drivers and exchanged with userspace through data types that usually
> +reflect the ISP peripheral registers layout.
> +
> +Each ISP driver defines its own metadata capture format for parameters and
> +a metadata output format for statistics. The buffer layout is realized by a
> +set of C structures that reflects the registers layout. The number and types
> +of C structures is fixed by the format definition and becomes part of the Linux
> +kernel uAPI/uABI interface.
> +
> +Because of the hard requirement of backward compatibility when extending the
> +user API/ABI interface, modifying an ISP driver capture or output metadata
> +format after it has been accepted by mainline is very hard if not impossible.
> +
> +It generally happens, in facts, that after the first accepted revision of an
s/in facts/in fact
> +ISP driver the buffer layout need to be modified, either to support new hardware
s/need/needs
> +blocks, fix bugs found later on or support different revisions of the same IP.
> +
> +Each of these situation would require defining a new metadata format, making it
s/situation/situations
> +really hard to maintain and extend drivers and requiring userspace to use a
> +the correct format depending on the kernel revision in use.
> +
> +V4L2 ISP configuration parameters
> +=================================
> +
> +For these reasons, Video4Linux2 defines generic types for ISP configuration
> +parameters and statistics. Drivers are still expected to define their own
> +formats for their metadata output and capture nodes, but the buffer layout can
> +be defined using the extensible and versioned types defined by
> +include/uapi/linux/media/v4l2-isp.h.
> +
> +Drivers are expected to provide the definitions of their supported ISP blocks,
> +the control flags and the expected maximum size of a buffer.
> +
> +For driver developers a set of helper functions to assist them with validation
> +of the buffer received from userspace is available in the form of helper
> +functions in drivers/media/v4l2-core/v4l2-isp.c
"helper function" is used twice, maybe:
A set of helper functions that assist driver developers with the
validation of the buffer received from userspace is available in
drivers/media/v4l2-core/v4l2-isp.c
?
> +
> +V4L2 ISP support driver documentation
> +=====================================
> +.. kernel-doc:: include/media/v4l2-isp.h
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 59ab4a34f72c0430a8d7966942acb2242ad923ca..3cc24092995bcb01051cc301ca212c32938cf745 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -26857,6 +26857,7 @@ V4L2 GENERIC ISP PARAMETERS AND STATISTIC FORMATS
> M: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
> L: linux-media@vger.kernel.org
> S: Maintained
> +F: Documentation/driver-api/media/v4l2-isp.rst
> F: Documentation/userspace-api/media/v4l/v4l2-isp.rst
> F: drivers/media/v4l2-core/v4l2-isp.c
> F: include/media/v4l2-isp.h
>
With the comments above addressed,
Reviewed-by: Michael Riesch <michael.riesch@collabora.com>
Thanks and best regards,
Michael
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
prev parent reply other threads:[~2025-10-14 8:55 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-14 8:00 [PATCH v7 0/8] media: Introduce V4L2 generic ISP support Jacopo Mondi
2025-10-14 8:00 ` [PATCH v7 1/8] media: uapi: Introduce V4L2 generic ISP types Jacopo Mondi
2025-10-14 9:42 ` Michael Riesch
2025-10-14 8:00 ` [PATCH v7 2/8] media: uapi: Convert RkISP1 to V4L2 extensible params Jacopo Mondi
2025-10-14 11:14 ` Michael Riesch
2025-10-14 8:00 ` [PATCH v7 3/8] media: uapi: Convert Amlogic C3 " Jacopo Mondi
2025-10-14 8:00 ` [PATCH v7 4/8] media: Documentation: uapi: Add V4L2 ISP documentation Jacopo Mondi
2025-10-14 9:23 ` Michael Riesch
2025-10-20 8:09 ` Jacopo Mondi
2025-10-20 9:02 ` Michael Riesch
2025-10-14 8:00 ` [PATCH v7 5/8] media: v4l2-core: Introduce v4l2-isp.c Jacopo Mondi
2025-10-14 12:07 ` Michael Riesch
2025-10-14 8:00 ` [PATCH v7 6/8] media: rkisp1: Use v4l2-isp for validation Jacopo Mondi
2025-10-14 8:00 ` [PATCH v7 7/8] media: amlogic-c3: " Jacopo Mondi
2025-10-14 8:01 ` [PATCH v7 8/8] media: Documentation: kapi: Add v4l2 generic ISP support Jacopo Mondi
2025-10-14 8:54 ` Michael Riesch [this message]
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=e4672b5e-8f22-4220-b666-4aad06787c71@collabora.com \
--to=michael.riesch@collabora.com \
--cc=antoine.bouyer@nxp.com \
--cc=dafna@fastmail.com \
--cc=dan.scally@ideasonboard.com \
--cc=heiko@sntech.de \
--cc=jacopo.mondi@ideasonboard.com \
--cc=keke.li@amlogic.com \
--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=linux-rockchip@lists.infradead.org \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.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