{"id":26447,"url":"https://patchwork.libcamera.org/api/1.1/patches/26447/?format=json","web_url":"https://patchwork.libcamera.org/patch/26447/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/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":"<20260407153427.1825999-8-laurent.pinchart@ideasonboard.com>","date":"2026-04-07T15:33:52","name":"[v2,07/42] 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/1.1/people/2/?format=json","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/26447/mbox/","series":[{"id":5873,"url":"https://patchwork.libcamera.org/api/1.1/series/5873/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5873","date":"2026-04-07T15:33:45","name":"libcamera: Global configuration file improvements","version":2,"mbox":"https://patchwork.libcamera.org/series/5873/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/26447/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/26447/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 E589DC32BB\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  7 Apr 2026 15:34:43 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5106C62DC0;\n\tTue,  7 Apr 2026 17:34:43 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id EF72362DB2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  7 Apr 2026 17:34:37 +0200 (CEST)","from killaraus.ideasonboard.com\n\t(2001-14ba-703d-e500--2a1.rev.dnainternet.fi\n\t[IPv6:2001:14ba:703d:e500::2a1])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 593806A6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  7 Apr 2026 17:33:10 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"ulM6izHm\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1775575990;\n\tbh=7RIEwgWtmLm34iS8i5jpipaLiTEQXiL5iqU+gJhTbhk=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=ulM6izHmsKQ08lW2YAkVwbXqQFazPD9Qu25vv4Ec/VoMbQCZNGKpYTa/l0d2dh0mQ\n\taKW9WfObV27vLFZy4s1KCpF7Jmjqbaj8gRqdSmHLyoVevsFGfn9nq0sEtefC6tPMqM\n\tSZuXHFxH7jyKxGcYNTu7X9oP8NvSqBw8pj9ECIqI=","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Subject":"[PATCH v2 07/42] libcamera: camera_manager: Move IPAManager creation\n\tto start() time","Date":"Tue,  7 Apr 2026 18:33:52 +0300","Message-ID":"<20260407153427.1825999-8-laurent.pinchart@ideasonboard.com>","X-Mailer":"git-send-email 2.52.0","In-Reply-To":"<20260407153427.1825999-1-laurent.pinchart@ideasonboard.com>","References":"<20260407153427.1825999-1-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","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>\nReviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\nReviewed-by: Stefan Klug <stefan.klug@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":["v2","07/42"]}