The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: "Niklas Söderlund" <niklas.soderlund@ragnatech.se>
To: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
	Daniel Scally <dan.scally@ideasonboard.com>,
	Keke Li <keke.li@amlogic.com>,
	Antoine Bouyer <antoine.bouyer@nxp.com>,
	Jai Luthra <jai.luthra@ideasonboard.com>,
	Ricardo Ribalda <ribalda@chromium.org>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Hans Verkuil <hverkuil+cisco@kernel.org>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/6] media: Documentation: uapi: Update V4L2 ISP for extensible stats
Date: Fri, 15 May 2026 20:19:12 +0200	[thread overview]
Message-ID: <20260515181912.GR332351@ragnatech.se> (raw)
In-Reply-To: <20260505-extensible-stats-v1-2-e16f326b8dad@ideasonboard.com>

Hello Antoine and Jacopo,

Thanks for your work.

On 2026-05-05 16:12:13 +0200, Jacopo Mondi wrote:
> From: Antoine Bouyer <antoine.bouyer@nxp.com>
> 
> Rework the userspace-api documentation of V4L2 ISP to support
> statistics.
> 
> Update all occurences of 'v4l2_isp_param' types to match the uAPI
> changes and add a section to document the statistics serialization
> format.
> 
> Signed-off-by: Antoine Bouyer <antoine.bouyer@nxp.com>
> [Update on uAPI changes]
> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>

Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

> ---
>  Documentation/userspace-api/media/v4l/v4l2-isp.rst | 45 ++++++++++++++++------
>  1 file changed, 34 insertions(+), 11 deletions(-)
> 
> diff --git a/Documentation/userspace-api/media/v4l/v4l2-isp.rst b/Documentation/userspace-api/media/v4l/v4l2-isp.rst
> index facf6dba1ca7..8a3f05b5e85f 100644
> --- a/Documentation/userspace-api/media/v4l/v4l2-isp.rst
> +++ b/Documentation/userspace-api/media/v4l/v4l2-isp.rst
> @@ -18,22 +18,22 @@ single C structure that contains a header, followed by a binary buffer where
>  userspace programs a variable number of ISP configuration data block, one for
>  each supported ISP feature.
>  
> -The :c:type:`v4l2_isp_params_buffer` structure defines the buffer header which
> -is followed by a binary buffer of ISP configuration data. Userspace shall
> -correctly populate the buffer header with the generic parameters format version
> -and with the size (in bytes) of the binary data buffer where it will store the
> -ISP blocks configuration.
> -
> -Each *ISP configuration block* is preceded by an header implemented by the
> -:c:type:`v4l2_isp_params_block_header` structure, followed by the configuration
> +The :c:type:`v4l2_isp_buffer` structure defines the buffer header which is
> +followed by a binary buffer of ISP configuration data. Userspace shall correctly
> +populate the buffer header with the serialization format version and with the
> +size (in bytes) of the binary data buffer where it will store the ISP blocks
> +configuration.
> +
> +Each *ISP configuration block* is preceded by a header implemented by the
> +:c:type:`v4l2_isp_block_header` structure, followed by the configuration
>  parameters for that specific block, defined by the ISP driver specific data
>  types.
>  
>  Userspace applications are responsible for correctly populating each block's
>  header fields (type, flags and size) and the block-specific parameters.
>  
> -ISP block enabling, disabling and configuration
> ------------------------------------------------
> +ISP parameters block enabling, disabling and configuration
> +----------------------------------------------------------
>  
>  When userspace wants to configure and enable an ISP block it shall fully
>  populate the block configuration and set the V4L2_ISP_PARAMS_FL_BLOCK_ENABLE
> @@ -59,7 +59,30 @@ definition without invalidating the existing ones.
>  ISP statistics
>  ==============
>  
> -Support for generic statistics format is not yet implemented in Video4Linux2.
> +The generic ISP statistics format is identical to the generic ISP configuration
> +parameters format. It is realized by defining a C structure that contains a
> +header, followed by binary buffer where the ISP driver copies a variable number
> +of ISP statistics blocks.
> +
> +Extensible statistics buffers have :c:type:`v4l2_isp_buffer` header followed by
> +a binary buffer of ISP statistics data. ISP drivers populate the buffer header
> +with the serialization format version and with the size (in bytes) of the binary
> +data buffer where ISP statistics data are serialized. Applications shall
> +validate that the serialization format version matches the expected one and that
> +the buffer size doesn't exceed the maximum size for a statistics buffer as
> +declared by the driver's uAPI header.
> +
> +Each *ISP statistics block* is preceded by a header implemented by the
> +:c:type:`v4l2_isp_block_header` structure, followed by the statistics data for
> +that specific block. The driver might optionally report platform-specific flags
> +associated with each statistics block.
> +
> +Applications inspect the statistics block type as reported in the header and
> +validates the reported size matches the block's expected size before accessing
> +the ISP statistics data.
> +
> +Extension to the statistics format can be implemented by adding new blocks
> +definition without invalidating the existing ones.
>  
>  V4L2 ISP uAPI data types
>  ========================
> 
> -- 
> 2.53.0
> 

-- 
Kind Regards,
Niklas Söderlund

  reply	other threads:[~2026-05-15 18:19 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-05 14:12 [PATCH 0/6] media: v4l2-isp: Add support for extensible statistics Jacopo Mondi
2026-05-05 14:12 ` [PATCH 1/6] media: uapi: v4l2-isp: Add " Jacopo Mondi
2026-05-15 18:17   ` Niklas Söderlund
2026-05-05 14:12 ` [PATCH 2/6] media: Documentation: uapi: Update V4L2 ISP for extensible stats Jacopo Mondi
2026-05-15 18:19   ` Niklas Söderlund [this message]
2026-05-05 14:12 ` [PATCH 3/6] media: v4l2-isp: Rename v4l2_isp_params_buffer_size Jacopo Mondi
2026-05-06  8:11   ` Antoine Bouyer
2026-05-06  8:35     ` Jacopo Mondi
2026-05-06  8:57       ` Antoine Bouyer
2026-05-15 18:21   ` Niklas Söderlund
2026-05-05 14:12 ` [PATCH 4/6] media: v4l2-isp: Add per-block validation callback Jacopo Mondi
2026-05-15 18:22   ` Niklas Söderlund
2026-05-05 14:12 ` [PATCH 5/6] media: amlogic-c3: Implement per-block validation Jacopo Mondi
2026-05-05 14:12 ` [PATCH 6/6] media: v4l2-isp: Add helpers for stats buffer Jacopo Mondi
2026-05-15 18:29   ` Niklas Söderlund
2026-05-05 16:49 ` [PATCH 0/6] media: v4l2-isp: Add support for extensible statistics Antoine Bouyer
2026-05-12  9:26   ` Antoine Bouyer
2026-05-13  1:04     ` Keke Li
2026-05-15 13:11       ` 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=20260515181912.GR332351@ragnatech.se \
    --to=niklas.soderlund@ragnatech.se \
    --cc=antoine.bouyer@nxp.com \
    --cc=dan.scally@ideasonboard.com \
    --cc=hverkuil+cisco@kernel.org \
    --cc=jacopo.mondi@ideasonboard.com \
    --cc=jai.luthra@ideasonboard.com \
    --cc=keke.li@amlogic.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=ribalda@chromium.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