| Message ID | 20251215-v4l2-params-v7-0-be2b8c75ad09@ideasonboard.com |
|---|---|
| Headers | show
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 [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 4D679C3257 for <parsemail@patchwork.libcamera.org>; Mon, 15 Dec 2025 15:11:41 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 3F971619E1; Mon, 15 Dec 2025 16:11:40 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="aboxYaet"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 20214615B2 for <libcamera-devel@lists.libcamera.org>; Mon, 15 Dec 2025 16:11:38 +0100 (CET) Received: from [192.168.0.172] (mob-5-90-49-39.net.vodafone.it [5.90.49.39]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 880F4C66; Mon, 15 Dec 2025 16:11:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1765811492; bh=lW7d955yy2UhzYm2sgGvjxwPzXAqHdzwCBvxW1hzpvA=; h=From:Subject:Date:To:Cc:From; b=aboxYaetQ81LVQU5zDKjnswI0t57ic7kOXQexhJLdboNDLaAgNFqerG3HNtBiYWWE DCHTbBtj+dMgeq3mAebTRdaCjxqg8YdMf8cAaakELHQxtP/iEWLWewgPrj9Bo0uje3 opH5sHeRtTw4SbFg4ELWNYY9elTfTNwzPQHNag+Y= From: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Subject: [PATCH v7 0/5] ipa: libipa: Introduce V4L2Params Date: Mon, 15 Dec 2025 16:11:20 +0100 Message-Id: <20251215-v4l2-params-v7-0-be2b8c75ad09@ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIABglQGkC/3XMy27DIBCF4VeJWJeKGYZbVn2Pqgsw0CA1cQSV1 Sryuxdn0dpVvPyPdL4ba6mW1NjxcGM1TaWV8dLDPB3YcPKX98RL7M1QoBIWHZ/oA/nVV39uPBJ 6r5xLxnrWH9eacvm6a69vvU+lfY71+45PsKyPnQm44JKEMTIH7XJ+KTH5Nl7C6Gt8HsYzW7gJ/ wgHektgJ4wmMpCiJql2CLki8B8hO5ESABmLA4S0Q9AvAULAlqBO2IyBjHEo1B6h1oTZEmohYiA F3oJ0dofQKwJoS+hODD6r7LVLAd0DYp7nHyf6EtH8AQAA X-Change-ID: 20250829-v4l2-params-d42aa599e78a To: libcamera-devel@lists.libcamera.org Cc: Jacopo Mondi <jacopo.mondi@ideasonboard.com>, Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>, Kieran Bingham <kieran.bingham@ideasonboard.com>, Antoine Bouyer <antoine.bouyer@nxp.com>, Laurent Pinchart <laurent.pinchart@ideasonboard.com>, Daniel Scally <dan.scally@ideasonboard.com> X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=4233; i=jacopo.mondi@ideasonboard.com; h=from:subject:message-id; bh=lW7d955yy2UhzYm2sgGvjxwPzXAqHdzwCBvxW1hzpvA=; b=owEBbQKS/ZANAwAKAXI0Bo8WoVY8AcsmYgBpQCUndBKv17hU1T723vYoBO+f+IdGjRaxx1vDj GScu8mkYQqJAjMEAAEKAB0WIQS1xD1IgJogio9YOMByNAaPFqFWPAUCaUAlJwAKCRByNAaPFqFW PIY9EACKU1jjKvJAJDeWZ7RvuY+aMtUCTZZLJEb7vwBhvlJdWffh1yRHnrw8zh7/qUvKiA9rrTH lZO5EDo5Wjd/OKqFkcrv1YT+cCU7nDGXtwkeLf5C3mcSl0rSXR6tw05h84zmN3XHp905lrJQAMs wFkIsI53aPSlOH18dtnNlpBOW6zkoBtAAx2zrzTpyW0ejrhfHmpevlmCUl6jwJU8uxRI5rhHnSE 0rJ4CGk346unjaeFONyRI3vqZmXK2x1RFNMF6qc5SgSZ3aNpjYSTS62CO5jXLGMbk3kn3WA+Wrd Csq9AHFlOpRylr+x5Wb0oHAXKQpeIJNbfh+QqQ62joSJDFte9quwCUpYLI87x4QI/WzfQx9I5bT g/GgJvfrg7gYUZ9z5f0zrlZ3U2ChUbM6UgsOT7qaWAqdF357sN0RCbdXrVgBH50V8beZpA+tG1X docirwpYRuu+YNPadWBU90HKklRff6nTcRF4ZjIkSiRzCupsryZ3b56r2O5LbU3FHDAE1dApsPO hxfslVY6nsRrpsMuEgYV2vLJPDzNFEL71GA+qGRvngxy8hNepVteJqDENk6MtnG8LLsUyGTeOno mILKkcpMWBPq016555yYJvuf3OvXai3Q6DFL8mEcDYbeiOKiU3AYCyExhaZVovM9Xlte7RZuw4e Hmvb8r18PIh82xg== X-Developer-Key: i=jacopo.mondi@ideasonboard.com; a=openpgp; fpr=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>, <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>, <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> |
| Series |
|
| Related | show |
Linux v6.19 will see the the introduction of the v4l2-isp framework in the Linux kernel and of the Mali C55 ISP driver which will use v4l2-isp for handling parameters. This series 1) Imports stddef.h and v4l2-isp.h in libcamera from v6.19 2) Update the Mali C55 header and IPA to compile with the version that will land in v6.19 3) Introduces V4L2Params by generalizing RkISP1Params 4) Ports the Mali C55 IPA to use the newly introduced V4L2Params Tested on rkisp1 and rzv2h Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> --- Changes in v7: - Re-import headers based on v6.19 - Fix mali-c55 buffer versioning Changes in v6: - Apply Dan's comments on documentation - Assert with Fatal if we run out of space Changes in v5: - Update to v6 of v4l2 isp - Import linux/stddef.h instead of re-defining __counted_by() - Properly memset the whole mali-c55 buffer in the transitory patch before MaliC55Params introduction Changes in v4: - Mark RkISP1ParamBlock final - Fix code examples as suggested by Barnabas Changes in v3: - Fix Mali-C55 and re-work RkISP1 The Mali and RkISP1 IPA have a different requirements: struct mali_c55_params_awb_gains { struct v4l2_params_block_header header; __u16 gain00; __u16 gain01; __u16 gain10; __u16 gain11; }; struct rkisp1_ext_params_awb_gain_config { struct rkisp1_ext_params_block_header header; struct rkisp1_cif_isp_awb_gain_config config; } __attribute__((aligned(8))); The RkISP1 IPA needs to support legacy and extensible parameter formats, and wants to operate on 'struct rkisp1_cif_isp_' basically discarding the header. The Mali IPA (and all other IPA compatible with v4l2-isp) operates on the whole structure and do not need to discard the header. Rework V4L2ParamsBlock to return a Span<> matching the whole structure (header included) to support Mali correctly. This means the RkISP1ParamsBlock derived class has to override all the dereference operators to discard the header and allow the IPA to work with both the legacy and extensible formats. Tested with Mali C55, RkISP1 in extensible and legacy modes. - Link to v2: https://lore.kernel.org/r/20250916-v4l2-params-v2-0-764471ed6435@ideasonboard.com Changes in v2: - Address Barnabas' reviwe that allows to remove the block() overload in MaliC55 - Link to v1: https://lore.kernel.org/r/20250829-v4l2-params-v1-0-340773fb69ff@ideasonboard.com --- Jacopo Mondi (5): include: linux: Add stddef.h include: linux: Add v4l2-isp.h ipa: mali-c55: Update header file and adjust IPA ipa: libipa: Introduce V4L2Params ipa: mali-c55: Introduce MaliC55Params include/linux/mali-c55-config.h | 170 +++------------------ include/linux/media/v4l2-isp.h | 102 +++++++++++++ include/linux/stddef.h | 74 ++++++++++ src/ipa/libipa/meson.build | 2 + src/ipa/libipa/v4l2_params.cpp | 253 ++++++++++++++++++++++++++++++++ src/ipa/libipa/v4l2_params.h | 152 +++++++++++++++++++ src/ipa/mali-c55/algorithms/agc.cpp | 87 +++++------ src/ipa/mali-c55/algorithms/agc.h | 14 +- src/ipa/mali-c55/algorithms/algorithm.h | 2 +- src/ipa/mali-c55/algorithms/awb.cpp | 64 ++++---- src/ipa/mali-c55/algorithms/awb.h | 10 +- src/ipa/mali-c55/algorithms/blc.cpp | 20 +-- src/ipa/mali-c55/algorithms/blc.h | 3 +- src/ipa/mali-c55/algorithms/lsc.cpp | 58 +++----- src/ipa/mali-c55/algorithms/lsc.h | 8 +- src/ipa/mali-c55/mali-c55.cpp | 19 +-- src/ipa/mali-c55/module.h | 3 +- src/ipa/mali-c55/params.h | 77 ++++++++++ src/ipa/rkisp1/params.cpp | 93 +----------- src/ipa/rkisp1/params.h | 175 ++++++++++++---------- src/ipa/rkisp1/rkisp1.cpp | 2 +- utils/update-kernel-headers.sh | 2 + 22 files changed, 904 insertions(+), 486 deletions(-) --- base-commit: e44fb8f44031ceabf4b7d647a344b18bddd7cfbb change-id: 20250829-v4l2-params-d42aa599e78a Best regards,