From patchwork Tue Sep 7 11:10:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 13712 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 1899FBE175 for ; Tue, 7 Sep 2021 11:09:56 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 71D066916C; Tue, 7 Sep 2021 13:09:55 +0200 (CEST) Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id C560860251 for ; Tue, 7 Sep 2021 13:09:54 +0200 (CEST) Received: (Authenticated sender: jacopo@jmondi.org) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 5324460005; Tue, 7 Sep 2021 11:09:54 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Tue, 7 Sep 2021 13:10:33 +0200 Message-Id: <20210907111038.739104-1-jacopo@jmondi.org> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 0/5] libcamera: control serializer fixes 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 has started from investigating an error triggered by running consecutive capture sessions with the IPU3 IPA module running in isolation. From there a few more fixes/improvements have lead me to be capable to running CTS with isolated IPA with a single failure (the flaky recording tests). Patch 1 is a small cleanup of the IPU3 IPA interface. Patches 2, 3 and 4 fix issues in the control serializer, most of them went not noticed as the IPA is seldom run isolated for the moment. Patch 5 is new and replaces "libcamera: control_serializer: Keep handles in sync" from v1 and represents the most relevant change. As the v1 version still allowed conflicts to happen, this new version adds a 'seed' to the ControlSerializer and partitions the handles numerical space on the two sides of the IPC boundary so that the Proxy and the ProxyWorker will never use the same handles. All patches reviewed except the new one. Thanks j Jacopo Mondi (5): libcamera: ipu3: Drop entityControls map ipa: proxy_worker: Reset ControlSerializer on worker libcamera: control_serializer: Use the right idmap libcamera: control_serializer: Serialize info::def() libcamera: control_serializer: Separate the handles space include/libcamera/controls.h | 1 + .../libcamera/internal/control_serializer.h | 8 +- include/libcamera/ipa/ipu3.mojom | 2 +- src/ipa/ipu3/ipu3.cpp | 6 +- src/libcamera/control_serializer.cpp | 117 +++++++++++++++--- src/libcamera/controls.cpp | 8 ++ src/libcamera/ipa_controls.cpp | 14 ++- src/libcamera/pipeline/ipu3/ipu3.cpp | 2 +- test/serialization/control_serialization.cpp | 4 +- .../ipa_data_serializer_test.cpp | 26 ++-- .../module_ipa_proxy.cpp.tmpl | 6 +- .../module_ipa_proxy.h.tmpl | 2 +- .../module_ipa_proxy_worker.cpp.tmpl | 16 ++- .../libcamera_templates/proxy_functions.tmpl | 4 +- 14 files changed, 168 insertions(+), 48 deletions(-) --- 2.32.0