{"id":19802,"url":"https://patchwork.libcamera.org/api/1.1/covers/19802/?format=json","web_url":"https://patchwork.libcamera.org/cover/19802/","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":"<20240326112419.503286-1-mzamazal@redhat.com>","date":"2024-03-26T11:24:03","name":"[RFC,00/11] Add global configuration file","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/1.1/people/177/?format=json","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"mbox":"https://patchwork.libcamera.org/cover/19802/mbox/","series":[{"id":4241,"url":"https://patchwork.libcamera.org/api/1.1/series/4241/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=4241","date":"2024-03-26T11:24:03","name":"Add global configuration file","version":1,"mbox":"https://patchwork.libcamera.org/series/4241/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/19802/comments/","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 131DEBD160\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 26 Mar 2024 11:26:14 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6A66263037;\n\tTue, 26 Mar 2024 12:26:13 +0100 (CET)","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 8CE3F61C41\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 26 Mar 2024 12:26:11 +0100 (CET)","from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com\n\t[66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-120-XfW-AuGoM8u0zA_yqg8cHg-1; Tue, 26 Mar 2024 07:26:08 -0400","from smtp.corp.redhat.com\n\t(int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\tkey-exchange X25519 server-signature RSA-PSS (2048 bits)\n\tserver-digest SHA256) (No client certificate requested)\n\tby mimecast-mx02.redhat.com (Postfix) with ESMTPS id A9638101A526\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 26 Mar 2024 11:26:08 +0000 (UTC)","from nuthatch.brq.redhat.com (unknown [10.43.17.39])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id 352D43C20;\n\tTue, 26 Mar 2024 11:26:08 +0000 (UTC)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=redhat.com header.i=@redhat.com\n\theader.b=\"FELgYXHM\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1711452370;\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\tbh=uaQOuMyYz7XzT4AZC36fIlHXF2v3BTwQKoTpKnMt3l4=;\n\tb=FELgYXHMHMHlMSzBinmcz78ho3MFjrn/SgSowBfr7QYWqm06s8Djn0Mcqhsin14MhXnSIn\n\tHlDvpLUV9HD2UmQgcUYS62HHYNYQ9at28FJzIKjA4KPUMZG1Zcree36nKh7h4LoTIkmYT0\n\thc1PsphTehIcvrdz5GHcpfrHO76Sotk=","X-MC-Unique":"XfW-AuGoM8u0zA_yqg8cHg-1","From":"Milan Zamazal <mzamazal@redhat.com>","To":"libcamera-devel@lists.libcamera.org","Cc":"Milan Zamazal <mzamazal@redhat.com>","Subject":"[RFC PATCH 00/11] Add global configuration file","Date":"Tue, 26 Mar 2024 12:24:03 +0100","Message-ID":"<20240326112419.503286-1-mzamazal@redhat.com>","MIME-Version":"1.0","X-Scanned-By":"MIMEDefang 3.4.1 on 10.11.54.1","X-Mimecast-Spam-Score":"0","X-Mimecast-Originator":"redhat.com","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":"This patch series introduces global configuration file for libcamera, to provide\nruntime configuration means other than environment variables.  Instead of, or in\naddition to, the growing list of configuration environment variables, the whole\nconfiguration can be specified in a single configuration file.  This is both\nsimpler and more flexible.\n\nThis is not a replacement for specific configuration files already present in\nlibcamera.\n\nThe patches implement what is needed to introduce the configuration file\nproviding configuration options corresponding to the current environment\nvariables.  They demonstrate how to deal with the key points that must be\nconsidered.  See commit messages for more details.\n\nThe configuration file is a YAML file.  It is looked up in user’s home directory\nor, if not present, in system-wide libcamera directories.  Environment\nvariables, if set, still take precedence.\n\nThis RFC is not exhaustive, there can be future enhancements, most notably\nconfiguration file validation to avoid confusions caused by typos etc.\n\nThe current patch series is based on the last posted software ISP branch.\n\nMilan Zamazal (11):\n  config: Introduce global runtime configuration\n  config: Move global configuration to base\n  config: Look up logging levels in the configuration file\n  config: Add configuration retrieval helpers\n  config: Look up log file in configuration file\n  config: Look up log color configuration in configuration file\n  config: Look up rpi config path in configuration file\n  config: Look up IPA configurables in configuration file\n  config: Look up RkISP1 tuning file in configuration file\n  config: Allow enabling software ISP in runtime\n  config: Add global configuration documentation\n\n Documentation/index.rst                       |   2 +-\n Documentation/meson.build                     |   2 +-\n ...ariables.rst => runtime_configuration.rst} |  56 ++++++-\n .../libcamera/internal/global_configuration.h |  63 +++++++\n include/libcamera/internal/meson.build        |   1 +\n src/libcamera/base/global_configuration.cpp   | 154 ++++++++++++++++++\n src/libcamera/base/log.cpp                    |  24 ++-\n src/libcamera/base/meson.build                |  15 ++\n src/libcamera/{ => base}/yaml_parser.cpp      |   0\n src/libcamera/camera_manager.cpp              |   9 +\n src/libcamera/ipa_manager.cpp                 |  23 ++-\n src/libcamera/ipa_proxy.cpp                   |   8 +-\n src/libcamera/meson.build                     |  14 --\n src/libcamera/pipeline/rkisp1/rkisp1.cpp      |   9 +-\n .../pipeline/rpi/common/pipeline_base.cpp     |   8 +-\n src/libcamera/pipeline/simple/simple.cpp      |  10 ++\n src/libcamera/process.cpp                     |  11 +-\n 17 files changed, 371 insertions(+), 38 deletions(-)\n rename Documentation/{environment_variables.rst => runtime_configuration.rst} (76%)\n create mode 100644 include/libcamera/internal/global_configuration.h\n create mode 100644 src/libcamera/base/global_configuration.cpp\n rename src/libcamera/{ => base}/yaml_parser.cpp (100%)"}