Re: [PATCH v9 02/13] media: uapi: Add extensible param and stats blocks for RPPX1

From: Jacopo Mondi

Date: Wed Jun 03 2026 - 06:51:07 EST


Hi Niklas

On Sat, May 16, 2026 at 11:13:09PM +0200, Niklas Söderlund wrote:
> From: Jai Luthra <jai.luthra@xxxxxxxxxxxxxxxx>
>
> Add the scaffolding for the parameters and statistics buffers for
> Dreamchip RPPX1. The parameters for each ISP function block will be
> added together with the logic for it.
>
> In addition to the scaffolding add a common struct that describes the
> measurement window. This struct is not specific to any block and will
> used by many of them.
>
> Signed-off-by: Jai Luthra <jai.luthra@xxxxxxxxxxxxxxxx>
> [Niklas: Commit message]
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@xxxxxxxxxxxx>
> ---
> .../uapi/linux/media/dreamchip/rppx1-config.h | 66 +++++++++++++++++++
> 1 file changed, 66 insertions(+)
> create mode 100644 include/uapi/linux/media/dreamchip/rppx1-config.h
>
> diff --git a/include/uapi/linux/media/dreamchip/rppx1-config.h b/include/uapi/linux/media/dreamchip/rppx1-config.h
> new file mode 100644
> index 000000000000..26627be6f483
> --- /dev/null
> +++ b/include/uapi/linux/media/dreamchip/rppx1-config.h
> @@ -0,0 +1,66 @@
> +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
> +/*
> + * Dreamchip RPP-X1 ISP Driver - Userspace API
> + *
> + * Copyright (C) 2026 Renesas Electronics Corp.
> + * Copyright (C) 2026 Ideas on Board Oy
> + * Copyright (C) 2026 Ragnatech AB
> + */
> +
> +#ifndef __UAPI_RPP_X1_CONFIG_H
> +#define __UAPI_RPP_X1_CONFIG_H
> +
> +#include <linux/types.h>

v4l2-isp.h already includes this one

> +#include <linux/media/v4l2-isp.h>
> +
> +/**
> + * struct rppx1_window - Measurement window
> + *
> + * RPP-X1 measurement window. Different blocks use a window or multiple
> + * windows for measurement purposes. This defines a common type for all of
> + * them. The number of relevant bits depends on the block where the window is
> + * used and is specified in the per-block description
> + *
> + * @h_offs: horizontal offset from the left of the frame in pixels
> + * @v_offs: vertical offset from the top of the frame in pixels
> + * @h_size: horizontal size of the window in pixels
> + * @v_size: vertical size of the window in pixels
> + */
> +struct rppx1_window {
> + __u16 h_offs;
> + __u16 v_offs;
> + __u16 h_size;
> + __u16 v_size;
> +};
> +
> +/* ---------------------------------------------------------------------------
> + * Parameter Structures
> + *
> + * Native RPP-X1 precision. Fields use __u32 where the hardware provides
> + * wider-than-8-bit results.
> + */
> +
> +/**
> + * RPPX1_PARAMS_MAX_SIZE - Maximum size of all RPP-X1 parameter blocks
> + *
> + * Some types are reported twice as the same block might be instantiated in
> + * multiple pipes.
> + */
> +#define RPPX1_PARAMS_MAX_SIZE 0
> +
> +/* ---------------------------------------------------------------------------
> + * Statistics Structures
> + *
> + * Native RPP-X1 precision. Fields use __u32 where the hardware provides
> + * wider-than-8-bit results.
> + */
> +
> +/**
> + * RPPX1_STATS_MAX_SIZE - Maximum size of all RPP-X1 statistics
> + *
> + * Some types are reported twice as the same block might be instantiated in
> + * multiple pipes.
> + */
> +#define RPPX1_STATS_MAX_SIZE 0
> +
> +#endif /* __UAPI_RPP_X1_CONFIG_H */

Reviewed-by: Jacopo Mondi <jacopo.mondi@xxxxxxxxxxxxxxxx>

Thanks
j

> --
> 2.54.0
>