[PATCH v4 0/2] media: mali-c55: Add support for CCM and Gamma
From: Jacopo Mondi
Date: Tue Jun 30 2026 - 03:45:24 EST
Add support for Ccm and Gamma to the Mali-C55 ISP by defining the
corresponding blocks in the uAPI and implementing their handling in
the driver.
v3 implements validation of CCM and Gamma parameters using the new
block_validate() callback from v4l2-isp.
I kept the two patches unsquashed, to discuss if it is worth validating
the fields or we should rely on masking before writing to registers.
And in fact in v4 I removed them again but I expanded the documentation
a little to explicit mention the bitwidth of each field
Bonus: pahole output for the two new uAPI members
struct mali_c55_params_ccm {
struct v4l2_isp_params_block_header header __attribute__((__aligned__(8))); /* 0 8 */
__u16 coeffs[3][3]; /* 8 18 */
__u16 gains[3]; /* 26 6 */
__u16 offs[3]; /* 32 6 */
/* size: 40, cachelines: 1, members: 4 */
/* padding: 2 */
/* forced alignments: 1 */
/* last cacheline: 40 bytes */
} __attribute__((__aligned__(8)));
struct mali_c55_params_gamma {
struct v4l2_isp_params_block_header header __attribute__((__aligned__(8))); /* 0 8 */
__u16 gains[3]; /* 8 6 */
__u16 offs[3]; /* 14 6 */
__u32 lut[129]; /* 20 516 */
/* size: 536, cachelines: 9, members: 4 */
/* forced alignments: 1 */
/* last cacheline: 24 bytes */
} __attribute__((__aligned__(8)));
Thanks
j
Signed-off-by: Jacopo Mondi <jacopo.mondi+renesas@xxxxxxxxxxxxxxxx>
---
Changes in v4:
- Rebase on media-committers next
- Drop validation patches
- Explicily mention the bit width of each field in uAPI
- Link to v3: https://lore.kernel.org/r/20260627-mali-c55-ccm-gamma-v3-0-113584c05174@xxxxxxxxxxxxxxxx
Changes in v3:
- Address review comments from Linus and Vincenzo (changelog per patch)
- Rebase on top of
"[PATCH v3 0/6] media: v4l2-isp: Add support for extensible statistics"
https://patchwork.linuxtv.org/project/linux-media/list/?series=26929
to perform per-block validation
- Add 2 patches for validating CCM and Gamma parameters
- Collect tags
- Link to v2: https://lore.kernel.org/r/20260616-mali-c55-ccm-gamma-v2-0-0f93e9a95d98@xxxxxxxxxxxxxxxx
Changes in v2:
- remove unused 'rgb_enable' in gamma uapi
- address checkpatch issues
- Link to v1: https://lore.kernel.org/r/20260616-mali-c55-ccm-gamma-v1-0-174fe4fedea3@xxxxxxxxxxxxxxxx
---
Jacopo Mondi (2):
media: mali-c55: Add support for CCM
media: mali-c55: Add support for RGB Gamma
.../media/platform/arm/mali-c55/mali-c55-params.c | 127 +++++++++++++++++++++
.../platform/arm/mali-c55/mali-c55-registers.h | 13 ++-
include/uapi/linux/media/arm/mali-c55-config.h | 86 +++++++++++++-
3 files changed, 221 insertions(+), 5 deletions(-)
---
base-commit: a1d83d1b810665bd53ce8a7b7867e054d68676c7
change-id: 20260616-mali-c55-ccm-gamma-c02a0df59f98
Best regards,
--
Jacopo Mondi <jacopo.mondi@xxxxxxxxxxxxxxxx>