Patch Detail
Show a patch.
GET /api/1.1/patches/24544/?format=api
{ "id": 24544, "url": "https://patchwork.libcamera.org/api/1.1/patches/24544/?format=api", "web_url": "https://patchwork.libcamera.org/patch/24544/", "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": "<20251001-v4l2-params-v4-3-8f2b4779205e@ideasonboard.com>", "date": "2025-10-01T15:42:32", "name": "[v4,3/5] ipa: Update Mali C55 header file and adjust IPA", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "ef6d15a11e26dd1723b398d943570a348cd7f708", "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/24544/mbox/", "series": [ { "id": 5472, "url": "https://patchwork.libcamera.org/api/1.1/series/5472/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5472", "date": "2025-10-01T15:42:29", "name": "ipa: libipa: Introduce V4L2Params", "version": 4, "mbox": "https://patchwork.libcamera.org/series/5472/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/24544/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/24544/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 43409C328C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 1 Oct 2025 15:43:00 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9903A6B5FF;\n\tWed, 1 Oct 2025 17:42:55 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8FB966B5F3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 1 Oct 2025 17:42:45 +0200 (CEST)", "from [192.168.1.102] (93-61-96-190.ip145.fastwebnet.it\n\t[93.61.96.190])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 67BE4F04;\n\tWed, 1 Oct 2025 17:41:16 +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=\"Z1uDx3hH\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1759333276;\n\tbh=gXc5sZbBgvAbTOKozpjjDwEs1SvbtoYTim0B6XcQ4I4=;\n\th=From:Date:Subject:References:In-Reply-To:To:Cc:From;\n\tb=Z1uDx3hHklgpVDNIRHq/NaBLpJIQQ/ahojjpIEp4CvMgnmXN6SOAYlb2IV4qmYxx+\n\t3R/f3Xxjsu0bpHtrExkJfgp4uO30qXGW1KyT+OfxDw8S9k2pXBZeP16G7jd8+SNRfW\n\t7M1JdHddWXfQ/WVyGSkFhIoTB6o7Z8HP4PRTeoeQ=", "From": "Jacopo Mondi <jacopo.mondi@ideasonboard.com>", "Date": "Wed, 01 Oct 2025 17:42:32 +0200", "Subject": "[PATCH v4 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": "<20251001-v4l2-params-v4-3-8f2b4779205e@ideasonboard.com>", "References": "<20251001-v4l2-params-v4-0-8f2b4779205e@ideasonboard.com>", "In-Reply-To": "<20251001-v4l2-params-v4-0-8f2b4779205e@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Jacopo Mondi <jacopo.mondi@ideasonboard.com>, \n\tAntoine Bouyer <antoine.bouyer@nxp.com>", "X-Mailer": "b4 0.14.2", "X-Developer-Signature": "v=1; a=openpgp-sha256; l=26183;\n\ti=jacopo.mondi@ideasonboard.com; h=from:subject:message-id;\n\tbh=gXc5sZbBgvAbTOKozpjjDwEs1SvbtoYTim0B6XcQ4I4=;\n\tb=owEBbQKS/ZANAwAKAXI0Bo8WoVY8AcsmYgBo3UvyBDqHo/rwWxmgu/RYKYV7TAhmOm0LhF2mB\n\tK2IbT2y4WuJAjMEAAEKAB0WIQS1xD1IgJogio9YOMByNAaPFqFWPAUCaN1L8gAKCRByNAaPFqFW\n\tPL4VD/4rGzUYOx4Lnlkl+HMgIl4pxoTrmGHhGvHHaLtf7q74GA3VLdV4OgGrlWIsPhGXwuURWBX\n\tR+K7SrJDHdOh6v4umbHMiabWcVbVQYMsHTV462/DGmu5wpWpYS55E9s67r7gXsKdo3VgvZiZfch\n\tgbNpUU6oCSdaaf8bDOUyQ46jyW7KJ9iiIJ9InT+/xZAL82LuYIGLfXyGCSV10fAJ4vVJ8B/PnlE\n\tPQr0msTVtDbK7AdH0Ysqu5ozeEnx/NNFzdwgyVzI8kB2wpooabs0jhNQN87mdT44jLIbfCi1irT\n\t17nbLluqP5y1WK9DZviQDKg/E62Y2CmgTYNR9JqaGUEyEgSKvkrHVj2oUoJlS7RFXhBATBy0Q4r\n\tMB095lMr/LHSizXN7bGT53tbV535O4s0WGDrfh89h2KbQNfSNWRxXWbtSRF9iRBrN+56kOc0QET\n\tqBel9yw/4RNdBW2TCafhXA7jGbDSWkWsTW4xCfAuDf8xQ53HpLiQ4mk0k0cCtHAnMyzZImP/344\n\tmhz2tqJPtTfkYiyIavArzcZH4o3eFAjigZgfcf6YhX9Qifx1GfW+dfMlAi9LY5kKo2ilfzOyagr\n\tGb4e/xvx+YHw072hLmRrXRbiMEN0Cxj2jpcRoBtVTGKQKCQozU5y9Kil+1cNtk9uBQANJLyJmlo\n\tJ+EzbyFugIKzuhg==", "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>\n---\n include/linux/mali-c55-config.h | 162 +++++---------------------------\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 | 10 +-\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..3e22a9e50dce85b69fc96f8e6cd03d199430eb8b 100644\n--- a/include/linux/mali-c55-config.h\n+++ b/include/linux/mali-c55-config.h\n@@ -9,6 +9,22 @@\n #define __UAPI_MALI_C55_CONFIG_H\n \n #include <linux/types.h>\n+#include <linux/v4l2-controls.h>\n+\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 +244,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 +262,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_params_block_header header;\n \t__u32 chan00;\n \t__u32 chan01;\n \t__u32 chan10;\n@@ -470,7 +427,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_params_block_header header;\n \t__u8 skip_x;\n \t__u8 offset_x;\n \t__u8 skip_y;\n@@ -502,7 +459,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_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 +477,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_params_block_header header;\n \t__u16 gain;\n };\n \n@@ -560,7 +517,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_params_block_header header;\n \t__u16 gain00;\n \t__u16 gain01;\n \t__u16 gain10;\n@@ -635,7 +592,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_params_block_header header;\n \t__u8 tap_point;\n \t__u8 stats_mode;\n \t__u16 white_level;\n@@ -745,7 +702,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_params_block_header header;\n \t__u8 mesh_show;\n \t__u8 mesh_scale;\n \t__u8 mesh_page_r;\n@@ -800,7 +757,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_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 +792,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..da47cf15be49327a592e850817f2863ab62cb404 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_params_buffer *params)\n {\n \tmali_c55_params_block block;\n \n-\tblock.data = ¶ms->data[params->total_size];\n-\tparams->total_size += fillGainParamBlock(context, frameContext, block);\n+\tblock.data = ¶ms->data[params->data_size];\n+\tparams->data_size += fillGainParamBlock(context, frameContext, block);\n \n \tif (frame > 0)\n \t\treturn;\n \n-\tblock.data = ¶ms->data[params->total_size];\n-\tparams->total_size += fillParamsBuffer(block,\n+\tblock.data = ¶ms->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 = ¶ms->data[params->total_size];\n-\tparams->total_size += fillWeightsArrayBuffer(block,\n+\tblock.data = ¶ms->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 = ¶ms->data[params->total_size];\n-\tparams->total_size += fillParamsBuffer(block,\n+\tblock.data = ¶ms->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 = ¶ms->data[params->total_size];\n-\tparams->total_size += fillWeightsArrayBuffer(block,\n+\tblock.data = ¶ms->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..64caf99350c1d1835832311a94a88a2bfde5721c 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_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..c28789f6a619cf7fc05ffb705098ed8d1fac93b8 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_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..6b2cbed9de1ebfe9a2466ebe999eceac44fe5deb 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_params_buffer *params)\n {\n \tmali_c55_params_block block;\n-\tblock.data = ¶ms->data[params->total_size];\n+\tblock.data = ¶ms->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 = ¶ms->data[params->total_size];\n-\tparams->total_size += fillConfigParamBlock(block);\n+\tblock.data = ¶ms->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..b5ff121041d1a01e3a51d64b87a90fb2e1d8dd10 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_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..8fd0f10c3082030a36a256830042d733ed4c8c78 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_params_buffer *params)\n {\n \tmali_c55_params_block block;\n-\tblock.data = ¶ms->data[params->total_size];\n+\tblock.data = ¶ms->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..cf10505ce2908df0d5e658d3fdce663729c7ea76 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_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..35f1d876e60db252a45cadb771e541735749d106 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_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 = ¶ms->data[params->total_size];\n+\tblock.data = ¶ms->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 = ¶ms->data[params->total_size];\n-\tparams->total_size += fillConfigParamsBlock(block);\n+\tblock.data = ¶ms->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..9019a61aa547e41154615eba88547d3eee1634e2 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_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..a6d3e984a438c01509ed27469d9f20c25bc884cf 100644\n--- a/src/ipa/mali-c55/mali-c55.cpp\n+++ b/src/ipa/mali-c55/mali-c55.cpp\n@@ -331,22 +331,22 @@ 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_params_buffer *params;\n \tIPAFrameContext &frameContext = context_.frameContexts.get(request);\n \n-\tparams = reinterpret_cast<mali_c55_params_buffer *>(\n+\tparams = reinterpret_cast<v4l2_params_buffer *>(\n \t\tbuffers_.at(bufferId).planes()[0].data());\n-\tmemset(params, 0, sizeof(mali_c55_params_buffer));\n+\tmemset(params, 0, sizeof(v4l2_params_buffer));\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_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..434d2c585d2f4eb03402c57e87302fc82e82a0f0 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_params_buffer, mali_c55_stats_buffer>;\n \n } /* namespace ipa::mali_c55 */\n \n", "prefixes": [ "v4", "3/5" ] }