From patchwork Sat Oct 11 06:33:30 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 24585 Return-Path: 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 7DA2BBE080 for ; Sat, 11 Oct 2025 06:33:47 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 36A0960316; Sat, 11 Oct 2025 08:33:46 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="GuJf3i1e"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id ADEBB6030E for ; Sat, 11 Oct 2025 08:33:44 +0200 (CEST) Received: from neptunite.hamster-moth.ts.net (unknown [IPv6:2404:7a81:160:2100:42b2:5255:36e:e46a]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 4F35EC67; Sat, 11 Oct 2025 08:32:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1760164328; bh=tinGwTsXyAYFoXaPDGRifObiJRyC+kPOrNpDpZw6cZQ=; h=From:To:Cc:Subject:Date:From; b=GuJf3i1eEe0luSsZNrTwVsYwy0UQCodC8r0x3S7h/ZKtLI9YfPzeKJvBB9wDzwaX/ G6uOkS7M8zKhhxntYsgfdYXmhaiaXpBqH1ZkCOBgSIEBUzsj3Fb/J6cxkVHRsdlWTm bkK9LRDgfRVFBCPbrGSHVnpUKC5gpfcT7h4HMYSM= From: Paul Elder To: libcamera-devel@lists.libcamera.org Cc: Paul Elder , barnabas.pocze@ideasonboard.com Subject: [PATCH v4 0/2] Fix ControlSerializer deserializing array controls Date: Sat, 11 Oct 2025 15:33:30 +0900 Message-ID: <20251011063333.2169364-1-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.47.2 MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" This series fixes bug 285 [0] where running IPAs in isolation with array controls would cause the control deserialization to fail, since the deserializer didn't properly deserialize array controls. This is fixed by making the deserializer properly deserialize array controls, by adding all ControlValue metadata to the serialized form of ControlInfoMap. v4 notably cleans up unused fields in metatata structs, so it touches ControlList as well. In v3 we reuse struct ipa_control_value_entry to store the relevant information instead, and add them to the serialized form of ControlInfoMap. In v2 the arrayness and size are stored in the serialized form of ControlValue instead of using the information registered in the ControlId. This allows us to support variable-length arrays (which v1 didn't), and allows us to support both non-array and array types min/max ControlValues in the ControlInfo, depending on which type of min/max value makes more sense for the specific control. [0] https://bugs.libcamera.org/show_bug.cgi?id=285 Paul Elder (2): libcamera: control_serializer: Add array info to serialized ControlValue ipa: ipu3, mali-c55, rkisp1, rpi: Fix reporting non-scalar controls .../libcamera/internal/control_serializer.h | 6 +- include/libcamera/ipa/ipa_controls.h | 12 +- src/ipa/ipu3/ipu3.cpp | 4 +- src/ipa/mali-c55/mali-c55.cpp | 5 +- src/ipa/rkisp1/algorithms/awb.cpp | 5 +- src/ipa/rkisp1/rkisp1.cpp | 4 +- src/ipa/rpi/common/ipa_base.cpp | 7 +- src/libcamera/control_serializer.cpp | 117 ++++++++++++------ src/libcamera/ipa_controls.cpp | 22 +++- 9 files changed, 129 insertions(+), 53 deletions(-)