Cover Letter Detail
Show a cover letter.
GET /api/covers/21447/?format=api
{ "id": 21447, "url": "https://patchwork.libcamera.org/api/covers/21447/?format=api", "web_url": "https://patchwork.libcamera.org/cover/21447/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20241001102810.479285-1-mzamazal@redhat.com>", "date": "2024-10-01T10:27:52", "name": "[v5,00/15] Add global configuration file", "submitter": { "id": 177, "url": "https://patchwork.libcamera.org/api/people/177/?format=api", "name": "Milan Zamazal", "email": "mzamazal@redhat.com" }, "mbox": "https://patchwork.libcamera.org/cover/21447/mbox/", "series": [ { "id": 4644, "url": "https://patchwork.libcamera.org/api/series/4644/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4644", "date": "2024-10-01T10:27:52", "name": "Add global configuration file", "version": 5, "mbox": "https://patchwork.libcamera.org/series/4644/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/covers/21447/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 6A362BD80A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 1 Oct 2024 10:28:26 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2BA1563523;\n\tTue, 1 Oct 2024 12:28:25 +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 3CB2E60553\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 1 Oct 2024 12:28:22 +0200 (CEST)", "from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com\n\t(ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63])\n\tby relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n\tcipher=TLS_AES_256_GCM_SHA384) id us-mta-628-pH_2j37LNMeWL6gM6IsBdg-1;\n\tTue, 01 Oct 2024 06:28:18 -0400", "from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (unknown\n\t[10.30.177.40])\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 mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix)\n\twith ESMTPS id AF7A3191928A; Tue, 1 Oct 2024 10:28:16 +0000 (UTC)", "from nuthatch.brq.redhat.com (unknown [10.43.17.37])\n\tby mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix)\n\twith ESMTP id E5AD11956054; Tue, 1 Oct 2024 10:28:14 +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=\"hJP3ur7d\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1727778501;\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=1Rc318dmtB4HU9ZJoph7115k8R1T5H41oj4WDGwRDbY=;\n\tb=hJP3ur7d+z0Ej9nINsm8NY70k+aYOl9c2mE4y6hP+RBb4b0IfynI8G4jXNkYJpyIkb0Btx\n\ts+w/CWa9/ZcslmwsCOD54auEvOVZAJhTVgFQg4ScjiPVU+vPUArOJYCzfu6m1+MXksi2RD\n\tThYe75BP5d0Dc4u3Sy8hpQDnovepP+w=", "X-MC-Unique": "pH_2j37LNMeWL6gM6IsBdg-1", "From": "Milan Zamazal <mzamazal@redhat.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Milan Zamazal <mzamazal@redhat.com>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>,\n\tNaushir Patuck <naush@raspberrypi.com>", "Subject": "[PATCH v5 00/15] Add global configuration file", "Date": "Tue, 1 Oct 2024 12:27:52 +0200", "Message-ID": "<20241001102810.479285-1-mzamazal@redhat.com>", "MIME-Version": "1.0", "X-Scanned-By": "MIMEDefang 3.0 on 10.30.177.40", "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\nprovide runtime configuration means other than environment variables.\nInstead of, or in addition to, the growing list of configuration\nenvironment variables, the whole configuration can be specified in a\nsingle configuration file. This is both simpler and more flexible.\n\nThis is not a replacement for specific configuration files already\npresent in libcamera.\n\nThe patches implement what is needed to introduce a configuration file\nthat can handle the current environment variables and software ISP\nTODOs. 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\ndirectory or, if not present, in system-wide libcamera directories.\nEnvironment variables, if set, still take precedence.\n\nThis patch series is not exhaustive, there can be future enhancements,\nmost notably configuration file validation to avoid confusions caused by\ntypos etc.\n\nNot everything has been tested because some of the patches are related\nto specific hardware.\n\nAlso, not everything is necessarily C++ elegant, suggestions for\nimprovements are welcome. Note that there is an obstacle in that\nconfiguration initialization may call logging and logging queries\nconfiguration, as explained in the commit messages. This complicates\ntransparent encapsulation.\n\nChanges in v5:\n- A pointer is used to store the global configuration singleton rather\n than a static variable. This makes the things more robust and fixes\n the problem with re-entrancy on logging and a failing\n camera_reconfigure test.\n- In relation to the change above, a new initialization method\n GlobalConfiguration::initialize() was introduced that replaces the\n initialization calls in CameraManager and IPAManager.\n- Logging YAML errors when reading the configuration was also fixed.\n- Global configuration is placed to base directly, without an\n intermediate patch.\n- An `optional' value comparison simplified.\n- A temporary typo in a comment fixed.\n- Unused stdint.h include removed.\n\nChanges in v4:\n- Rebased on current master.\n- Configuration option for LIBCAMERA_IPA_PROXY_PATH added.\n- Added a patch to include stdlib.h instead of cstdlib in yaml_parser.cpp.\n\nChanges in v3:\n- Added a configuration item for the newly introduced\n LIBCAMERA_PIPELINES_MATCH_LIST variable.\n- A minor indentation fix.\n- Fixed `pipelines.' x `pipeline.' configuration item naming mismatch.\n- Tuning files are looked up now by particular cameras attached rather than\n being specified for the whole pipeline.\n- Helpers use std::string& instead of char* for confPath arguments.\n- Protection against returning YamlObject::empty as a regular value (the\n problem has been probably exposed by addition of\n LIBCAMERA_PIPELINES_MATCH_LIST).\n\nChanges in v2:\n- Rebased on master.\n- Various cleanups, documentation improvements and minor fixes.\n- Configuration option for LIBCAMERA_RPI_TUNING_FILE added (Naush).\n- Two more patches for software ISP configuration added.\n\nMilan Zamazal (15):\n yaml: Include stdlib.h instead of cstdlib\n yaml: Move yaml_parser.cpp to base\n config: Introduce global runtime configuration\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 paths in configuration file\n config: Look up IPA configurables in configuration file\n config: Look up RkISP1 tuning file in configuration file\n config: Look up pipelines match list in configuration file\n config: Allow enabling software ISP in runtime\n config: Add global configuration file documentation\n libcamera: software_isp: Make input buffer copying configurable\n libcamera: software_isp: Make measurement configurable\n\n Documentation/documentation-contents.rst | 2 +-\n Documentation/index.rst | 4 +-\n Documentation/meson.build | 2 +-\n ...ariables.rst => runtime_configuration.rst} | 119 +++++++++-\n .../libcamera/internal/global_configuration.h | 72 ++++++\n include/libcamera/internal/meson.build | 1 +\n src/libcamera/base/global_configuration.cpp | 223 ++++++++++++++++++\n src/libcamera/base/log.cpp | 24 +-\n src/libcamera/base/meson.build | 15 ++\n src/libcamera/{ => base}/yaml_parser.cpp | 2 +-\n src/libcamera/camera_manager.cpp | 10 +-\n src/libcamera/ipa_manager.cpp | 14 +-\n src/libcamera/ipa_proxy.cpp | 16 +-\n src/libcamera/meson.build | 14 --\n src/libcamera/pipeline/rkisp1/rkisp1.cpp | 20 +-\n .../pipeline/rpi/common/pipeline_base.cpp | 18 +-\n src/libcamera/pipeline/simple/simple.cpp | 12 +\n src/libcamera/process.cpp | 11 +-\n src/libcamera/software_isp/TODO | 36 ---\n src/libcamera/software_isp/debayer_cpu.cpp | 30 ++-\n src/libcamera/software_isp/debayer_cpu.h | 7 +-\n 21 files changed, 540 insertions(+), 112 deletions(-)\n rename Documentation/{environment_variables.rst => runtime_configuration.rst} (61%)\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 (99%)" }