Show a patch.

GET /api/1.1/patches/24632/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 24632,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/24632/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/24632/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api",
        "name": "libcamera",
        "link_name": "libcamera",
        "list_id": "libcamera_core",
        "list_email": "libcamera-devel@lists.libcamera.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20251014-v4l2-params-v6-3-caf5fa69eb29@ideasonboard.com>",
    "date": "2025-10-14T10:55:38",
    "name": "[v6,3/5] ipa: Update Mali C55 header file and adjust IPA",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "2ad1baff528225b5995bb800d8188142f407b293",
    "submitter": {
        "id": 143,
        "url": "https://patchwork.libcamera.org/api/1.1/people/143/?format=api",
        "name": "Jacopo Mondi",
        "email": "jacopo.mondi@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/24632/mbox/",
    "series": [
        {
            "id": 5499,
            "url": "https://patchwork.libcamera.org/api/1.1/series/5499/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5499",
            "date": "2025-10-14T10:55:35",
            "name": "ipa: libipa: Introduce V4L2Params",
            "version": 6,
            "mbox": "https://patchwork.libcamera.org/series/5499/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/24632/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/24632/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>",
        "X-Original-To": "parsemail@patchwork.libcamera.org",
        "Delivered-To": "parsemail@patchwork.libcamera.org",
        "Received": [
            "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 34095BE080\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 14 Oct 2025 10:55:58 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A1003605DE;\n\tTue, 14 Oct 2025 12:55:56 +0200 (CEST)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E31C7605D6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 14 Oct 2025 12:55:52 +0200 (CEST)",
            "from [192.168.1.182] (93-46-82-201.ip106.fastwebnet.it\n\t[93.46.82.201])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id D8F22EAE;\n\tTue, 14 Oct 2025 12:54:12 +0200 (CEST)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"G4LHaOib\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1760439253;\n\tbh=2OA4WIgL8CjcyqPYWxbDmyvI5xCv7zzEeh3onOk8hVc=;\n\th=From:Date:Subject:References:In-Reply-To:To:Cc:From;\n\tb=G4LHaOib4hZEhrai5OQk+RHOQbjJAQn3jI30n5/Wp215tO2dszU4+VRy4J5TGBJUJ\n\tyE/prsoqgP6wrYoMCMj29aSDzWU3ErJ1C9/6UKpnZVn8raJ3R474Glt8TNm0pQ3xU2\n\ts/lr1j0H+Sv4biMerefrt5E1c6dhZMu+zeri2E0A=",
        "From": "Jacopo Mondi <jacopo.mondi@ideasonboard.com>",
        "Date": "Tue, 14 Oct 2025 12:55:38 +0200",
        "Subject": "[PATCH v6 3/5] ipa: Update Mali C55 header file and adjust IPA",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "7bit",
        "Message-Id": "<20251014-v4l2-params-v6-3-caf5fa69eb29@ideasonboard.com>",
        "References": "<20251014-v4l2-params-v6-0-caf5fa69eb29@ideasonboard.com>",
        "In-Reply-To": "<20251014-v4l2-params-v6-0-caf5fa69eb29@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Jacopo Mondi <jacopo.mondi@ideasonboard.com>, \n\tAntoine Bouyer <antoine.bouyer@nxp.com>, \n\tKieran Bingham <kieran.bingham@ideasonboard.com>, \n\tDaniel Scally <dan.scally@ideasonboard.com>",
        "X-Mailer": "b4 0.14.2",
        "X-Developer-Signature": "v=1; a=openpgp-sha256; l=26410;\n\ti=jacopo.mondi@ideasonboard.com; h=from:subject:message-id;\n\tbh=2OA4WIgL8CjcyqPYWxbDmyvI5xCv7zzEeh3onOk8hVc=;\n\tb=owEBbQKS/ZANAwAKAXI0Bo8WoVY8AcsmYgBo7iw1TuzeGFu3vgHZXo7OsYlRlLQ8nQ9rO5+c5\n\tQmuu1qrPnOJAjMEAAEKAB0WIQS1xD1IgJogio9YOMByNAaPFqFWPAUCaO4sNQAKCRByNAaPFqFW\n\tPA0WD/wJxxVS+9BmDEfUgLCfI448hG3jlRpQHtSRHAr6K5xoaj9rgIlnto1KwJY8K9UrdCrt/wJ\n\tMm4zO7Wnyg9eeI7rwl3WoosWQ7W/VsaeSlGRPbNP9q2VSOSucc0Wd/HovDjAqvqF7N6tITID/lw\n\t9IO6e9PfUAWWXadtoZivZeqRvIrOd5t3nq6QN3EQK9cJmM9//CM5xJ29A7PyTKGhliMg5zm/Eg0\n\tc7SvIiZghhxAMfjUrymQvof7gWvBnXukH5N4Ncvq4DHURuSYvNJMOUcH4/QDKT135b0IBSJTHmn\n\t8Ko5wd48eRbQHJzQcjiYrvsuj3rN2UKlK3mriRc5H/xwvPRdJ5GP6RG9ZuA1l1AiPRXget8rOI5\n\t7tZSCdtMORyLzLzWswV8er2jjhU+EoqVzusgjcp07pTyLtb8/RlGRp+8H1tQUTahnX6njDjPxTb\n\taUqwyg1hKUd34t3p2PfGNMZTffUp5Uh/d4UqzntJR9GRm9nBksBbVIhbWn+N8AfhPSgWmDDDg5l\n\tb7aBp49XzLXLriSOCRSRJvi70C6JQg8Ns8J4+ELk8UYCmlTYfYpwgNSJ0oTbsYMy6iHA+ILIwZo\n\tDefPnIKurH79TJioqUvyK+Kzu3N+ZsuyUwnD0CVkUMDV3nIoXisKnqTw/ANrrR+L6efTBSBj+pt\n\t4rQSfxZEZSnvwxQ==",
        "X-Developer-Key": "i=jacopo.mondi@ideasonboard.com; a=openpgp;\n\tfpr=72392EDC88144A65C701EA9BA5826A2587AD026B",
        "X-BeenThere": "libcamera-devel@lists.libcamera.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "<libcamera-devel.lists.libcamera.org>",
        "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>",
        "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>",
        "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>",
        "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>",
        "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Update Mali C55 header file with the v11 version of the patch series,\nbased on v4l2 extensible parameters, sent to the linux-media mailing list at:\nhttps://lore.kernel.org/all/20250714-c55-v11-0-bc20e460e42a@ideasonboard.com/\n\nAdjust the IPA module to use the new v4l2-isp.h header file.\n\nSigned-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\nTested-by: Antoine Bouyer <antoine.bouyer@nxp.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\nReviewed-by: Daniel Scally <dan.scally@ideasonboard.com>\n---\n include/linux/mali-c55-config.h         | 161 +++++---------------------------\n src/ipa/mali-c55/algorithms/agc.cpp     |  28 +++---\n src/ipa/mali-c55/algorithms/agc.h       |   2 +-\n src/ipa/mali-c55/algorithms/algorithm.h |   2 +-\n src/ipa/mali-c55/algorithms/awb.cpp     |  14 +--\n src/ipa/mali-c55/algorithms/awb.h       |   2 +-\n src/ipa/mali-c55/algorithms/blc.cpp     |   8 +-\n src/ipa/mali-c55/algorithms/blc.h       |   2 +-\n src/ipa/mali-c55/algorithms/lsc.cpp     |  14 +--\n src/ipa/mali-c55/algorithms/lsc.h       |   2 +-\n src/ipa/mali-c55/mali-c55.cpp           |  11 ++-\n src/ipa/mali-c55/module.h               |   2 +-\n 12 files changed, 67 insertions(+), 181 deletions(-)",
    "diff": "diff --git a/include/linux/mali-c55-config.h b/include/linux/mali-c55-config.h\nindex b31415597e886496b65f8fb396c095618467f1ac..109082c5694f6b927dc5511043e3bfbc27a0b675 100644\n--- a/include/linux/mali-c55-config.h\n+++ b/include/linux/mali-c55-config.h\n@@ -9,6 +9,21 @@\n #define __UAPI_MALI_C55_CONFIG_H\n \n #include <linux/types.h>\n+#include <linux/v4l2-controls.h>\n+#include <linux/media/v4l2-isp.h>\n+\n+#define V4L2_CID_MALI_C55_CAPABILITIES\t(V4L2_CID_USER_MALI_C55_BASE + 0x0)\n+#define MALI_C55_GPS_PONG\t\t(1U << 0)\n+#define MALI_C55_GPS_WDR\t\t(1U << 1)\n+#define MALI_C55_GPS_COMPRESSION\t(1U << 2)\n+#define MALI_C55_GPS_TEMPER\t\t(1U << 3)\n+#define MALI_C55_GPS_SINTER_LITE\t(1U << 4)\n+#define MALI_C55_GPS_SINTER\t\t(1U << 5)\n+#define MALI_C55_GPS_IRIDIX_LTM\t\t(1U << 6)\n+#define MALI_C55_GPS_IRIDIX_GTM\t\t(1U << 7)\n+#define MALI_C55_GPS_CNR\t\t(1U << 8)\n+#define MALI_C55_GPS_FRSCALER\t\t(1U << 9)\n+#define MALI_C55_GPS_DS_PIPE\t\t(1U << 10)\n \n /*\n  * Frames are split into zones of almost equal width and height - a zone is a\n@@ -228,65 +243,6 @@ enum mali_c55_param_block_type {\n \tMALI_C55_PARAM_MESH_SHADING_SELECTION,\n };\n \n-#define MALI_C55_PARAM_BLOCK_FL_NONE\t\t\t0\n-#define MALI_C55_PARAM_BLOCK_FL_DISABLED\t\tBIT(0)\n-\n-/**\n- * struct mali_c55_params_block_header - Mali-C55 parameter block header\n- *\n- * This structure represents the common part of all the ISP configuration\n- * blocks. Each parameters block embeds an instance of this structure type\n- * as its first member, followed by the block-specific configuration data. The\n- * driver inspects this common header to discern the block type and its size and\n- * properly handle the block content by casting it to the correct block-specific\n- * type.\n- *\n- * The @type field is one of the values enumerated by\n- * :c:type:`mali_c55_param_block_type` and specifies how the data should be\n- * interpreted by the driver. The @size field specifies the size of the\n- * parameters block and is used by the driver for validation purposes. The\n- * @flags field holds a bitmask of per-block flags MALI_C55_PARAM_BLOCK_FL_*.\n- *\n- * If userspace wants to disable an ISP block the\n- * MALI_C55_PARAM_BLOCK_FL_DISABLED bit should be set in the @flags field. In\n- * that case userspace may optionally omit the remainder of the configuration\n- * block, which will in any case be ignored by the driver. If a new\n- * configuration of an ISP block has to be applied userspace shall fully\n- * populate the ISP block and omit setting the MALI_C55_PARAM_BLOCK_FL_DISABLED\n- * bit in the @flags field.\n- *\n- * Userspace is responsible for correctly populating the parameters block header\n- * fields (@type, @flags and @size) and correctly populate the block-specific\n- * parameters.\n- *\n- * For example:\n- *\n- * .. code-block:: c\n- *\n- *\tvoid populate_sensor_offs(struct mali_c55_params_block_header *block) {\n- *\t\tblock->type = MALI_C55_PARAM_BLOCK_SENSOR_OFFS;\n- *\t\tblock->enabled = MALI_C55_PARAM_BLOCK_FL_NONE;\n- *\t\tblock->size = sizeof(struct mali_c55_params_sensor_off_preshading);\n- *\n- *\t\tstruct mali_c55_params_sensor_off_preshading *sensor_offs =\n- *\t\t\t(struct mali_c55_params_sensor_off_preshading *)block;\n- *\n- *\t\tsensor_offs->chan00 = offset00;\n- *\t\tsensor_offs->chan01 = offset01;\n- *\t\tsensor_offs->chan10 = offset10;\n- *\t\tsensor_offs->chan11 = offset11;\n- *\t}\n- *\n- * @type: The parameters block type from :c:type:`mali_c55_param_block_type`\n- * @flags: Bitmask of block flags\n- * @size: Size (in bytes) of the parameters block\n- */\n-struct mali_c55_params_block_header {\n-\t__u16 type;\n-\t__u16 flags;\n-\t__u32 size;\n-} __attribute__((aligned(8)));\n-\n /**\n  * struct mali_c55_params_sensor_off_preshading - offset subtraction for each\n  *\t\t\t\t\t\t  color channel\n@@ -305,7 +261,7 @@ struct mali_c55_params_block_header {\n  * @chan11: Offset for color channel 11 (default: B)\n  */\n struct mali_c55_params_sensor_off_preshading {\n-\tstruct mali_c55_params_block_header header;\n+\tstruct v4l2_isp_params_block_header header;\n \t__u32 chan00;\n \t__u32 chan01;\n \t__u32 chan10;\n@@ -470,7 +426,7 @@ enum mali_c55_aexp_hist_plane_mode {\n  *\t\t\tThis parameter is unused for the post-Iridix Histogram\n  */\n struct mali_c55_params_aexp_hist {\n-\tstruct mali_c55_params_block_header header;\n+\tstruct v4l2_isp_params_block_header header;\n \t__u8 skip_x;\n \t__u8 offset_x;\n \t__u8 skip_y;\n@@ -502,7 +458,7 @@ struct mali_c55_params_aexp_hist {\n  *\t\t\t@nodes_used_horiz\n  */\n struct mali_c55_params_aexp_weights {\n-\tstruct mali_c55_params_block_header header;\n+\tstruct v4l2_isp_params_block_header header;\n \t__u8 nodes_used_horiz;\n \t__u8 nodes_used_vert;\n \t__u8 zone_weights[MALI_C55_MAX_ZONES];\n@@ -520,7 +476,7 @@ struct mali_c55_params_aexp_weights {\n  * @gain:\tThe digital gain value to apply, in Q5.8 format.\n  */\n struct mali_c55_params_digital_gain {\n-\tstruct mali_c55_params_block_header header;\n+\tstruct v4l2_isp_params_block_header header;\n \t__u16 gain;\n };\n \n@@ -560,7 +516,7 @@ enum mali_c55_awb_stats_mode {\n  * @gain11:\tMultiplier for colour channel 11\n  */\n struct mali_c55_params_awb_gains {\n-\tstruct mali_c55_params_block_header header;\n+\tstruct v4l2_isp_params_block_header header;\n \t__u16 gain00;\n \t__u16 gain01;\n \t__u16 gain10;\n@@ -635,7 +591,7 @@ enum mali_c55_params_awb_tap_points {\n  * @cb_low:\t\tB/G ratio trim low (Q4.8 format)\n  */\n struct mali_c55_params_awb_config {\n-\tstruct mali_c55_params_block_header header;\n+\tstruct v4l2_isp_params_block_header header;\n \t__u8 tap_point;\n \t__u8 stats_mode;\n \t__u16 white_level;\n@@ -745,7 +701,7 @@ struct mali_c55_params_awb_config {\n  * @mesh:\t\tMesh shading correction tables\n  */\n struct mali_c55_params_mesh_shading_config {\n-\tstruct mali_c55_params_block_header header;\n+\tstruct v4l2_isp_params_block_header header;\n \t__u8 mesh_show;\n \t__u8 mesh_scale;\n \t__u8 mesh_page_r;\n@@ -800,7 +756,7 @@ enum mali_c55_params_mesh_alpha_bank {\n  * @mesh_strength:\tMesh strength in Q4.12 format [0..4096]\n  */\n struct mali_c55_params_mesh_shading_selection {\n-\tstruct mali_c55_params_block_header header;\n+\tstruct v4l2_isp_params_block_header header;\n \t__u8 mesh_alpha_bank_r;\n \t__u8 mesh_alpha_bank_g;\n \t__u8 mesh_alpha_bank_b;\n@@ -835,75 +791,4 @@ struct mali_c55_params_mesh_shading_selection {\n \tsizeof(struct mali_c55_params_mesh_shading_config) +\t\\\n \tsizeof(struct mali_c55_params_mesh_shading_selection))\n \n-/**\n- * struct mali_c55_params_buffer - 3A configuration parameters\n- *\n- * This struct contains the configuration parameters of the Mali-C55 ISP\n- * algorithms, serialized by userspace into a data buffer. Each configuration\n- * parameter block is represented by a block-specific structure which contains a\n- * :c:type:`mali_c55_params_block_header` entry as first member. Userspace\n- * populates the @data buffer with configuration parameters for the blocks that\n- * it intends to configure. As a consequence, the data buffer effective size\n- * changes according to the number of ISP blocks that userspace intends to\n- * configure.\n- *\n- * The parameters buffer is versioned by the @version field to allow modifying\n- * and extending its definition. Userspace shall populate the @version field to\n- * inform the driver about the version it intends to use. The driver will parse\n- * and handle the @data buffer according to the data layout specific to the\n- * indicated version and return an error if the desired version is not\n- * supported.\n- *\n- * For each ISP block that userspace wants to configure, a block-specific\n- * structure is appended to the @data buffer, one after the other without gaps\n- * in between nor overlaps. Userspace shall populate the @total_size field with\n- * the effective size, in bytes, of the @data buffer.\n- *\n- * The expected memory layout of the parameters buffer is::\n- *\n- *\t+-------------------- struct mali_c55_params_buffer ------------------+\n- *\t| version = MALI_C55_PARAM_BUFFER_V1;                                 |\n- *\t| total_size = sizeof(struct mali_c55_params_sensor_off_preshading)   |\n- *\t|              sizeof(struct mali_c55_params_aexp_hist);              |\n- *\t| +------------------------- data  ---------------------------------+ |\n- *\t| | +--------- struct mali_c55_params_sensor_off_preshading ------+ | |\n- *\t| | | +-------- struct mali_c55_params_block_header header -----+ | | |\n- *\t| | | | type = MALI_C55_PARAM_BLOCK_SENSOR_OFFS;                | | | |\n- *\t| | | | flags = MALI_C55_PARAM_BLOCK_FL_NONE;                   | | | |\n- *\t| | | | size =                                                  | | | |\n- *\t| | | |    sizeof(struct mali_c55_params_sensor_off_preshading);| | | |\n- *\t| | | +---------------------------------------------------------+ | | |\n- *\t| | | chan00 = ...;                                               | | |\n- *\t| | | chan01 = ...;                                               | | |\n- *\t| | | chan10 = ...;                                               | | |\n- *\t| | | chan11 = ...;                                               | | |\n- *\t| | +------------ struct mali_c55_params_aexp_hist ---------------+ | |\n- *\t| | | +-------- struct mali_c55_params_block_header header -----+ | | |\n- *\t| | | | type = MALI_C55_PARAM_BLOCK_AEXP_HIST;                  | | | |\n- *\t| | | | flags = MALI_C55_PARAM_BLOCK_FL_NONE;                   | | | |\n- *\t| | | | size = sizeof(struct mali_c55_params_aexp_hist);        | | | |\n- *\t| | | +---------------------------------------------------------+ | | |\n- *\t| | | skip_x = ...;                                               | | |\n- *\t| | | offset_x = ...;                                             | | |\n- *\t| | | skip_y = ...;                                               | | |\n- *\t| | | offset_y = ...;                                             | | |\n- *\t| | | scale_bottom = ...;                                         | | |\n- *\t| | | scale_top = ...;                                            | | |\n- *\t| | | plane_mode = ...;                                           | | |\n- *\t| | | tap_point = ...;                                            | | |\n- *\t| | +-------------------------------------------------------------+ | |\n- *\t| +-----------------------------------------------------------------+ |\n- *\t+---------------------------------------------------------------------+\n- *\n- * @version: The version from :c:type:`mali_c55_param_buffer_version`\n- * @total_size: The Mali-C55 configuration data effective size, excluding this\n- *\t\theader\n- * @data: The Mali-C55 configuration blocks data\n- */\n-struct mali_c55_params_buffer {\n-\t__u8 version;\n-\t__u32 total_size;\n-\t__u8 data[MALI_C55_PARAMS_MAX_SIZE];\n-};\n-\n #endif /* __UAPI_MALI_C55_CONFIG_H */\ndiff --git a/src/ipa/mali-c55/algorithms/agc.cpp b/src/ipa/mali-c55/algorithms/agc.cpp\nindex f60fddac3f04fd6f09dc782e929ff1593758c29b..78e7e07b2348a711e6261bac45e006f49a59513a 100644\n--- a/src/ipa/mali-c55/algorithms/agc.cpp\n+++ b/src/ipa/mali-c55/algorithms/agc.cpp\n@@ -253,7 +253,7 @@ size_t Agc::fillGainParamBlock(IPAContext &context, IPAFrameContext &frameContex\n \t\tgain = activeState.agc.manual.ispGain;\n \n \tblock.header->type = MALI_C55_PARAM_BLOCK_DIGITAL_GAIN;\n-\tblock.header->flags = MALI_C55_PARAM_BLOCK_FL_NONE;\n+\tblock.header->flags = 0;\n \tblock.header->size = sizeof(struct mali_c55_params_digital_gain);\n \n \tblock.digital_gain->gain = floatingToFixedPoint<5, 8, uint16_t, double>(gain);\n@@ -266,7 +266,7 @@ size_t Agc::fillParamsBuffer(mali_c55_params_block block,\n \t\t\t     enum mali_c55_param_block_type type)\n {\n \tblock.header->type = type;\n-\tblock.header->flags = MALI_C55_PARAM_BLOCK_FL_NONE;\n+\tblock.header->flags = 0;\n \tblock.header->size = sizeof(struct mali_c55_params_aexp_hist);\n \n \t/* Collect every 3rd pixel horizontally */\n@@ -292,7 +292,7 @@ size_t Agc::fillWeightsArrayBuffer(mali_c55_params_block block,\n \t\t\t\t   enum mali_c55_param_block_type type)\n {\n \tblock.header->type = type;\n-\tblock.header->flags = MALI_C55_PARAM_BLOCK_FL_NONE;\n+\tblock.header->flags = 0;\n \tblock.header->size = sizeof(struct mali_c55_params_aexp_weights);\n \n \t/* We use every zone - a 15x15 grid */\n@@ -314,30 +314,30 @@ size_t Agc::fillWeightsArrayBuffer(mali_c55_params_block block,\n }\n \n void Agc::prepare(IPAContext &context, const uint32_t frame,\n-\t\t  IPAFrameContext &frameContext, mali_c55_params_buffer *params)\n+\t\t  IPAFrameContext &frameContext, v4l2_isp_params_buffer *params)\n {\n \tmali_c55_params_block block;\n \n-\tblock.data = &params->data[params->total_size];\n-\tparams->total_size += fillGainParamBlock(context, frameContext, block);\n+\tblock.data = &params->data[params->data_size];\n+\tparams->data_size += fillGainParamBlock(context, frameContext, block);\n \n \tif (frame > 0)\n \t\treturn;\n \n-\tblock.data = &params->data[params->total_size];\n-\tparams->total_size += fillParamsBuffer(block,\n+\tblock.data = &params->data[params->data_size];\n+\tparams->data_size += fillParamsBuffer(block,\n \t\t\t\t\t       MALI_C55_PARAM_BLOCK_AEXP_HIST);\n \n-\tblock.data = &params->data[params->total_size];\n-\tparams->total_size += fillWeightsArrayBuffer(block,\n+\tblock.data = &params->data[params->data_size];\n+\tparams->data_size += fillWeightsArrayBuffer(block,\n \t\t\t\t\t\t     MALI_C55_PARAM_BLOCK_AEXP_HIST_WEIGHTS);\n \n-\tblock.data = &params->data[params->total_size];\n-\tparams->total_size += fillParamsBuffer(block,\n+\tblock.data = &params->data[params->data_size];\n+\tparams->data_size += fillParamsBuffer(block,\n \t\t\t\t\t       MALI_C55_PARAM_BLOCK_AEXP_IHIST);\n \n-\tblock.data = &params->data[params->total_size];\n-\tparams->total_size += fillWeightsArrayBuffer(block,\n+\tblock.data = &params->data[params->data_size];\n+\tparams->data_size += fillWeightsArrayBuffer(block,\n \t\t\t\t\t\t     MALI_C55_PARAM_BLOCK_AEXP_IHIST_WEIGHTS);\n }\n \ndiff --git a/src/ipa/mali-c55/algorithms/agc.h b/src/ipa/mali-c55/algorithms/agc.h\nindex 0b4bf7eda1c2a7c9894f6932452fea5f53699b30..4325ef5a9b7dcef36107b64a65db993f194d4167 100644\n--- a/src/ipa/mali-c55/algorithms/agc.h\n+++ b/src/ipa/mali-c55/algorithms/agc.h\n@@ -57,7 +57,7 @@ public:\n \t\t\t  const ControlList &controls) override;\n \tvoid prepare(IPAContext &context, const uint32_t frame,\n \t\t     IPAFrameContext &frameContext,\n-\t\t     mali_c55_params_buffer *params) override;\n+\t\t     v4l2_isp_params_buffer *params) override;\n \tvoid process(IPAContext &context, const uint32_t frame,\n \t\t     IPAFrameContext &frameContext,\n \t\t     const mali_c55_stats_buffer *stats,\ndiff --git a/src/ipa/mali-c55/algorithms/algorithm.h b/src/ipa/mali-c55/algorithms/algorithm.h\nindex ec8dd3973eaf2d804d8de8620840f716340e9cfd..e61115f6c2d6c911c15a1d877833d3f2b06a0db8 100644\n--- a/src/ipa/mali-c55/algorithms/algorithm.h\n+++ b/src/ipa/mali-c55/algorithms/algorithm.h\n@@ -22,7 +22,7 @@ class Algorithm : public libcamera::ipa::Algorithm<Module>\n };\n \n union mali_c55_params_block {\n-\tstruct mali_c55_params_block_header *header;\n+\tstruct v4l2_isp_params_block_header *header;\n \tstruct mali_c55_params_sensor_off_preshading *sensor_offs;\n \tstruct mali_c55_params_aexp_hist *aexp_hist;\n \tstruct mali_c55_params_aexp_weights *aexp_weights;\ndiff --git a/src/ipa/mali-c55/algorithms/awb.cpp b/src/ipa/mali-c55/algorithms/awb.cpp\nindex 3d546e5a854b8aa02987c44f57109a6171e3794b..694c0aaa9c6804bb58e380ba9c744f11c39224fe 100644\n--- a/src/ipa/mali-c55/algorithms/awb.cpp\n+++ b/src/ipa/mali-c55/algorithms/awb.cpp\n@@ -47,7 +47,7 @@ size_t Awb::fillGainsParamBlock(mali_c55_params_block block, IPAContext &context\n \t\t\t\tIPAFrameContext &frameContext)\n {\n \tblock.header->type = MALI_C55_PARAM_BLOCK_AWB_GAINS;\n-\tblock.header->flags = MALI_C55_PARAM_BLOCK_FL_NONE;\n+\tblock.header->flags = 0;\n \tblock.header->size = sizeof(struct mali_c55_params_awb_gains);\n \n \tdouble rGain = context.activeState.awb.rGain;\n@@ -77,7 +77,7 @@ size_t Awb::fillGainsParamBlock(mali_c55_params_block block, IPAContext &context\n size_t Awb::fillConfigParamBlock(mali_c55_params_block block)\n {\n \tblock.header->type = MALI_C55_PARAM_BLOCK_AWB_CONFIG;\n-\tblock.header->flags = MALI_C55_PARAM_BLOCK_FL_NONE;\n+\tblock.header->flags = 0;\n \tblock.header->size = sizeof(struct mali_c55_params_awb_config);\n \n \t/* Tap the stats after the purple fringe block */\n@@ -126,18 +126,18 @@ size_t Awb::fillConfigParamBlock(mali_c55_params_block block)\n }\n \n void Awb::prepare(IPAContext &context, const uint32_t frame,\n-\t\t  IPAFrameContext &frameContext, mali_c55_params_buffer *params)\n+\t\t  IPAFrameContext &frameContext, v4l2_isp_params_buffer *params)\n {\n \tmali_c55_params_block block;\n-\tblock.data = &params->data[params->total_size];\n+\tblock.data = &params->data[params->data_size];\n \n-\tparams->total_size += fillGainsParamBlock(block, context, frameContext);\n+\tparams->data_size += fillGainsParamBlock(block, context, frameContext);\n \n \tif (frame > 0)\n \t\treturn;\n \n-\tblock.data = &params->data[params->total_size];\n-\tparams->total_size += fillConfigParamBlock(block);\n+\tblock.data = &params->data[params->data_size];\n+\tparams->data_size += fillConfigParamBlock(block);\n }\n \n void Awb::process(IPAContext &context, const uint32_t frame,\ndiff --git a/src/ipa/mali-c55/algorithms/awb.h b/src/ipa/mali-c55/algorithms/awb.h\nindex 2351d405553058dbff569e9e09e265a56baaa23f..647525ff700e8281e3cce63e64ba56a91294bcc2 100644\n--- a/src/ipa/mali-c55/algorithms/awb.h\n+++ b/src/ipa/mali-c55/algorithms/awb.h\n@@ -22,7 +22,7 @@ public:\n \t\t      const IPACameraSensorInfo &configInfo) override;\n \tvoid prepare(IPAContext &context, const uint32_t frame,\n \t\t     IPAFrameContext &frameContext,\n-\t\t     mali_c55_params_buffer *params) override;\n+\t\t     v4l2_isp_params_buffer *params) override;\n \tvoid process(IPAContext &context, const uint32_t frame,\n \t\t     IPAFrameContext &frameContext,\n \t\t     const mali_c55_stats_buffer *stats,\ndiff --git a/src/ipa/mali-c55/algorithms/blc.cpp b/src/ipa/mali-c55/algorithms/blc.cpp\nindex 2a54c86a91f83d24183cb7236fcd5181302eb622..543ba96cb57ac0cca2b8f822180d8d8b42f21fc7 100644\n--- a/src/ipa/mali-c55/algorithms/blc.cpp\n+++ b/src/ipa/mali-c55/algorithms/blc.cpp\n@@ -85,10 +85,10 @@ int BlackLevelCorrection::configure(IPAContext &context,\n void BlackLevelCorrection::prepare([[maybe_unused]] IPAContext &context,\n \t\t\t\t   const uint32_t frame,\n \t\t\t\t   [[maybe_unused]] IPAFrameContext &frameContext,\n-\t\t\t\t   mali_c55_params_buffer *params)\n+\t\t\t\t   v4l2_isp_params_buffer *params)\n {\n \tmali_c55_params_block block;\n-\tblock.data = &params->data[params->total_size];\n+\tblock.data = &params->data[params->data_size];\n \n \tif (frame > 0)\n \t\treturn;\n@@ -97,7 +97,7 @@ void BlackLevelCorrection::prepare([[maybe_unused]] IPAContext &context,\n \t\treturn;\n \n \tblock.header->type = MALI_C55_PARAM_BLOCK_SENSOR_OFFS;\n-\tblock.header->flags = MALI_C55_PARAM_BLOCK_FL_NONE;\n+\tblock.header->flags = 0;\n \tblock.header->size = sizeof(mali_c55_params_sensor_off_preshading);\n \n \tblock.sensor_offs->chan00 = offset00;\n@@ -105,7 +105,7 @@ void BlackLevelCorrection::prepare([[maybe_unused]] IPAContext &context,\n \tblock.sensor_offs->chan10 = offset10;\n \tblock.sensor_offs->chan11 = offset11;\n \n-\tparams->total_size += block.header->size;\n+\tparams->data_size += block.header->size;\n }\n \n void BlackLevelCorrection::process([[maybe_unused]] IPAContext &context,\ndiff --git a/src/ipa/mali-c55/algorithms/blc.h b/src/ipa/mali-c55/algorithms/blc.h\nindex 9696e8e9f2aa8b9076a3a41fb8f5ea356e32be12..ee6c889ed89ac2230b231cb58a9fe4412c0ce164 100644\n--- a/src/ipa/mali-c55/algorithms/blc.h\n+++ b/src/ipa/mali-c55/algorithms/blc.h\n@@ -22,7 +22,7 @@ public:\n \t\t      const IPACameraSensorInfo &configInfo) override;\n \tvoid prepare(IPAContext &context, const uint32_t frame,\n \t\t     IPAFrameContext &frameContext,\n-\t\t     mali_c55_params_buffer *params) override;\n+\t\t     v4l2_isp_params_buffer *params) override;\n \tvoid process(IPAContext &context, const uint32_t frame,\n \t\t     IPAFrameContext &frameContext,\n \t\t     const mali_c55_stats_buffer *stats,\ndiff --git a/src/ipa/mali-c55/algorithms/lsc.cpp b/src/ipa/mali-c55/algorithms/lsc.cpp\nindex c43d034a181edb7559706189f8d75edd67a2dc08..cb915c5efd3c22952035f2b03ee659f293942ec9 100644\n--- a/src/ipa/mali-c55/algorithms/lsc.cpp\n+++ b/src/ipa/mali-c55/algorithms/lsc.cpp\n@@ -111,7 +111,7 @@ int Lsc::init([[maybe_unused]] IPAContext &context, const YamlObject &tuningData\n size_t Lsc::fillConfigParamsBlock(mali_c55_params_block block) const\n {\n \tblock.header->type = MALI_C55_PARAM_MESH_SHADING_CONFIG;\n-\tblock.header->flags = MALI_C55_PARAM_BLOCK_FL_NONE;\n+\tblock.header->flags = 0;\n \tblock.header->size = sizeof(struct mali_c55_params_mesh_shading_config);\n \n \tblock.shading_config->mesh_show = false;\n@@ -131,7 +131,7 @@ size_t Lsc::fillSelectionParamsBlock(mali_c55_params_block block, uint8_t bank,\n \t\t\t\t     uint8_t alpha) const\n {\n \tblock.header->type = MALI_C55_PARAM_MESH_SHADING_SELECTION;\n-\tblock.header->flags = MALI_C55_PARAM_BLOCK_FL_NONE;\n+\tblock.header->flags = 0;\n \tblock.header->size = sizeof(struct mali_c55_params_mesh_shading_selection);\n \n \tblock.shading_selection->mesh_alpha_bank_r = bank;\n@@ -170,7 +170,7 @@ std::tuple<uint8_t, uint8_t> Lsc::findBankAndAlpha(uint32_t ct) const\n \n void Lsc::prepare(IPAContext &context, [[maybe_unused]] const uint32_t frame,\n \t\t  [[maybe_unused]] IPAFrameContext &frameContext,\n-\t\t  mali_c55_params_buffer *params)\n+\t\t  v4l2_isp_params_buffer *params)\n {\n \t/*\n \t * For each frame we assess the colour temperature of the **last** frame\n@@ -194,9 +194,9 @@ void Lsc::prepare(IPAContext &context, [[maybe_unused]] const uint32_t frame,\n \t}\n \n \tmali_c55_params_block block;\n-\tblock.data = &params->data[params->total_size];\n+\tblock.data = &params->data[params->data_size];\n \n-\tparams->total_size += fillSelectionParamsBlock(block, bank, alpha);\n+\tparams->data_size += fillSelectionParamsBlock(block, bank, alpha);\n \n \tif (frame > 0)\n \t\treturn;\n@@ -205,8 +205,8 @@ void Lsc::prepare(IPAContext &context, [[maybe_unused]] const uint32_t frame,\n \t * If this is the first frame, we need to load the parsed coefficient\n \t * tables from tuning data to the ISP.\n \t */\n-\tblock.data = &params->data[params->total_size];\n-\tparams->total_size += fillConfigParamsBlock(block);\n+\tblock.data = &params->data[params->data_size];\n+\tparams->data_size += fillConfigParamsBlock(block);\n }\n \n REGISTER_IPA_ALGORITHM(Lsc, \"Lsc\")\ndiff --git a/src/ipa/mali-c55/algorithms/lsc.h b/src/ipa/mali-c55/algorithms/lsc.h\nindex d11e23bc7c34fa3e1f45ccf015b50f3d390d7159..c287900502528ca82ab6c62d732b6ffc28ad8df6 100644\n--- a/src/ipa/mali-c55/algorithms/lsc.h\n+++ b/src/ipa/mali-c55/algorithms/lsc.h\n@@ -23,7 +23,7 @@ public:\n \tint init(IPAContext &context, const YamlObject &tuningData) override;\n \tvoid prepare(IPAContext &context, const uint32_t frame,\n \t\t     IPAFrameContext &frameContext,\n-\t\t     mali_c55_params_buffer *params) override;\n+\t\t     v4l2_isp_params_buffer *params) override;\n private:\n \tstatic constexpr unsigned int kRedOffset = 0;\n \tstatic constexpr unsigned int kGreenOffset = 1024;\ndiff --git a/src/ipa/mali-c55/mali-c55.cpp b/src/ipa/mali-c55/mali-c55.cpp\nindex 7d45e7310aecdae0e47655e6d2e8830e776d74cd..504d95222074a35b033949a25178f998738e5699 100644\n--- a/src/ipa/mali-c55/mali-c55.cpp\n+++ b/src/ipa/mali-c55/mali-c55.cpp\n@@ -331,22 +331,23 @@ void IPAMaliC55::queueRequest(const uint32_t request, const ControlList &control\n void IPAMaliC55::fillParams(unsigned int request,\n \t\t\t    [[maybe_unused]] uint32_t bufferId)\n {\n-\tstruct mali_c55_params_buffer *params;\n+\tstruct v4l2_isp_params_buffer *params;\n \tIPAFrameContext &frameContext = context_.frameContexts.get(request);\n \n-\tparams = reinterpret_cast<mali_c55_params_buffer *>(\n+\tparams = reinterpret_cast<v4l2_isp_params_buffer *>(\n \t\tbuffers_.at(bufferId).planes()[0].data());\n-\tmemset(params, 0, sizeof(mali_c55_params_buffer));\n+\tmemset(params, 0,\n+\t       buffers_.at(bufferId).planes()[0].size());\n \n \tparams->version = MALI_C55_PARAM_BUFFER_V1;\n \n \tfor (auto const &algo : algorithms()) {\n \t\talgo->prepare(context_, request, frameContext, params);\n \n-\t\tASSERT(params->total_size <= MALI_C55_PARAMS_MAX_SIZE);\n+\t\tASSERT(params->data_size <= MALI_C55_PARAMS_MAX_SIZE);\n \t}\n \n-\tsize_t bytesused = offsetof(struct mali_c55_params_buffer, data) + params->total_size;\n+\tsize_t bytesused = offsetof(struct v4l2_isp_params_buffer, data) + params->data_size;\n \tparamsComputed.emit(request, bytesused);\n }\n \ndiff --git a/src/ipa/mali-c55/module.h b/src/ipa/mali-c55/module.h\nindex 4f6a4f18bfaf83263ccb5b7eb1723da9b655cc3c..a8dcb20841a4ebd7bde22cae4ff1f8eef530d8bb 100644\n--- a/src/ipa/mali-c55/module.h\n+++ b/src/ipa/mali-c55/module.h\n@@ -20,7 +20,7 @@ namespace libcamera {\n namespace ipa::mali_c55 {\n \n using Module = ipa::Module<IPAContext, IPAFrameContext, IPACameraSensorInfo,\n-\t\t\t   mali_c55_params_buffer, mali_c55_stats_buffer>;\n+\t\t\t   v4l2_isp_params_buffer, mali_c55_stats_buffer>;\n \n } /* namespace ipa::mali_c55 */\n \n",
    "prefixes": [
        "v6",
        "3/5"
    ]
}