{"id":25727,"url":"https://patchwork.libcamera.org/api/patches/25727/?format=json","web_url":"https://patchwork.libcamera.org/patch/25727/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20260113000808.15395-8-laurent.pinchart@ideasonboard.com>","date":"2026-01-13T00:07:39","name":"[07/36] libcamera: camera_manager: Move IPAManager creation to start() time","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"e433bfedebcdc4b5fe9b80817551add02181089d","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/?format=json","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/25727/mbox/","series":[{"id":5703,"url":"https://patchwork.libcamera.org/api/series/5703/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5703","date":"2026-01-13T00:07:32","name":"libcamera: Global configuration file improvements","version":1,"mbox":"https://patchwork.libcamera.org/series/5703/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/25727/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/25727/checks/","tags":{},"headers":{"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\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 4DC60C3285\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 13 Jan 2026 00:08:42 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DFCAF61FCB;\n\tTue, 13 Jan 2026 01:08:41 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6912A61FBC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 13 Jan 2026 01:08:40 +0100 (CET)","from pendragon.ideasonboard.com (81-175-209-152.bb.dnainternet.fi\n\t[81.175.209.152])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id BD91BBCA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 13 Jan 2026 01:08:14 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"p4LjBcQi\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1768262894;\n\tbh=qcl7+VS5Gd19/WBC7zYCeHTYe13Ymb4TPWRrZYqACho=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=p4LjBcQi4KwY460EN2BoXj7lTj+6Mr7mxcFgs1jiJcxQHo1fI3AwwvhD7CbKkdbfc\n\tgmX6sZ8/9JFfFgUpFDJq0dV93BP0tJkJ20laRO2pCTQLTHcN2o94u/dHuLs4xN0/e4\n\tAHD/I6I5RZ2oO0OE0/7mEhk4b/1Qa1zy7fwHUNGs=","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Subject":"[PATCH 07/36] libcamera: camera_manager: Move IPAManager creation to\n\tstart() time","Date":"Tue, 13 Jan 2026 02:07:39 +0200","Message-ID":"<20260113000808.15395-8-laurent.pinchart@ideasonboard.com>","X-Mailer":"git-send-email 2.51.2","In-Reply-To":"<20260113000808.15395-1-laurent.pinchart@ideasonboard.com>","References":"<20260113000808.15395-1-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","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>,\n\t<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>,\n\t<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>"},"content":"The IPAManager is currently instantiated when constructing the\nCameraManager constructor, in the CameraManager::Private constructor.\nThis is the only sizeable object constructed with the CameraManager, all\nother components are constructed when starting the manager.\n\nEarly construction of the IPAManager isn't wrong per-se, but prevents\naccessing the CameraManager from the IPAManager constructor (as the\nformer isn't fully constructed). It also results in internal objects\nconstructed in different threads, which isn't an issue at the moment as\nnone of the objects constructed by the IPAManager are thread-bound, but\ncould cause issues later. Finally, it prevents influencing the\nIPAManager creation with parameters passed to the CameraManager::start()\nfunction once we implement this, which would be useful for applications\nto override configuration parameters related to IPA modules.\n\nMove the instantiation of the IPAManager to start time to fix all those\nissues.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/libcamera/camera_manager.cpp | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)","diff":"diff --git a/src/libcamera/camera_manager.cpp b/src/libcamera/camera_manager.cpp\nindex fc6e490bc476..5762c210ffc2 100644\n--- a/src/libcamera/camera_manager.cpp\n+++ b/src/libcamera/camera_manager.cpp\n@@ -41,7 +41,6 @@ LOG_DEFINE_CATEGORY(Camera)\n CameraManager::Private::Private()\n \t: Thread(\"CameraManager\"), initialized_(false)\n {\n-\tipaManager_ = std::make_unique<IPAManager>(configuration());\n }\n \n int CameraManager::Private::start()\n@@ -94,6 +93,8 @@ void CameraManager::Private::run()\n \n int CameraManager::Private::init()\n {\n+\tipaManager_ = std::make_unique<IPAManager>(configuration());\n+\n \tenumerator_ = DeviceEnumerator::create();\n \tif (!enumerator_ || enumerator_->enumerate())\n \t\treturn -ENODEV;\n","prefixes":["07/36"]}