From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Cc: Daniel Scally <dan.scally@ideasonboard.com>,
linux-media@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, Anthony.McGivern@arm.com,
nayden.kanchev@arm.com, robh+dt@kernel.org, mchehab@kernel.org,
krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org,
jerome.forissier@linaro.org, kieran.bingham@ideasonboard.com,
laurent.pinchart@ideasonboard.com,
Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Subject: Re: [PATCH v13 15/15] Documentation: mali-c55: Document the mali-c55 parameter setting
Date: Fri, 14 Nov 2025 16:49:18 +0200 [thread overview]
Message-ID: <aRdBbn4cpdn_7H0v@kekkonen.localdomain> (raw)
In-Reply-To: <2n4sn2aakwl7k2qvcefb7m2zzllytj7i4nup55xex2ggdngfkd@gwpxbpmlupko>
Hi Jacopo,
On Thu, Nov 13, 2025 at 09:39:37AM +0100, Jacopo Mondi wrote:
> > +the data member with the blocks that need to be configured by the driver, but
> > +need not populate it with **all** the blocks, or indeed with any at all if there
> > +are no configuration changes to make. Populated blocks **must** be consecutive
> > +in the buffer. To assist both userspace and the driver in identifying the
> > +blocks each block-specific struct embeds :c:type:`v4l2_params_block_header` as
> > +its first member and userspace must populate the type member with a value from
> > +:c:type:`mali_c55_param_block_type`. Once the blocks have been populated
> > +into the data buffer, the combined size of all populated blocks shall be set in
> > +the data_size member of :c:type:`v4l2_params_buffer`. For example:
> > +
> > +.. code-block:: c
> > +
> > + struct v4l2_params_buffer *params =
> > + (struct v4l2_params_buffer *)buffer;
> > +
> > + params->version = MALI_C55_PARAM_BUFFER_V1;
> > + params->data_size = 0;
> > +
> > + void *data = (void *)params->data;
> > +
> > + struct mali_c55_params_awb_gains *gains =
> > + (struct mali_c55_params_awb_gains *)data;
> > +
> > + gains->header.type = MALI_C55_PARAM_BLOCK_AWB_GAINS;
> > + gains->header.flags |= V4L2_PARAMS_FL_BLOCK_ENABLE;
> > + gains->header.size = sizeof(struct mali_c55_params_awb_gains);
> > +
> > + gains->gain00 = 256;
> > + gains->gain00 = 256;
> > + gains->gain00 = 256;
> > + gains->gain00 = 256;
> > +
> > + data += sizeof(struct mali_c55_params_awb_gains);
> > + params->data_size += sizeof(struct mali_c55_params_awb_gains);
> > +
> > + struct mali_c55_params_sensor_off_preshading *blc =
> > + (struct mali_c55_params_sensor_off_preshading *)data;
> > +
> > + blc->header.type = MALI_C55_PARAM_BLOCK_SENSOR_OFFS;
> > + blc->header.flags |= V4L2_PARAMS_FL_BLOCK_ENABLE;
> > + blc->header.size = sizeof(struct mali_c55_params_sensor_off_preshading);
> > +
> > + blc->chan00 = 51200;
> > + blc->chan01 = 51200;
> > + blc->chan10 = 51200;
> > + blc->chan11 = 51200;
> > +
> > + params->total_size += sizeof(struct mali_c55_params_sensor_off_preshading);
>
> s/total_size/data_size
>
> And I've also updated it to use the v4l2-isp types
>
> +.. code-block:: c
> +
> + struct v4l2_isp_params_buffer *params =
> + (struct v4l2_isp_params_buffer *)buffer;
What's the type of buffer here? If it's void, you can drop the cast.
> +
> + params->version = MALI_C55_PARAM_BUFFER_V1;
> + params->data_size = 0;
> +
> + void *data = (void *)params->data;
No need for a cast here.
> +
> + struct mali_c55_params_awb_gains *gains =
> + (struct mali_c55_params_awb_gains *)data;
Ditto.
Unless, I guess, you use C++. :-)
> +
> + gains->header.type = MALI_C55_PARAM_BLOCK_AWB_GAINS;
> + gains->header.flags |= V4L2_ISP_PARAMS_FL_BLOCK_ENABLE;
> + gains->header.size = sizeof(struct mali_c55_params_awb_gains);
> +
> + gains->gain00 = 256;
> + gains->gain00 = 256;
> + gains->gain00 = 256;
> + gains->gain00 = 256;
> +
> + data += sizeof(struct mali_c55_params_awb_gains);
data += sizeof(*gains);
?
> + params->data_size += sizeof(struct mali_c55_params_awb_gains);
Ditto.
> +
> + struct mali_c55_params_sensor_off_preshading *blc =
> + (struct mali_c55_params_sensor_off_preshading *)data;
> +
> + blc->header.type = MALI_C55_PARAM_BLOCK_SENSOR_OFFS;
> + blc->header.flags |= V4L2_ISP_PARAMS_FL_BLOCK_ENABLE;
> + blc->header.size = sizeof(struct mali_c55_params_sensor_off_preshading);
> +
> + blc->chan00 = 51200;
> + blc->chan01 = 51200;
> + blc->chan10 = 51200;
> + blc->chan11 = 51200;
> +
> + params->data_size += sizeof(struct mali_c55_params_sensor_off_preshading);
... += sizeof(*blc);
?
>
> With your ack, I'll apply the following changes before sending the PR.
>
> Thanks
> j
>
> > +
> > Arm Mali-C55 uAPI data types
> > ============================
> >
> >
--
Regards,
Sakari Ailus
next prev parent reply other threads:[~2025-11-14 14:49 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-11 16:15 [PATCH v13 00/15] Add Arm Mali-C55 Image Signal Processor Driver Daniel Scally
2025-11-11 16:15 ` [PATCH v13 01/15] media: uapi: Add MEDIA_BUS_FMT_RGB202020_1X60 format code Daniel Scally
2025-11-11 16:15 ` [PATCH v13 02/15] media: uapi: Add 20-bit bayer formats Daniel Scally
2025-11-11 16:15 ` [PATCH v13 03/15] dt-bindings: media: Add bindings for ARM mali-c55 Daniel Scally
2025-11-11 16:15 ` [PATCH v13 04/15] media: uapi: Add controls for Mali-C55 ISP Daniel Scally
2025-11-11 16:15 ` [PATCH v13 06/15] media: Documentation: Add Mali-C55 ISP Documentation Daniel Scally
2025-11-11 16:15 ` [PATCH v13 07/15] MAINTAINERS: Add entry for mali-c55 driver Daniel Scally
2025-11-11 16:15 ` [PATCH v13 08/15] media: Add MALI_C55_3A_STATS meta format Daniel Scally
2025-11-11 16:15 ` [PATCH v13 09/15] media: uapi: Add 3a stats buffer for mali-c55 Daniel Scally
2025-11-11 16:15 ` [PATCH v13 10/15] media: platform: Add mali-c55 3a stats devnode Daniel Scally
2025-11-11 16:15 ` [PATCH v13 11/15] Documentation: mali-c55: Add Statistics documentation Daniel Scally
2025-11-11 16:15 ` [PATCH v13 12/15] media: mali-c55: Add image formats for Mali-C55 parameters buffer Daniel Scally
2025-11-11 16:15 ` [PATCH v13 13/15] media: uapi: Add parameters structs to mali-c55-config.h Daniel Scally
2025-11-11 16:15 ` [PATCH v13 14/15] media: platform: Add mali-c55 parameters video node Daniel Scally
2025-11-11 16:15 ` [PATCH v13 15/15] Documentation: mali-c55: Document the mali-c55 parameter setting Daniel Scally
2025-11-13 8:39 ` Jacopo Mondi
2025-11-14 14:49 ` Sakari Ailus [this message]
2025-11-14 14:57 ` Jacopo Mondi
2025-11-14 15:28 ` Sakari Ailus
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=aRdBbn4cpdn_7H0v@kekkonen.localdomain \
--to=sakari.ailus@linux.intel.com \
--cc=Anthony.McGivern@arm.com \
--cc=conor+dt@kernel.org \
--cc=dan.scally@ideasonboard.com \
--cc=devicetree@vger.kernel.org \
--cc=jacopo.mondi@ideasonboard.com \
--cc=jerome.forissier@linaro.org \
--cc=kieran.bingham@ideasonboard.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=nayden.kanchev@arm.com \
--cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
--cc=robh+dt@kernel.org \
/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