From: sashiko-bot@kernel.org
To: "Anthony McGivern" <anthony.mcgivern@arm.com>,
devicetree@vger.kernel.org
Cc: robh@kernel.org, conor+dt@kernel.org, media-ci@linuxtv.org
Subject: Re: [PATCH 21/24] media: uapi: Add parameter structs to mali-c720-config.h
Date: Tue, 24 Nov 2026 17:33:10 +0000 [thread overview]
Message-ID: <sashiko-outbox-231707@kernel.org> (raw)
In-Reply-To: <20261124-b4-initial-upstream-candidate-v1-21-0cb9bde1bd30@arm.com>
Thank you for your contribution! Sashiko AI review found 3 potential
issues to consider:
- [Low] media: uapi: implicit trailing padding in mali-c720 parameter
structs
- [Low] media: uapi: undocumented MALI_C720_PARAM_BLOCK_MAX in
kernel-doc
- [Low] media: uapi: missing kernel-doc on mali_c720_params_*_mask enums
--
commit e1aa4f73c1087846692d06506ff1d937ae9e0835
Author: Anthony McGivern <Anthony.McGivern@arm.com>
media: uapi: Add parameter structs to mali-c720-config.h
This commit adds the UAPI parameter block structures, mask enums, and
V4L2_CID_MALI_C720_PARAM_CAPABILITIES control ID to mali-c720-config.h.
> diff --git a/include/uapi/linux/media/arm/mali-c720-config.h b/include/uapi/linux/media/arm/mali-c720-config.h
> index 445cae09a84cc..f200380f3c2c8 100644
> --- a/include/uapi/linux/media/arm/mali-c720-config.h
> +++ b/include/uapi/linux/media/arm/mali-c720-config.h
[ ... ]
> @@ -179,6 +181,558 @@ struct mali_c720_stats_histogram {
> sizeof(struct mali_c720_stats_histogram) + \
> sizeof(struct mali_c720_stats_histogram))
>
> +/**
> + * enum mali_c720_param_block_type - Mali-C720 parameter block targets
> + *
> + * @MALI_C720_PARAM_BLOCK_DIGITAL_GAIN_INP: Digital gain for the input pipeline.
> + * @MALI_C720_PARAM_BLOCK_HISTOGRAM_INP: Histogram configuration for the input pipeline.
> + * @MALI_C720_PARAM_BLOCK_AWB_GAINS_HV: Auto-white balance gains for the HV pipeline.
> + * @MALI_C720_PARAM_BLOCK_HISTOGRAM_HV: HV histogram configuration (pre-Iridix).
> + * @MALI_C720_PARAM_BLOCK_HISTOGRAM_HV_IRIDIX: HV histogram configuration (post-Iridix).
> + * @MALI_C720_PARAM_BLOCK_COLOR_STATS_HV: Color stats configuration for the HV pipeline.
> + * @MALI_C720_PARAM_BLOCK_BLACK_LEVEL_HV: Black level offsets for the HV pipeline.
> + * @MALI_C720_PARAM_BLOCK_SQRT_INP: Square root configuration for the input pipeline.
> + * @MALI_C720_PARAM_BLOCK_SQUARE_A_HV: Square A configuration for the HV pipeline.
> + * @MALI_C720_PARAM_BLOCK_SQUARE_B_HV: Square B configuration for the HV pipeline.
> + * @MALI_C720_PARAM_BLOCK_SQRT_HV: Square root configuration for the HV pipeline.
> + * @MALI_C720_PARAM_BLOCK_DECOMPANDER_INP: Decompander configuration.
> + *
> + * Each identifier selects one logical module and instance. Applications can
> + * query V4L2_CID_MALI_C720_PARAM_CAPABILITIES for the targets present on the
> + * device. The control returns a read-only U16 array of supported identifiers.
> + */
> +enum mali_c720_param_block_type {
> + MALI_C720_PARAM_BLOCK_DIGITAL_GAIN_INP,
> + MALI_C720_PARAM_BLOCK_HISTOGRAM_INP,
> + MALI_C720_PARAM_BLOCK_AWB_GAINS_HV,
> + MALI_C720_PARAM_BLOCK_HISTOGRAM_HV,
> + MALI_C720_PARAM_BLOCK_HISTOGRAM_HV_IRIDIX,
> + MALI_C720_PARAM_BLOCK_COLOR_STATS_HV,
> + MALI_C720_PARAM_BLOCK_BLACK_LEVEL_HV,
> + MALI_C720_PARAM_BLOCK_SQRT_INP,
> + MALI_C720_PARAM_BLOCK_SQUARE_A_HV,
> + MALI_C720_PARAM_BLOCK_SQUARE_B_HV,
> + MALI_C720_PARAM_BLOCK_SQRT_HV,
> + MALI_C720_PARAM_BLOCK_DECOMPANDER_INP,
> + MALI_C720_PARAM_BLOCK_MAX,
> +};
[Severity: Low]
Should MALI_C720_PARAM_BLOCK_MAX either be documented in the kernel-doc
comment or marked with /* private: */? Without one of those, kernel-doc
emits a warning that MALI_C720_PARAM_BLOCK_MAX is not described in
enum mali_c720_param_block_type.
> +
> #define V4L2_CID_MALI_C720_STATS_CAPABILITIES (V4L2_CID_USER_MALI_C720_BASE + 0)
> +#define V4L2_CID_MALI_C720_PARAM_CAPABILITIES (V4L2_CID_USER_MALI_C720_BASE + 1)
> +
> +enum mali_c720_params_digital_gain_mask {
> + MALI_C720_PARAMS_DIGITAL_GAIN_MASK_GAIN,
> + MALI_C720_PARAMS_DIGITAL_GAIN_MASK_OFFSET,
> +};
> +
> +/**
> + * struct mali_c720_params_digital_gain - Digital gain settings
> + *
> + * This struct configures the digital gain and a common black level for all
> + * color channels.
> + *
> + * Set header.type to the target from &enum mali_c720_param_block_type.
> + * See &enum mali_c720_params_digital_gain_mask for the @updated_mask bit positions.
[Severity: Low]
Should enum mali_c720_params_digital_gain_mask and the other six
mali_c720_params_*_mask enums in this header have kernel-doc comments?
Each parameter struct's kernel-doc links to its mask enum via
&enum mali_c720_params_*_mask, so without kernel-doc on the enums they are
omitted from the generated UAPI documentation and those Sphinx
cross-references remain unresolved.
[ ... ]
> +struct mali_c720_params_sqrt {
> + struct v4l2_isp_block_header header;
> + __u64 updated_mask;
> + __u32 normalization;
> + __u32 black_level_linear;
> + __u16 black_level_sqrt;
> +};
[ ... ]
> +struct mali_c720_params_square {
> + struct v4l2_isp_block_header header;
> + __u64 updated_mask;
> + __u32 black_level_linear;
> + __u32 black_level_sqrt;
> + __u32 normalization;
> +};
[ ... ]
> +struct mali_c720_params_decompander {
> + struct v4l2_isp_block_header header;
> + __u64 updated_mask;
> + __u8 enable;
> + __u8 reserved[3];
> + __u32 lut_x[MALI_C720_NUM_DECOMPANDER_LUT_ELEMENTS];
> + __u32 lut_y[MALI_C720_NUM_DECOMPANDER_LUT_ELEMENTS];
> +};
[ ... ]
> +struct mali_c720_params_histogram {
> + struct v4l2_isp_block_header header;
> + __u64 updated_mask;
> + __u8 stream_mux_select;
> + __u8 nodes_used_horiz;
> + __u8 nodes_used_vert;
> + __u8 skip_x;
> + __u8 skip_y;
> + __u8 offset_x;
> + __u8 offset_y;
> + __u8 scale_bottom;
> + __u8 scale_top;
> + __u8 plane_mode;
> + __u8 reserved[2];
> + __u8 weights[MALI_C720_MAX_ZONES];
> +};
[Severity: Low]
Should struct mali_c720_params_sqrt, struct mali_c720_params_square,
struct mali_c720_params_decompander, and struct mali_c720_params_histogram
pad out to their 8-byte alignment boundary with explicit reserved fields?
Because struct v4l2_isp_block_header and updated_mask require 8-byte
alignment, the compiler adds unnamed trailing padding to each of these
four UAPI structs (6 bytes in mali_c720_params_sqrt, and 4 bytes each in
mali_c720_params_square, mali_c720_params_decompander, and
mali_c720_params_histogram where reserved[2] only aligns to a 4-byte
boundary). That leaves implicit padding in the serialized buffer layout
that triggers -Wpadded warnings and cannot be zeroed or validated via
named reserved fields.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261124-b4-initial-upstream-candidate-v1-0-0cb9bde1bd30@arm.com?part=21
next prev parent reply other threads:[~2026-11-24 17:33 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-24 17:07 [PATCH 00/24] Add Arm Mali-C720 Image Signal Processor Driver Anthony McGivern
2026-11-24 17:07 ` [PATCH 01/24] media: uapi: Add 24-bit Bayer media bus formats Anthony McGivern
2026-11-24 17:07 ` [PATCH 02/24] dt-bindings: media: Add bindings for Arm Mali-C720 Anthony McGivern
2026-11-24 17:18 ` sashiko-bot
2026-11-25 8:51 ` Krzysztof Kozlowski
2026-11-26 14:55 ` Anthony McGivern
2026-11-26 15:12 ` Krzysztof Kozlowski
2026-11-27 12:32 ` Anthony McGivern
2026-11-27 12:49 ` Laurent Pinchart
2026-11-27 14:25 ` Anthony McGivern
2026-11-24 17:07 ` [PATCH 03/24] media: uapi: Add a control ID base for Mali-C720 ISP Anthony McGivern
2026-11-24 17:07 ` [PATCH 04/24] media: mali-c720: Add register access helpers Anthony McGivern
2026-11-24 17:07 ` [PATCH 05/24] media: mali-c720: Add hardware identification Anthony McGivern
2026-11-25 8:52 ` Krzysztof Kozlowski
2026-11-26 15:00 ` Anthony McGivern
2026-11-24 17:07 ` [PATCH 06/24] media: mali-c720: Add format handling Anthony McGivern
2026-11-24 17:07 ` [PATCH 07/24] media: mali-c720: Add hardware discovery support Anthony McGivern
2026-11-24 17:07 ` [PATCH 08/24] media: mali-c720: Add context manager and interrupt handling Anthony McGivern
2026-11-24 17:07 ` [PATCH 09/24] media: mali-c720: Add input frontend subdevice Anthony McGivern
2026-11-24 17:07 ` [PATCH 10/24] media: mali-c720: Add ISP and human vision subdevices Anthony McGivern
2026-11-24 17:07 ` [PATCH 11/24] media: mali-c720: Add full-resolution output subdevice Anthony McGivern
2026-11-24 17:21 ` sashiko-bot
2026-11-24 17:07 ` [PATCH 12/24] media: mali-c720: Add video capture nodes Anthony McGivern
2026-11-24 17:35 ` sashiko-bot
2026-11-24 17:07 ` [PATCH 13/24] media: mali-c720: Add Mali-C720 ISP driver Anthony McGivern
2026-11-24 17:39 ` sashiko-bot
2026-11-25 8:55 ` Krzysztof Kozlowski
2026-11-26 15:53 ` Anthony McGivern
2026-12-01 18:40 ` Linus Walleij
2026-12-01 22:10 ` Laurent Pinchart
2026-12-01 22:20 ` Linus Walleij
2026-11-24 17:07 ` [PATCH 14/24] media: mali-c720: Add test pattern generator subdevices Anthony McGivern
2026-11-24 17:07 ` [PATCH 15/24] media: Documentation: Add Mali-C720 ISP documentation Anthony McGivern
2026-11-24 17:20 ` sashiko-bot
2026-11-28 0:43 ` kernel test robot
2026-11-24 17:07 ` [PATCH 16/24] media: uapi: Add Mali-C720 statistics meta format Anthony McGivern
2026-11-24 17:07 ` [PATCH 17/24] media: uapi: Add statistics structs to mali-c720-config.h Anthony McGivern
2026-11-24 17:26 ` sashiko-bot
2026-11-24 17:07 ` [PATCH 18/24] media: mali-c720: Add 3A statistics video node Anthony McGivern
2026-11-24 17:31 ` sashiko-bot
2026-11-24 17:07 ` [PATCH 19/24] media: Documentation: Document Mali-C720 statistics capture Anthony McGivern
2026-11-24 17:25 ` sashiko-bot
2026-11-24 17:07 ` [PATCH 20/24] media: uapi: Add Mali-C720 parameters meta format Anthony McGivern
2026-11-24 17:07 ` [PATCH 21/24] media: uapi: Add parameter structs to mali-c720-config.h Anthony McGivern
2026-11-24 17:33 ` sashiko-bot [this message]
2026-11-24 17:07 ` [PATCH 22/24] media: mali-c720: Add parameters video node Anthony McGivern
2026-11-24 17:45 ` sashiko-bot
2026-11-24 17:07 ` [PATCH 23/24] media: Documentation: Document Mali-C720 parameter settings Anthony McGivern
2026-11-24 17:07 ` [PATCH 24/24] MAINTAINERS: Add entry for mali-c720 driver Anthony McGivern
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=sashiko-outbox-231707@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=anthony.mcgivern@arm.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=media-ci@linuxtv.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.