Message ID | 20250926-v4l2-params-v3-0-ee114782c1be@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 C193DC328C for <parsemail@patchwork.libcamera.org>; Fri, 26 Sep 2025 14:39:54 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 999896B5FB; Fri, 26 Sep 2025 16:39:53 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="OJ+anvYq"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 822CB613AB for <libcamera-devel@lists.libcamera.org>; Fri, 26 Sep 2025 16:39:51 +0200 (CEST) Received: from [192.168.1.100] (93-61-96-190.ip145.fastwebnet.it [93.61.96.190]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 7D15714B0; Fri, 26 Sep 2025 16:38:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1758897506; bh=pKFSSqNy59k24zA1evXTSrFHgptmIC2Tt3P5f751qsM=; h=From:Subject:Date:To:Cc:From; b=OJ+anvYqELA1vFWChA/ukZTlNl2MbxWtuBdoYdo01D98rT/BdOrd0q8QJ0jJPFx1h GX6u01JlIjffR4Qz1PcKSOP0wCosWZDHcD6mTwb6EePwImVaheh6JJZYoZEvWcrgp2 ZmDDTXA+WvE3rZSlRXwleaDM1vr6Ph3MFmLxPMx8= From: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Subject: [PATCH v3 0/5] ipa: libipa: Introduce V4L2Params Date: Fri, 26 Sep 2025 16:39:32 +0200 Message-Id: <20250926-v4l2-params-v3-0-ee114782c1be@ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAKSl1mgC/23M0QqDIBiG4VsJj+cwNc0d7T7GDv7ydwkrQ4dsR Pc+62QMOnw/+J6FJIweE7lUC4mYffJhKiFOFekHmB5IvS1NOOMNa7mhWT45nSHCmKiVHKAxBnU LpDzmiM6/d+12Lz349Arxs+O53tZjJ9eUUSGZ1sJ1yjh39RYhhakLEO25DyPZuMx/hKnVP8ELo ZWUukarpGgOiHVdv0TFYTjwAAAA X-Change-ID: 20250829-v4l2-params-d42aa599e78a To: libcamera-devel@lists.libcamera.org Cc: Jacopo Mondi <jacopo.mondi@ideasonboard.com>, Antoine Bouyer <antoine.bouyer@nxp.com> X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=3838; i=jacopo.mondi@ideasonboard.com; h=from:subject:message-id; bh=pKFSSqNy59k24zA1evXTSrFHgptmIC2Tt3P5f751qsM=; b=owEBbQKS/ZANAwAKAXI0Bo8WoVY8AcsmYgBo1qW1Nv+X9NfB9AvYJSrTZbSc2r0QBcOl7kT8k PcVvgTgEe6JAjMEAAEKAB0WIQS1xD1IgJogio9YOMByNAaPFqFWPAUCaNaltQAKCRByNAaPFqFW PMNNEACNZhNW/3RXkG0APnN3KDhlDohTzZg5z+crgVEpb/c0oltoz2PZqYTm4OMjrGoAcfYcaIb oQnEpeHRRlyARHLTWlag3psdcfncG9Nzpr1o2/hNrhuxsYlqUxUCraRDoux5dRov1t+waMgHUk3 pANoqxV5BoPXEc5SScL9XZcW5PNRKiJ7N6XFT76Ne42VMPvUqPTBhcCQIJsM4KOi7hkfoKRfw1x F0Jn9jc5aVB/NLaGaYTSMOPABNVbORJn9GKFD4YXDbDUWxBm295dqnRKRVZfVNPyGjBS43S8KGm PFpwj28KZGbsT2SW6MPBOyqLK49aatg0Jq0NG81AAPdDtOIdZ4b2vrRzYLRGIUwkGK0n8BF593g 1+oj2QcPtfspNSESTKcmnh8kbS2L70EvKx38TDqx2e6Cal3KhkUaB1HnTuSXBazyYYKyat2yADP AJMTwiKx2Y39dfYuLgL5lMfhgVFs6IjJW6awnWBm6lymWqa4I5tPkig5hrnn34cGiil4ruan9Ih sz0vaiocErsiIotYT72eVfbIdDHRz4LOoXMMBJ13/t2G6WMI9PGkRFIKmt+5rPgcGOhcaO1PvLH uZLjnXsmPDwkcEFaZLYNfwjyOtrvE4nRIoOZPtM+8H3siPMVKxpw5bKhAqFTHSG7CAKQijQMVNM xFFMDWQ+CGE9jqw== 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 |
With the introduction of v4l2-isp.h in the Linux kernel currently in progress: https://lore.kernel.org/all/20250915-extensible-parameters-validation-v5-0-e6db94468af3@ideasonboard.com/ the MaliC55 ISP driver at version in v11 has been ported to use a parameters format compatible with the one defined by v4l2 extensible parameters: https://lore.kernel.org/all/20250714-c55-v11-0-bc20e460e42a@ideasonboard.com/ This series 1) Imports v4l2-isp in libcamera 2) Update the Mali C55 header and IPA to compile with v11 of the patch series that introduces MaliC55 support in Linux 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 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 v4l2-isp.h include: linux: v4l2-isp: Provide __counted_by() ipa: Update Mali C55 header file and adjust IPA ipa: libipa: Introduce V4L2Params ipa: mali-c55: Introduce MaliC55Params include/linux/mali-c55-config.h | 162 +++----------------- include/linux/media/v4l2-isp.h | 118 ++++++++++++++ src/ipa/libipa/meson.build | 2 + src/ipa/libipa/v4l2_params.cpp | 262 ++++++++++++++++++++++++++++++++ src/ipa/libipa/v4l2_params.h | 142 +++++++++++++++++ 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 | 83 ++++++++++ src/ipa/rkisp1/params.cpp | 93 +----------- src/ipa/rkisp1/params.h | 175 ++++++++++++--------- 19 files changed, 849 insertions(+), 476 deletions(-) --- base-commit: 22f6edc686c86904c3843ec19c8af5ba19c93298 change-id: 20250829-v4l2-params-d42aa599e78a Best regards,