From patchwork Tue Oct 14 13:34:00 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 24637 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 0A180BE080 for ; Tue, 14 Oct 2025 13:34:25 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 18362605F3; Tue, 14 Oct 2025 15:34:24 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="NewtUOzR"; 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 EB3C5605DF for ; Tue, 14 Oct 2025 15:34:21 +0200 (CEST) Received: from neptunite.hamster-moth.ts.net (unknown [IPv6:2404:7a81:160:2100:946a:ef2f:f966:b71d]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 654F3C73; Tue, 14 Oct 2025 15:32:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1760448763; bh=K25L60p0QQ7hT8BV1gzsBLhxr/67lCJbxelI0IH7Gi8=; h=From:To:Cc:Subject:Date:From; b=NewtUOzR0NsIErwrIGOAuxO3slnSZbU8EYWM5XEmCDQn1vNEa4acdPLr+QAORnlHk FQ7GsNwogpGOyNDgQkA2q9FemkZzd8ktRSUzPoNUNhuqIGTIJtp6hpSvQDayITTzN0 8VUKi7sF6SQfH4QPM9aKjqUSVcUbhqldj0JTZwzc= From: Paul Elder To: libcamera-devel@lists.libcamera.org Cc: Paul Elder Subject: [PATCH v5 0/2] Fix ControlSerializer deserializing array controls Date: Tue, 14 Oct 2025 22:34:00 +0900 Message-ID: <20251014133404.3194952-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. v5 contains minor cleanups. 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 | 8 +- include/libcamera/ipa/ipa_controls.h | 11 +- src/ipa/ipu3/ipu3.cpp | 4 +- src/ipa/mali-c55/mali-c55.cpp | 4 +- src/ipa/rkisp1/algorithms/awb.cpp | 4 +- src/ipa/rkisp1/rkisp1.cpp | 3 +- src/ipa/rpi/common/ipa_base.cpp | 9 +- src/libcamera/control_serializer.cpp | 119 ++++++++++++------ src/libcamera/ipa_controls.cpp | 20 ++- 9 files changed, 125 insertions(+), 57 deletions(-)