[{"id":34694,"web_url":"https://patchwork.libcamera.org/comment/34694/","msgid":"<0ef0543c-9bf8-4366-8cae-6b9bf0d7d4b3@ideasonboard.com>","date":"2025-06-27T14:00:44","subject":"Re: [PATCH v11 02/12] config: Make GlobalConfiguration instance","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"Hi\n\n2025. 06. 24. 10:35 keltezéssel, Milan Zamazal írta:\n> Global configuration is accessed via a GlobalConfiguration instance.\n> The instance is conceptually a singleton, but singletons are not welcome\n> in libcamera so we must store the (preferably single) instance\n> somewhere.\n> \n> This patch creates a GlobalConfiguration instance in CameraManager and\n> defines the corresponding access method.  CameraManager is typically\n> instantiated only once or a few times, it is accessible in\n> many places in libcamera and the configuration can be retrieved from it\n> and passed to other places if needed (it's read-only once created).\n> Using CameraManager for the purpose is still suboptimal and we use it\n> only due to lack of better options.  An alternative could be Logger,\n> which is still a singleton and it's accessible from everywhere.  But\n> with Logger, we have a chicken and egg problem -- GlobalConfiguration\n> should log contingent problems with the configuration when it's loaded\n> but if it is created in the logger then there are mutual infinite\n> recursive calls.  Perhaps some acceptable workaround could be found,\n> which would also allow an easier logging configuration.\n\nI think one possible approach is the following:\n\n   (1) when the DSO is loaded, initialize logging based on the environmental variables;\n   (2) when a CameraManager is constructed, apply the logging related configuration.\n\nOf course if multiple `CameraManager`s instantiated, the logging related\nsettings of the last will \"win\". But I don't think this is an issue in\npractice.\n\nI think we could also get rid of the global logger in many places by\nhaving a `Logger` interface that is propagated to object. There are\nstill classes like `ControlList`, which, I would say, exist outside\nthe umbrella of the `CameraManager` class, so a global logger instance\nis unavoidable if such classes want to use logging. This of course\nbrings up the problem of log categories, which are also singleton.\n\nI believe it could be useful in some cases because an application could\nitself supply such a `Logger` instance (on a per CameraManager basis)\nand redirect libcamera logs into its own stream of log messages if it so wishes.\n\n\nRegards,\nBarnabás Pőcze\n\n\n> \n> If there are multiple CameraManager instances, there are also multiple\n> GlobalConfiguration instances.  They may or may not contain the same\n> data, depending on whether the global configuration file in the file\n> system was changed in the meantime.  This is dirty and a potential\n> source of trouble (although not expected to have much impact in\n> practice) but there is no idea how to do better if we want to avoid\n> having GlobalConfiguration singleton or dealing with the logging\n> problem.\n> \n> The configuration is stored in CameraManager privately, it's not meant\n> to be accessed by applications.\n> \n> Signed-off-by: Milan Zamazal <mzamazal@redhat.com>\n> ---\n>   include/libcamera/internal/camera_manager.h | 8 ++++++++\n>   src/libcamera/camera_manager.cpp            | 8 ++++++++\n>   2 files changed, 16 insertions(+)\n> \n> diff --git a/include/libcamera/internal/camera_manager.h b/include/libcamera/internal/camera_manager.h\n> index 0150ca61f..e8082eb34 100644\n> --- a/include/libcamera/internal/camera_manager.h\n> +++ b/include/libcamera/internal/camera_manager.h\n> @@ -18,6 +18,7 @@\n>   #include <libcamera/base/thread.h>\n>   #include <libcamera/base/thread_annotations.h>\n>   \n> +#include \"libcamera/internal/global_configuration.h\"\n>   #include \"libcamera/internal/process.h\"\n>   \n>   namespace libcamera {\n> @@ -38,6 +39,11 @@ public:\n>   \tvoid addCamera(std::shared_ptr<Camera> camera) LIBCAMERA_TSA_EXCLUDES(mutex_);\n>   \tvoid removeCamera(std::shared_ptr<Camera> camera) LIBCAMERA_TSA_EXCLUDES(mutex_);\n>   \n> +\tconst GlobalConfiguration &configuration() const\n> +\t{\n> +\t\treturn configuration_;\n> +\t}\n> +\n>   \tIPAManager *ipaManager() const { return ipaManager_.get(); }\n>   \n>   protected:\n> @@ -66,6 +72,8 @@ private:\n>   \n>   \tstd::unique_ptr<IPAManager> ipaManager_;\n>   \tProcessManager processManager_;\n> +\n> +\tconst GlobalConfiguration configuration_;\n>   };\n>   \n>   } /* namespace libcamera */\n> diff --git a/src/libcamera/camera_manager.cpp b/src/libcamera/camera_manager.cpp\n> index e62e7193c..f3b4ec708 100644\n> --- a/src/libcamera/camera_manager.cpp\n> +++ b/src/libcamera/camera_manager.cpp\n> @@ -15,6 +15,7 @@\n>   \n>   #include \"libcamera/internal/camera.h\"\n>   #include \"libcamera/internal/device_enumerator.h\"\n> +#include \"libcamera/internal/global_configuration.h\"\n>   #include \"libcamera/internal/ipa_manager.h\"\n>   #include \"libcamera/internal/pipeline_handler.h\"\n>   \n> @@ -254,6 +255,13 @@ void CameraManager::Private::removeCamera(std::shared_ptr<Camera> camera)\n>   \to->cameraRemoved.emit(camera);\n>   }\n>   \n> +/**\n> + * \\fn const GlobalConfiguration &CameraManager::Private::configuration() const\n> + * \\brief Get global configuration bound to the camera manager\n> + *\n> + * \\return Reference to the configuration\n> + */\n> +\n>   /**\n>    * \\fn CameraManager::Private::ipaManager() const\n>    * \\brief Retrieve the IPAManager","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 C4282C3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 27 Jun 2025 14:00:52 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CCB3568E01;\n\tFri, 27 Jun 2025 16:00:50 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 446C268DE5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 27 Jun 2025 16:00:49 +0200 (CEST)","from [192.168.33.12] (185.221.143.107.nat.pool.zt.hu\n\t[185.221.143.107])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 4408173B;\n\tFri, 27 Jun 2025 16:00:29 +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=\"o6rJ6ziA\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1751032829;\n\tbh=9EyICyE+PgYHR2F8Dt8v2RAhPgxXFMv5/00f0eSG0sI=;\n\th=Date:From:Subject:To:Cc:References:In-Reply-To:From;\n\tb=o6rJ6ziAuV0frMLcNfg6tVFEAdC3nV1RTK0yYQnh9K/N9bScoBNo69qApU02lpdmZ\n\tZwM42WosKG9wD/z4T8nLOFycxDPP01BiiYSlwgbalVyDK0t6mvVIu2unxqs/PfBgus\n\tzFoX71c4G0b30K2CNlr7PbLCyE5HQgK4Hh6TkWbA=","Message-ID":"<0ef0543c-9bf8-4366-8cae-6b9bf0d7d4b3@ideasonboard.com>","Date":"Fri, 27 Jun 2025 16:00:44 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Subject":"Re: [PATCH v11 02/12] config: Make GlobalConfiguration instance","To":"Milan Zamazal <mzamazal@redhat.com>, libcamera-devel@lists.libcamera.org","Cc":"Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>","References":"<20250624083612.27230-1-mzamazal@redhat.com>\n\t<20250624083612.27230-3-mzamazal@redhat.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<20250624083612.27230-3-mzamazal@redhat.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":34708,"web_url":"https://patchwork.libcamera.org/comment/34708/","msgid":"<85ldpdvzov.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","date":"2025-06-27T17:53:20","subject":"Re: [PATCH v11 02/12] config: Make GlobalConfiguration instance","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/people/177/","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"content":"Hi Barnabás,\n\nBarnabás Pőcze <barnabas.pocze@ideasonboard.com> writes:\n\n> Hi\n>\n> 2025. 06. 24. 10:35 keltezéssel, Milan Zamazal írta:\n>> Global configuration is accessed via a GlobalConfiguration instance.\n>> The instance is conceptually a singleton, but singletons are not welcome\n>> in libcamera so we must store the (preferably single) instance\n>> somewhere.\n>> This patch creates a GlobalConfiguration instance in CameraManager and\n>> defines the corresponding access method.  CameraManager is typically\n>> instantiated only once or a few times, it is accessible in\n>> many places in libcamera and the configuration can be retrieved from it\n>> and passed to other places if needed (it's read-only once created).\n>> Using CameraManager for the purpose is still suboptimal and we use it\n>> only due to lack of better options.  An alternative could be Logger,\n>> which is still a singleton and it's accessible from everywhere.  But\n>> with Logger, we have a chicken and egg problem -- GlobalConfiguration\n>> should log contingent problems with the configuration when it's loaded\n>> but if it is created in the logger then there are mutual infinite\n>> recursive calls.  Perhaps some acceptable workaround could be found,\n>> which would also allow an easier logging configuration.\n>\n> I think one possible approach is the following:\n>\n>   (1) when the DSO is loaded, initialize logging based on the environmental variables;\n>   (2) when a CameraManager is constructed, apply the logging related configuration.\n\nI tried to follow this suggestion from you when working on v9 but\neventually decided to leave it aside to not complicate the series with\nmore stuff.  I have the WIP patches and may be able to try again once\nthe basic support is merged; but if the plan is to remove the global\nlogger then I think it'd be wasted work.  But I can add the idea to the\ncommit message.\n\n> Of course if multiple `CameraManager`s instantiated, the logging related\n> settings of the last will \"win\". But I don't think this is an issue in\n> practice.\n>\n> I think we could also get rid of the global logger in many places by\n> having a `Logger` interface that is propagated to object. There are\n> still classes like `ControlList`, which, I would say, exist outside\n> the umbrella of the `CameraManager` class, so a global logger instance\n> is unavoidable if such classes want to use logging. This of course\n> brings up the problem of log categories, which are also singleton.\n>\n> I believe it could be useful in some cases because an application could\n> itself supply such a `Logger` instance (on a per CameraManager basis)\n> and redirect libcamera logs into its own stream of log messages if it so wishes.\n\nHaving Logger in CameraManager would allow passing the configuration to\na Logger constructor, which would make things easier.\n\n> Regards,\n> Barnabás Pőcze\n>\n>\n>> If there are multiple CameraManager instances, there are also multiple\n>> GlobalConfiguration instances.  They may or may not contain the same\n>> data, depending on whether the global configuration file in the file\n>> system was changed in the meantime.  This is dirty and a potential\n>> source of trouble (although not expected to have much impact in\n>> practice) but there is no idea how to do better if we want to avoid\n>> having GlobalConfiguration singleton or dealing with the logging\n>> problem.\n>> The configuration is stored in CameraManager privately, it's not meant\n>> to be accessed by applications.\n>> Signed-off-by: Milan Zamazal <mzamazal@redhat.com>\n>> ---\n>>   include/libcamera/internal/camera_manager.h | 8 ++++++++\n>>   src/libcamera/camera_manager.cpp            | 8 ++++++++\n>>   2 files changed, 16 insertions(+)\n>> diff --git a/include/libcamera/internal/camera_manager.h b/include/libcamera/internal/camera_manager.h\n>> index 0150ca61f..e8082eb34 100644\n>> --- a/include/libcamera/internal/camera_manager.h\n>> +++ b/include/libcamera/internal/camera_manager.h\n>> @@ -18,6 +18,7 @@\n>>   #include <libcamera/base/thread.h>\n>>   #include <libcamera/base/thread_annotations.h>\n>>   +#include \"libcamera/internal/global_configuration.h\"\n>>   #include \"libcamera/internal/process.h\"\n>>     namespace libcamera {\n>> @@ -38,6 +39,11 @@ public:\n>>   \tvoid addCamera(std::shared_ptr<Camera> camera) LIBCAMERA_TSA_EXCLUDES(mutex_);\n>>   \tvoid removeCamera(std::shared_ptr<Camera> camera) LIBCAMERA_TSA_EXCLUDES(mutex_);\n>>   +\tconst GlobalConfiguration &configuration() const\n>> +\t{\n>> +\t\treturn configuration_;\n>> +\t}\n>> +\n>>   \tIPAManager *ipaManager() const { return ipaManager_.get(); }\n>>     protected:\n>> @@ -66,6 +72,8 @@ private:\n>>     \tstd::unique_ptr<IPAManager> ipaManager_;\n>>   \tProcessManager processManager_;\n>> +\n>> +\tconst GlobalConfiguration configuration_;\n>>   };\n>>     } /* namespace libcamera */\n>> diff --git a/src/libcamera/camera_manager.cpp b/src/libcamera/camera_manager.cpp\n>> index e62e7193c..f3b4ec708 100644\n>> --- a/src/libcamera/camera_manager.cpp\n>> +++ b/src/libcamera/camera_manager.cpp\n>> @@ -15,6 +15,7 @@\n>>     #include \"libcamera/internal/camera.h\"\n>>   #include \"libcamera/internal/device_enumerator.h\"\n>> +#include \"libcamera/internal/global_configuration.h\"\n>>   #include \"libcamera/internal/ipa_manager.h\"\n>>   #include \"libcamera/internal/pipeline_handler.h\"\n>>   @@ -254,6 +255,13 @@ void CameraManager::Private::removeCamera(std::shared_ptr<Camera> camera)\n>>   \to->cameraRemoved.emit(camera);\n>>   }\n>>   +/**\n>> + * \\fn const GlobalConfiguration &CameraManager::Private::configuration() const\n>> + * \\brief Get global configuration bound to the camera manager\n>> + *\n>> + * \\return Reference to the configuration\n>> + */\n>> +\n>>   /**\n>>    * \\fn CameraManager::Private::ipaManager() const\n>>    * \\brief Retrieve the IPAManager","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 D4294BDCBF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 27 Jun 2025 17:53:28 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B7B6368E04;\n\tFri, 27 Jun 2025 19:53:27 +0200 (CEST)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.129.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4437468DE5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 27 Jun 2025 19:53:26 +0200 (CEST)","from mail-wm1-f70.google.com (mail-wm1-f70.google.com\n\t[209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-615-f5O5CGtsNEy0AWW3Y2wwhA-1; Fri, 27 Jun 2025 13:53:23 -0400","by mail-wm1-f70.google.com with SMTP id\n\t5b1f17b1804b1-451ac1b43c4so12716715e9.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 27 Jun 2025 10:53:23 -0700 (PDT)","from mzamazal-thinkpadp1gen7.tpbc.csb\n\t(ip-77-48-47-2.net.vodafone.cz. [77.48.47.2])\n\tby smtp.gmail.com with ESMTPSA id\n\t5b1f17b1804b1-453823b6d50sm88839325e9.30.2025.06.27.10.53.20\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 27 Jun 2025 10:53:21 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"J+t+YI1M\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1751046805;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tcontent-transfer-encoding:content-transfer-encoding:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=tY1qOPfitBuqhVuqLob7eAZBSY0mjhmlshTXK/UYBwI=;\n\tb=J+t+YI1MSTY9MDw+kyxHtKyFQ7pTWt14MAxq/ZeaMSQRSDe0hXx5cICh0n/rI4d9PIN9r/\n\tdVTLt7EFNX/S1IIId8MPQbWXnBjKy0BwYn24PJY6buptDQKwmKczLWW1Qv58mG2zAyH8xy\n\tde/MjXS/lCfu3O2v7pqumeDT0OK66sA=","X-MC-Unique":"f5O5CGtsNEy0AWW3Y2wwhA-1","X-Mimecast-MFC-AGG-ID":"f5O5CGtsNEy0AWW3Y2wwhA_1751046802","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1751046802; x=1751651602;\n\th=content-transfer-encoding:mime-version:user-agent:message-id:date\n\t:references:in-reply-to:subject:cc:to:from:x-gm-message-state:from\n\t:to:cc:subject:date:message-id:reply-to;\n\tbh=q+tZqdB+GGJCCixoMIBdAziA6fWzAwZGGTFe9RzxvWs=;\n\tb=edikOuhlq6ExR9QGm5Pbx3ItY45NP7GDEYxgyDpJsGkVkfRS0fdHsvu72sshT2nyl8\n\tf4CtP+M/t3kxsne3oyDTE1pJ6CCp1DHIO4aqfMBdqR43GA/TBw+X7CupNAeWwjVDF8cd\n\teiAtLaSITJFHDZaB6ieklxmeGnQtygrUmaQZ5TrJH+VL3MC4f58PunL9qrZeU59G/7JA\n\th/AmO++erAk+9dePEIYTgnrBf8i7I6aZcWZYDQGvexQlPK56Eggh4Ati6kGeGQzJ2jyB\n\to7IuLgVrynN5MRZDO2qNHstL2u9Tl3JSPBJQTXgmYaFC3GOWSzTC13Kkr084ws1k9Tcv\n\tJxpA==","X-Gm-Message-State":"AOJu0Yxnsn7yriuZ80nXmvY/NGKnwbJNppWw2RfaLWAnFJfTg7O4k0vQ\n\tkGMJ6Vl1l9FHH6uqhA7Em52F01+t1DDyMrHKsJzXEp7LyYAMrukMfWzapTitLuhRKYihm4fVKWT\n\tuRKojKIAAdOHyQuLgTZFvEmpNifhJtLUC9GI7F4i7F2YziWJb/+hztPcYsRyeoKIsdIZnAMi0UJ\n\t8=","X-Gm-Gg":"ASbGncvITklypxxwjJ2HQvJdzVtTfWhvkqwXUFoX+9PRFSxm4TAe5addKy28eOVYdiS\n\t90HYnSBauaOKXCn6JCtDKWB42v87n7iHwrIU7RIct2lpOx0Fu0EF5Lp+RzVAZdrWcxkaOs5AcVw\n\ticNKbAJmDeng9mMcYnGfWQo0H1EBVOboFzwlfjEhcPRdoEMOmpi5aQkmkvp8b8+Yr6lzBlIORW1\n\tZjtNliqHcvsDCtEV68cx/29LWIB95W3j7qLtJtTIAH1dDCHJax8CkHIVYmRvJ+YE7Pu0bzK+OQh\n\tpZFE/sqP069Mv4s8TSPU8yKbPPbTkq4BoF0bV4Y8f+BalqJar6fKhUe3uoLup0YMUo3SIMsprGo\n\t=","X-Received":["by 2002:a05:600c:c172:b0:440:9b1a:cd78 with SMTP id\n\t5b1f17b1804b1-4538ee3458amr56051845e9.10.1751046802241; \n\tFri, 27 Jun 2025 10:53:22 -0700 (PDT)","by 2002:a05:600c:c172:b0:440:9b1a:cd78 with SMTP id\n\t5b1f17b1804b1-4538ee3458amr56051565e9.10.1751046801792; \n\tFri, 27 Jun 2025 10:53:21 -0700 (PDT)"],"X-Google-Smtp-Source":"AGHT+IHDxPJ1bLomKVC1Rl6Jn/kU9NENn22VMuFMIXzPg9MXxghI6EhY1CFdxdBnxZ+/rZyHf5W1LQ==","From":"Milan Zamazal <mzamazal@redhat.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org,  Kieran Bingham\n\t<kieran.bingham@ideasonboard.com>,  Laurent Pinchart\n\t<laurent.pinchart@ideasonboard.com>","Subject":"Re: [PATCH v11 02/12] config: Make GlobalConfiguration instance","In-Reply-To":"<0ef0543c-9bf8-4366-8cae-6b9bf0d7d4b3@ideasonboard.com> (\n\t=?utf-8?b?IkJhcm5hYsOhcyBQxZFjemUiJ3M=?= message of \"Fri,\n\t27 Jun 2025  16:00:44 +0200\")","References":"<20250624083612.27230-1-mzamazal@redhat.com>\n\t<20250624083612.27230-3-mzamazal@redhat.com>\n\t<0ef0543c-9bf8-4366-8cae-6b9bf0d7d4b3@ideasonboard.com>","Date":"Fri, 27 Jun 2025 19:53:20 +0200","Message-ID":"<85ldpdvzov.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","User-Agent":"Gnus/5.13 (Gnus v5.13)","MIME-Version":"1.0","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"rZ262fiyMaa0HFo5dm1dXNwgKVZyt6CEmDYdmEo6SDQ_1751046802","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain; charset=utf-8","Content-Transfer-Encoding":"quoted-printable","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":34727,"web_url":"https://patchwork.libcamera.org/comment/34727/","msgid":"<d3f5921a-6bbb-416f-acc4-db90c7d0c75a@ideasonboard.com>","date":"2025-06-30T08:31:51","subject":"Re: [PATCH v11 02/12] config: Make GlobalConfiguration instance","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"Hi\n\n2025. 06. 27. 19:53 keltezéssel, Milan Zamazal írta:\n> Hi Barnabás,\n> \n> Barnabás Pőcze <barnabas.pocze@ideasonboard.com> writes:\n> \n>> Hi\n>>\n>> 2025. 06. 24. 10:35 keltezéssel, Milan Zamazal írta:\n>>> Global configuration is accessed via a GlobalConfiguration instance.\n>>> The instance is conceptually a singleton, but singletons are not welcome\n>>> in libcamera so we must store the (preferably single) instance\n>>> somewhere.\n>>> This patch creates a GlobalConfiguration instance in CameraManager and\n>>> defines the corresponding access method.  CameraManager is typically\n>>> instantiated only once or a few times, it is accessible in\n>>> many places in libcamera and the configuration can be retrieved from it\n>>> and passed to other places if needed (it's read-only once created).\n>>> Using CameraManager for the purpose is still suboptimal and we use it\n>>> only due to lack of better options.  An alternative could be Logger,\n>>> which is still a singleton and it's accessible from everywhere.  But\n>>> with Logger, we have a chicken and egg problem -- GlobalConfiguration\n>>> should log contingent problems with the configuration when it's loaded\n>>> but if it is created in the logger then there are mutual infinite\n>>> recursive calls.  Perhaps some acceptable workaround could be found,\n>>> which would also allow an easier logging configuration.\n>>\n>> I think one possible approach is the following:\n>>\n>>    (1) when the DSO is loaded, initialize logging based on the environmental variables;\n>>    (2) when a CameraManager is constructed, apply the logging related configuration.\n> \n> I tried to follow this suggestion from you when working on v9 but\n> eventually decided to leave it aside to not complicate the series with\n> more stuff.  I have the WIP patches and may be able to try again once\n> the basic support is merged; but if the plan is to remove the global\n> logger then I think it'd be wasted work.  But I can add the idea to the\n> commit message.\n\nAhh, sorry, I did not realize that it had been tried; I just wanted to\nmention this as a potential approach, not to suggest that it should\nbe implemented now as part of this. Feel free to mention or omit it\nas you see fit.\n\n\nRegards,\nBarnabás Pőcze\n\n> \n>> Of course if multiple `CameraManager`s instantiated, the logging related\n>> settings of the last will \"win\". But I don't think this is an issue in\n>> practice.\n>>\n>> I think we could also get rid of the global logger in many places by\n>> having a `Logger` interface that is propagated to object. There are\n>> still classes like `ControlList`, which, I would say, exist outside\n>> the umbrella of the `CameraManager` class, so a global logger instance\n>> is unavoidable if such classes want to use logging. This of course\n>> brings up the problem of log categories, which are also singleton.\n>>\n>> I believe it could be useful in some cases because an application could\n>> itself supply such a `Logger` instance (on a per CameraManager basis)\n>> and redirect libcamera logs into its own stream of log messages if it so wishes.\n> \n> Having Logger in CameraManager would allow passing the configuration to\n> a Logger constructor, which would make things easier.\n> \n>> Regards,\n>> Barnabás Pőcze\n>>\n>>\n>>> If there are multiple CameraManager instances, there are also multiple\n>>> GlobalConfiguration instances.  They may or may not contain the same\n>>> data, depending on whether the global configuration file in the file\n>>> system was changed in the meantime.  This is dirty and a potential\n>>> source of trouble (although not expected to have much impact in\n>>> practice) but there is no idea how to do better if we want to avoid\n>>> having GlobalConfiguration singleton or dealing with the logging\n>>> problem.\n>>> The configuration is stored in CameraManager privately, it's not meant\n>>> to be accessed by applications.\n>>> Signed-off-by: Milan Zamazal <mzamazal@redhat.com>\n>>> ---\n>>>    include/libcamera/internal/camera_manager.h | 8 ++++++++\n>>>    src/libcamera/camera_manager.cpp            | 8 ++++++++\n>>>    2 files changed, 16 insertions(+)\n>>> diff --git a/include/libcamera/internal/camera_manager.h b/include/libcamera/internal/camera_manager.h\n>>> index 0150ca61f..e8082eb34 100644\n>>> --- a/include/libcamera/internal/camera_manager.h\n>>> +++ b/include/libcamera/internal/camera_manager.h\n>>> @@ -18,6 +18,7 @@\n>>>    #include <libcamera/base/thread.h>\n>>>    #include <libcamera/base/thread_annotations.h>\n>>>    +#include \"libcamera/internal/global_configuration.h\"\n>>>    #include \"libcamera/internal/process.h\"\n>>>      namespace libcamera {\n>>> @@ -38,6 +39,11 @@ public:\n>>>    \tvoid addCamera(std::shared_ptr<Camera> camera) LIBCAMERA_TSA_EXCLUDES(mutex_);\n>>>    \tvoid removeCamera(std::shared_ptr<Camera> camera) LIBCAMERA_TSA_EXCLUDES(mutex_);\n>>>    +\tconst GlobalConfiguration &configuration() const\n>>> +\t{\n>>> +\t\treturn configuration_;\n>>> +\t}\n>>> +\n>>>    \tIPAManager *ipaManager() const { return ipaManager_.get(); }\n>>>      protected:\n>>> @@ -66,6 +72,8 @@ private:\n>>>      \tstd::unique_ptr<IPAManager> ipaManager_;\n>>>    \tProcessManager processManager_;\n>>> +\n>>> +\tconst GlobalConfiguration configuration_;\n>>>    };\n>>>      } /* namespace libcamera */\n>>> diff --git a/src/libcamera/camera_manager.cpp b/src/libcamera/camera_manager.cpp\n>>> index e62e7193c..f3b4ec708 100644\n>>> --- a/src/libcamera/camera_manager.cpp\n>>> +++ b/src/libcamera/camera_manager.cpp\n>>> @@ -15,6 +15,7 @@\n>>>      #include \"libcamera/internal/camera.h\"\n>>>    #include \"libcamera/internal/device_enumerator.h\"\n>>> +#include \"libcamera/internal/global_configuration.h\"\n>>>    #include \"libcamera/internal/ipa_manager.h\"\n>>>    #include \"libcamera/internal/pipeline_handler.h\"\n>>>    @@ -254,6 +255,13 @@ void CameraManager::Private::removeCamera(std::shared_ptr<Camera> camera)\n>>>    \to->cameraRemoved.emit(camera);\n>>>    }\n>>>    +/**\n>>> + * \\fn const GlobalConfiguration &CameraManager::Private::configuration() const\n>>> + * \\brief Get global configuration bound to the camera manager\n>>> + *\n>>> + * \\return Reference to the configuration\n>>> + */\n>>> +\n>>>    /**\n>>>     * \\fn CameraManager::Private::ipaManager() const\n>>>     * \\brief Retrieve the IPAManager\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 DC614BDCBF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 30 Jun 2025 08:31:57 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CC2ED68E05;\n\tMon, 30 Jun 2025 10:31:56 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 95A7C61529\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 30 Jun 2025 10:31:55 +0200 (CEST)","from [192.168.33.21] (185.221.143.107.nat.pool.zt.hu\n\t[185.221.143.107])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B77296BE;\n\tMon, 30 Jun 2025 10:31:33 +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=\"h98iWJUR\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1751272294;\n\tbh=q46pdctxIkSzsneHLXc1I5E61KX/7mTO0UQUH3fu2bE=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=h98iWJURtbAn1sDvaa2z4nK2RpDA5jsvqKTeJeKO/bYQvHqq1BbuGJJrUaspmQuv1\n\tqLkiy3H/uRyo3Idum+99oUTH8yiCP2IeOAXSRR4St+BnyJPtWr0KxzCjgslz973JKo\n\t2MyS6VhARgwcTUB3QkwVfEgd61ZgRLE7TwUBwVcw=","Message-ID":"<d3f5921a-6bbb-416f-acc4-db90c7d0c75a@ideasonboard.com>","Date":"Mon, 30 Jun 2025 10:31:51 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v11 02/12] config: Make GlobalConfiguration instance","To":"Milan Zamazal <mzamazal@redhat.com>","Cc":"libcamera-devel@lists.libcamera.org,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>","References":"<20250624083612.27230-1-mzamazal@redhat.com>\n\t<20250624083612.27230-3-mzamazal@redhat.com>\n\t<0ef0543c-9bf8-4366-8cae-6b9bf0d7d4b3@ideasonboard.com>\n\t<85ldpdvzov.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<85ldpdvzov.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","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":34730,"web_url":"https://patchwork.libcamera.org/comment/34730/","msgid":"<85ms9pefao.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","date":"2025-06-30T09:42:39","subject":"Re: [PATCH v11 02/12] config: Make GlobalConfiguration instance","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/people/177/","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"content":"Barnabás Pőcze <barnabas.pocze@ideasonboard.com> writes:\n\n> Hi\n>\n> 2025. 06. 27. 19:53 keltezéssel, Milan Zamazal írta:\n>> Hi Barnabás,\n>> Barnabás Pőcze <barnabas.pocze@ideasonboard.com> writes:\n>> \n>>> Hi\n>>>\n>>> 2025. 06. 24. 10:35 keltezéssel, Milan Zamazal írta:\n>>>> Global configuration is accessed via a GlobalConfiguration instance.\n>>>> The instance is conceptually a singleton, but singletons are not welcome\n>>>> in libcamera so we must store the (preferably single) instance\n>>>> somewhere.\n>>>> This patch creates a GlobalConfiguration instance in CameraManager and\n>>>> defines the corresponding access method.  CameraManager is typically\n>>>> instantiated only once or a few times, it is accessible in\n>>>> many places in libcamera and the configuration can be retrieved from it\n>>>> and passed to other places if needed (it's read-only once created).\n>>>> Using CameraManager for the purpose is still suboptimal and we use it\n>>>> only due to lack of better options.  An alternative could be Logger,\n>>>> which is still a singleton and it's accessible from everywhere.  But\n>>>> with Logger, we have a chicken and egg problem -- GlobalConfiguration\n>>>> should log contingent problems with the configuration when it's loaded\n>>>> but if it is created in the logger then there are mutual infinite\n>>>> recursive calls.  Perhaps some acceptable workaround could be found,\n>>>> which would also allow an easier logging configuration.\n>>>\n>>> I think one possible approach is the following:\n>>>\n>>>    (1) when the DSO is loaded, initialize logging based on the environmental variables;\n>>>    (2) when a CameraManager is constructed, apply the logging related configuration.\n>> I tried to follow this suggestion from you when working on v9 but\n>> eventually decided to leave it aside to not complicate the series with\n>> more stuff.  I have the WIP patches and may be able to try again once\n>> the basic support is merged; but if the plan is to remove the global\n>> logger then I think it'd be wasted work.  But I can add the idea to the\n>> commit message.\n>\n> Ahh, sorry, I did not realize that it had been tried; \n\nOh, no need to apologize -- I tried it only privately and have given up\nwhen realizing it was more effort than I was willing to invest into it\nat the moment.\n\n> I just wanted to mention this as a potential approach, not to suggest\n> that it should be implemented now as part of this. Feel free to\n> mention or omit it as you see fit.\n\nOK.\n\n> Regards,\n> Barnabás Pőcze\n>\n>> \n>>> Of course if multiple `CameraManager`s instantiated, the logging related\n>>> settings of the last will \"win\". But I don't think this is an issue in\n>>> practice.\n>>>\n>>> I think we could also get rid of the global logger in many places by\n>>> having a `Logger` interface that is propagated to object. There are\n>>> still classes like `ControlList`, which, I would say, exist outside\n>>> the umbrella of the `CameraManager` class, so a global logger instance\n>>> is unavoidable if such classes want to use logging. This of course\n>>> brings up the problem of log categories, which are also singleton.\n>>>\n>>> I believe it could be useful in some cases because an application could\n>>> itself supply such a `Logger` instance (on a per CameraManager basis)\n>>> and redirect libcamera logs into its own stream of log messages if it so wishes.\n>> Having Logger in CameraManager would allow passing the configuration to\n>> a Logger constructor, which would make things easier.\n>> \n>>> Regards,\n>>> Barnabás Pőcze\n>>>\n>>>\n>>>> If there are multiple CameraManager instances, there are also multiple\n>>>> GlobalConfiguration instances.  They may or may not contain the same\n>>>> data, depending on whether the global configuration file in the file\n>>>> system was changed in the meantime.  This is dirty and a potential\n>>>> source of trouble (although not expected to have much impact in\n>>>> practice) but there is no idea how to do better if we want to avoid\n>>>> having GlobalConfiguration singleton or dealing with the logging\n>>>> problem.\n>>>> The configuration is stored in CameraManager privately, it's not meant\n>>>> to be accessed by applications.\n>>>> Signed-off-by: Milan Zamazal <mzamazal@redhat.com>\n>>>> ---\n>>>>    include/libcamera/internal/camera_manager.h | 8 ++++++++\n>>>>    src/libcamera/camera_manager.cpp            | 8 ++++++++\n>>>>    2 files changed, 16 insertions(+)\n>>>> diff --git a/include/libcamera/internal/camera_manager.h b/include/libcamera/internal/camera_manager.h\n>>>> index 0150ca61f..e8082eb34 100644\n>>>> --- a/include/libcamera/internal/camera_manager.h\n>>>> +++ b/include/libcamera/internal/camera_manager.h\n>>>> @@ -18,6 +18,7 @@\n>>>>    #include <libcamera/base/thread.h>\n>>>>    #include <libcamera/base/thread_annotations.h>\n>>>>    +#include \"libcamera/internal/global_configuration.h\"\n>>>>    #include \"libcamera/internal/process.h\"\n>>>>      namespace libcamera {\n>>>> @@ -38,6 +39,11 @@ public:\n>>>>    \tvoid addCamera(std::shared_ptr<Camera> camera) LIBCAMERA_TSA_EXCLUDES(mutex_);\n>>>>    \tvoid removeCamera(std::shared_ptr<Camera> camera) LIBCAMERA_TSA_EXCLUDES(mutex_);\n>>>>    +\tconst GlobalConfiguration &configuration() const\n>>>> +\t{\n>>>> +\t\treturn configuration_;\n>>>> +\t}\n>>>> +\n>>>>    \tIPAManager *ipaManager() const { return ipaManager_.get(); }\n>>>>      protected:\n>>>> @@ -66,6 +72,8 @@ private:\n>>>>      \tstd::unique_ptr<IPAManager> ipaManager_;\n>>>>    \tProcessManager processManager_;\n>>>> +\n>>>> +\tconst GlobalConfiguration configuration_;\n>>>>    };\n>>>>      } /* namespace libcamera */\n>>>> diff --git a/src/libcamera/camera_manager.cpp b/src/libcamera/camera_manager.cpp\n>>>> index e62e7193c..f3b4ec708 100644\n>>>> --- a/src/libcamera/camera_manager.cpp\n>>>> +++ b/src/libcamera/camera_manager.cpp\n>>>> @@ -15,6 +15,7 @@\n>>>>      #include \"libcamera/internal/camera.h\"\n>>>>    #include \"libcamera/internal/device_enumerator.h\"\n>>>> +#include \"libcamera/internal/global_configuration.h\"\n>>>>    #include \"libcamera/internal/ipa_manager.h\"\n>>>>    #include \"libcamera/internal/pipeline_handler.h\"\n>>>>    @@ -254,6 +255,13 @@ void CameraManager::Private::removeCamera(std::shared_ptr<Camera> camera)\n>>>>    \to->cameraRemoved.emit(camera);\n>>>>    }\n>>>>    +/**\n>>>> + * \\fn const GlobalConfiguration &CameraManager::Private::configuration() const\n>>>> + * \\brief Get global configuration bound to the camera manager\n>>>> + *\n>>>> + * \\return Reference to the configuration\n>>>> + */\n>>>> +\n>>>>    /**\n>>>>     * \\fn CameraManager::Private::ipaManager() const\n>>>>     * \\brief Retrieve the IPAManager\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 0F46BBDCBF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 30 Jun 2025 09:42:49 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 74DBB68E05;\n\tMon, 30 Jun 2025 11:42:47 +0200 (CEST)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.133.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 82F9C61529\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 30 Jun 2025 11:42:45 +0200 (CEST)","from mail-wr1-f70.google.com (mail-wr1-f70.google.com\n\t[209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-418-TFg0UAeJPuuLyvP-xPLCGg-1; Mon, 30 Jun 2025 05:42:42 -0400","by mail-wr1-f70.google.com with SMTP id\n\tffacd0b85a97d-3a5281ba3a4so1852161f8f.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 30 Jun 2025 02:42:42 -0700 (PDT)","from mzamazal-thinkpadp1gen7.tpbc.csb\n\t(ip-77-48-47-2.net.vodafone.cz. [77.48.47.2])\n\tby smtp.gmail.com with ESMTPSA id\n\tffacd0b85a97d-3a892e5f8absm10080658f8f.95.2025.06.30.02.42.39\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 30 Jun 2025 02:42:39 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"FpJNzzDD\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1751276564;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tcontent-transfer-encoding:content-transfer-encoding:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=HVgAKLIBIp09m8N1zb1bJZoeF2J9iHQl5QbA8AB8KHQ=;\n\tb=FpJNzzDDpIU2HDhYczKwgkIR1H3hKi15cQ0C96XCXYBE78joP82+iR2tqYh+xjQIWyoouG\n\tnk7P5vRfSrv1/Ls7rEU3AW2E+edCz3fhHfyCn4Vw4LdHfFKRpxKPL27cVd2Ek1qgF32TRI\n\tEn0tZ3lYSMDEyzn3VuGFebk8y5VtrrU=","X-MC-Unique":"TFg0UAeJPuuLyvP-xPLCGg-1","X-Mimecast-MFC-AGG-ID":"TFg0UAeJPuuLyvP-xPLCGg_1751276561","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1751276561; x=1751881361;\n\th=content-transfer-encoding:mime-version:user-agent:message-id:date\n\t:references:in-reply-to:subject:cc:to:from:x-gm-message-state:from\n\t:to:cc:subject:date:message-id:reply-to;\n\tbh=yWL4CPvxvbJOekQGXJHibBEdpoYAxLXLs5bGZl1zwzE=;\n\tb=npgWQYAI+Vbo9H7vg/Sipl3Om4L9kPL7JHGzLT6wQ1oP5fjA6WOGzyIthmKlbvoY/k\n\ts3sJHVjT6I2qaLu1MFWOEPCH7tZ3XTJTn9zDXkZoEpAVaYH1gs+9jRVE5YYkecfsx4fw\n\t7aIg1gP8J6BmGvY48j/AjdZVEuOHijLyPdPWL22ZMA3rLwgR7fNq0SUqJXQaHPCt0Li6\n\tZ/YH6zN19uk3KBKfenEcQNkXYQCy/NzUcJFGrdRwHog78RrVDbcHN2JIzlLpnQZIU9TY\n\tkqZDaAK3cfzigFvOzPsQtB8Dv01oW189jUsDVx0FykW1m0RbElS8rJ7H+taKpxqXs74o\n\tZwTA==","X-Gm-Message-State":"AOJu0YwhmrzFEESMDfKP8k+745bxwnNeGTiYc2f+TMoEyehiKsLOkn9Z\n\tvHzRPNGK6Yie/TQdAgr6q1gLwC2msqSYiqA4zCr7EoE8zcdRm2q+c+SgF0YV3VXqPsMI3y0Lx0S\n\tG7BpNc7zhe9Yw8NLUCcvjDVNJgsWHxajjm5VmLIM9m0ssncqBFAi2nIgbKMvJv1n6b3LwCDdScg\n\ts=","X-Gm-Gg":"ASbGncuwYTZVNT9kC9AkrQX1nXiBzlpf6rqv/3gLRRN/H0Sa3Tl1q6OROKKYDAmynup\n\tqTmDiQ2U92zhZQiaR0vqK4NGPhIankn2UgXuZuVUCIyqf0necl2Hd5/U8HdQbAddds68Znr5KM9\n\tFHwKfBjSNmz8SLF6IO/Xk5vIrF/FMrjhKErGWv8cXAQZp48+SOfksW1kxys3vK+I3jwV5q5xWCW\n\tGXl2Ett968HRzTeKVUYypddtpfAX/t0uecKo+aSE76VJuDwu2CaZPrlDf0pze4m5AeAyOkeYb5c\n\tO98rEMO3zrHABzf18OEBfSZBtXo1tljDQM4DXfRmvqt4Hob4W0BuBlLq0CevuSp9ZmTkv23AmSw\n\t=","X-Received":["by 2002:a05:6000:1a8f:b0:3a6:d579:b78e with SMTP id\n\tffacd0b85a97d-3a90066a42dmr9246079f8f.46.1751276560947; \n\tMon, 30 Jun 2025 02:42:40 -0700 (PDT)","by 2002:a05:6000:1a8f:b0:3a6:d579:b78e with SMTP id\n\tffacd0b85a97d-3a90066a42dmr9246061f8f.46.1751276560465; \n\tMon, 30 Jun 2025 02:42:40 -0700 (PDT)"],"X-Google-Smtp-Source":"AGHT+IFR4Jdv4mxBZcOW5x3hRZEbZB9C3+JdYBYu/8KXzIaMMsODunufP6U0k/nK52p7bKIltwGxrQ==","From":"Milan Zamazal <mzamazal@redhat.com>","To":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org,  Kieran Bingham\n\t<kieran.bingham@ideasonboard.com>,  Laurent Pinchart\n\t<laurent.pinchart@ideasonboard.com>","Subject":"Re: [PATCH v11 02/12] config: Make GlobalConfiguration instance","In-Reply-To":"<d3f5921a-6bbb-416f-acc4-db90c7d0c75a@ideasonboard.com> (\n\t=?utf-8?b?IkJhcm5hYsOhcyBQxZFjemUiJ3M=?= message of \"Mon,\n\t30 Jun 2025  10:31:51 +0200\")","References":"<20250624083612.27230-1-mzamazal@redhat.com>\n\t<20250624083612.27230-3-mzamazal@redhat.com>\n\t<0ef0543c-9bf8-4366-8cae-6b9bf0d7d4b3@ideasonboard.com>\n\t<85ldpdvzov.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>\n\t<d3f5921a-6bbb-416f-acc4-db90c7d0c75a@ideasonboard.com>","Date":"Mon, 30 Jun 2025 11:42:39 +0200","Message-ID":"<85ms9pefao.fsf@mzamazal-thinkpadp1gen7.tpbc.csb>","User-Agent":"Gnus/5.13 (Gnus v5.13)","MIME-Version":"1.0","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"NK8jDoEn6Rwbxg49HyR8rW9Iw2h-tf8-irKbRFRy6UQ_1751276561","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain; charset=utf-8","Content-Transfer-Encoding":"quoted-printable","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>"}}]