From patchwork Fri Oct 10 11:33:28 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 24578 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 E1B9CBE080 for ; Fri, 10 Oct 2025 11:33:50 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 1BC9E6B60F; Fri, 10 Oct 2025 13:33:50 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="jfXapNeY"; 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 B337D6B599 for ; Fri, 10 Oct 2025 13:33:47 +0200 (CEST) Received: from neptunite.hamster-moth.ts.net (unknown [IPv6:2404:7a81:160:2100:fa2a:8f34:95fc:6e6b]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id BE84D664; Fri, 10 Oct 2025 13:32:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1760095932; bh=RcFOr8WZEuRILTkt7RV1KYgPkSSvGjRkaoa9L4OjsEk=; h=From:To:Cc:Subject:Date:From; b=jfXapNeY6c8L7vdA3ghZVoDHL4ziL5aBKYrxJvUbj0SpkRYyvBxcW7MFOO1NLPRR5 C41bvs0lwVHXHmJrk1XEIECtDMdkxf53UKYXwqTXC9lwaDNS0bSd81YVf7iuX2+65t 08sDiOpjjT74fwOA5SkvpCNJ0O0Z1Hu8gzGzgXG0= From: Paul Elder To: libcamera-devel@lists.libcamera.org Cc: Paul Elder , barnabas.pocze@ideasonboard.com Subject: [PATCH v3 0/2] Fix ControlSerializer deserializing array controls Date: Fri, 10 Oct 2025 20:33:28 +0900 Message-ID: <20251010113332.3030598-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. As a side effect, array controls that didn't report default array values must now report default array values, so the second patch does that. 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 +++-- 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 | 30 ++++++++++++++----- 7 files changed, 49 insertions(+), 14 deletions(-)