[{"id":37584,"web_url":"https://patchwork.libcamera.org/comment/37584/","msgid":"<6a6bc46e-6980-4cc8-a29f-5828995d4c4c@ideasonboard.com>","date":"2026-01-13T08:57:04","subject":"Re: [PATCH 07/36] libcamera: camera_manager: Move IPAManager\n\tcreation to start() time","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"2026. 01. 13. 1:07 keltezéssel, Laurent Pinchart írta:\n> The IPAManager is currently instantiated when constructing the\n> CameraManager constructor, in the CameraManager::Private constructor.\n> This is the only sizeable object constructed with the CameraManager, all\n> other components are constructed when starting the manager.\n> \n> Early construction of the IPAManager isn't wrong per-se, but prevents\n> accessing the CameraManager from the IPAManager constructor (as the\n> former isn't fully constructed). It also results in internal objects\n> constructed in different threads, which isn't an issue at the moment as\n> none of the objects constructed by the IPAManager are thread-bound, but\n> could cause issues later. Finally, it prevents influencing the\n> IPAManager creation with parameters passed to the CameraManager::start()\n> function once we implement this, which would be useful for applications\n> to override configuration parameters related to IPA modules.\n> \n> Move the instantiation of the IPAManager to start time to fix all those\n> issues.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n\nReviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n\n\n>   src/libcamera/camera_manager.cpp | 3 ++-\n>   1 file changed, 2 insertions(+), 1 deletion(-)\n> \n> diff --git a/src/libcamera/camera_manager.cpp b/src/libcamera/camera_manager.cpp\n> index 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> --\n> Regards,\n> \n> Laurent Pinchart\n>","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 A4D4CBE08B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 13 Jan 2026 08:57:09 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4C8E061FC4;\n\tTue, 13 Jan 2026 09:57:09 +0100 (CET)","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 96F0961FA0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 13 Jan 2026 09:57:07 +0100 (CET)","from [192.168.33.30] (185.221.143.114.nat.pool.zt.hu\n\t[185.221.143.114])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B9B5450A;\n\tTue, 13 Jan 2026 09:56:41 +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=\"J1fi2GFN\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1768294601;\n\tbh=QbN6vyL8GDgRmao1XmUeKNPXEG212CIBVFIO+x6Ue00=;\n\th=Date:Subject:To:References:From:In-Reply-To:From;\n\tb=J1fi2GFNUkdWX97jGrAJWHzipSAtYN8fpAeI8wj16nCx7OpDbFUJ7cv6rl3qk8vq5\n\tjbFsaZ4aLcyG4pyGXHDoQ54XxONe8Za1Tu6z8MBE9iIN7Qqtmg1AifpbmfqwRy+WhS\n\tqJWSndo7Upf05gD9lKOmNzBk9y5z0VuZ5rR0a3WU=","Message-ID":"<6a6bc46e-6980-4cc8-a29f-5828995d4c4c@ideasonboard.com>","Date":"Tue, 13 Jan 2026 09:57:04 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH 07/36] libcamera: camera_manager: Move IPAManager\n\tcreation to start() time","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20260113000808.15395-1-laurent.pinchart@ideasonboard.com>\n\t<vGBrFNIhP_J_-pqNM7Dj4ZCjeyseQX9FXFtp5VFbQmaHcoyhT0Ob0qtsBLgTyhyi5Ch15k1F2heTCBPZuIMehw==@protonmail.internalid>\n\t<20260113000808.15395-8-laurent.pinchart@ideasonboard.com>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<20260113000808.15395-8-laurent.pinchart@ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","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>"}},{"id":37642,"web_url":"https://patchwork.libcamera.org/comment/37642/","msgid":"<176838469076.20276.6042822728060667003@localhost>","date":"2026-01-14T09:58:10","subject":"Re: [PATCH 07/36] libcamera: camera_manager: Move IPAManager\n\tcreation to start() time","submitter":{"id":184,"url":"https://patchwork.libcamera.org/api/people/184/","name":"Stefan Klug","email":"stefan.klug@ideasonboard.com"},"content":"Quoting Laurent Pinchart (2026-01-13 01:07:39)\n> The IPAManager is currently instantiated when constructing the\n> CameraManager constructor, in the CameraManager::Private constructor.\n> This is the only sizeable object constructed with the CameraManager, all\n> other components are constructed when starting the manager.\n> \n> Early construction of the IPAManager isn't wrong per-se, but prevents\n> accessing the CameraManager from the IPAManager constructor (as the\n> former isn't fully constructed). It also results in internal objects\n> constructed in different threads, which isn't an issue at the moment as\n> none of the objects constructed by the IPAManager are thread-bound, but\n> could cause issues later. Finally, it prevents influencing the\n> IPAManager creation with parameters passed to the CameraManager::start()\n> function once we implement this, which would be useful for applications\n> to override configuration parameters related to IPA modules.\n> \n> Move the instantiation of the IPAManager to start time to fix all those\n> issues.\n\nMakes sense.\n\nReviewed-by: Stefan Klug <stefan.klug@ideasonboard.com>\n\nCheers,\nStefan\n\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> ---\n>  src/libcamera/camera_manager.cpp | 3 ++-\n>  1 file changed, 2 insertions(+), 1 deletion(-)\n> \n> diff --git a/src/libcamera/camera_manager.cpp b/src/libcamera/camera_manager.cpp\n> index 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>         : Thread(\"CameraManager\"), initialized_(false)\n>  {\n> -       ipaManager_ = 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> +       ipaManager_ = std::make_unique<IPAManager>(configuration());\n> +\n>         enumerator_ = DeviceEnumerator::create();\n>         if (!enumerator_ || enumerator_->enumerate())\n>                 return -ENODEV;\n> -- \n> Regards,\n> \n> Laurent Pinchart\n>","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 C5BCCBDCBF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 14 Jan 2026 09:58:15 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EF88D61FC4;\n\tWed, 14 Jan 2026 10:58:14 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 59D64615B2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 14 Jan 2026 10:58:13 +0100 (CET)","from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:b781:dff2:957:7831])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 975C3316;\n\tWed, 14 Jan 2026 10:57:46 +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=\"j7W05IM6\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1768384666;\n\tbh=6aInYJtoaLqvJDxjdn6keOl5gTAIv+E6fMXxVjmTFwI=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=j7W05IM6KNP6RE/bRwjhG2I/c/yYzUZRj7rnRJUoJxEI6wVrk19AH1Bd6vyJesGqr\n\tfYK2Zo5frxUxepoVGXwNDq8OYlnEtNHVHH+pT08IjOVMtTDUj/VMYCymzJLH77v9h4\n\tNpHFrt9pY3hQ51EhIXkDm8CjXsV/f8xmCVaLGVrE=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20260113000808.15395-8-laurent.pinchart@ideasonboard.com>","References":"<20260113000808.15395-1-laurent.pinchart@ideasonboard.com>\n\t<20260113000808.15395-8-laurent.pinchart@ideasonboard.com>","Subject":"Re: [PATCH 07/36] libcamera: camera_manager: Move IPAManager\n\tcreation to start() time","From":"Stefan Klug <stefan.klug@ideasonboard.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Wed, 14 Jan 2026 10:58:10 +0100","Message-ID":"<176838469076.20276.6042822728060667003@localhost>","User-Agent":"alot/0.12.dev8+g2c003385c862.d20250602","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>"}}]