Show a patch.

GET /api/1.1/patches/21366/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 21366,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/21366/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/21366/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/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": "<20240925095850.348259-14-mzamazal@redhat.com>",
    "date": "2024-09-25T09:58:45",
    "name": "[v4,13/15] config: Add global configuration file documentation",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "ab76d763025c55bb6aeaba4b95bd8cab7e26bd68",
    "submitter": {
        "id": 177,
        "url": "https://patchwork.libcamera.org/api/1.1/people/177/?format=api",
        "name": "Milan Zamazal",
        "email": "mzamazal@redhat.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/21366/mbox/",
    "series": [
        {
            "id": 4623,
            "url": "https://patchwork.libcamera.org/api/1.1/series/4623/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4623",
            "date": "2024-09-25T09:58:32",
            "name": "Add global configuration file",
            "version": 4,
            "mbox": "https://patchwork.libcamera.org/series/4623/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/21366/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/21366/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 1F715C0F1B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 25 Sep 2024 09:59:46 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BB53763526;\n\tWed, 25 Sep 2024 11:59:45 +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 63D2363524\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 25 Sep 2024 11:59:35 +0200 (CEST)",
            "from mx-prod-mc-04.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-553-jAsA4qQSM92iHeR4RwO05g-1;\n\tWed, 25 Sep 2024 05:59:30 -0400",
            "from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (unknown\n\t[10.30.177.12])\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-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix)\n\twith ESMTPS id 05E3019560BD; Wed, 25 Sep 2024 09:59:30 +0000 (UTC)",
            "from nuthatch.redhat.com (unknown [10.45.225.29])\n\tby mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix)\n\twith ESMTP id 7C56E19560AA; Wed, 25 Sep 2024 09:59:28 +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=\"cLLtsBmi\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1727258374;\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=E/5eqVtjhu7BCMlojQP16qgaLRtWX9JVDLIDiK0F1eM=;\n\tb=cLLtsBmioWoM+AWGiGDdpOuem5jShxguZIMoWcahfQlTaNZkKxI6kRTBMa0YyF6q5+QCrs\n\thcYQHy9K/p+8B/M8Guzm1Gj+cuBJOd3crOkiOtCBLO71nLmZ/3J+3r6o00K23i/Qa2vXWm\n\t/bj3dhyLs2YJkzNNAN4I9FAw75WFZYI=",
        "X-MC-Unique": "jAsA4qQSM92iHeR4RwO05g-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 v4 13/15] config: Add global configuration file documentation",
        "Date": "Wed, 25 Sep 2024 11:58:45 +0200",
        "Message-ID": "<20240925095850.348259-14-mzamazal@redhat.com>",
        "In-Reply-To": "<20240925095850.348259-1-mzamazal@redhat.com>",
        "References": "<20240925095850.348259-1-mzamazal@redhat.com>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 3.0 on 10.30.177.12",
        "X-Mimecast-Spam-Score": "0",
        "X-Mimecast-Originator": "redhat.com",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain; charset=\"US-ASCII\"; x-default=true",
        "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": "Extend (and rename) the documentation of environment variables with\ninformation about the configuration file.\n\nSigned-off-by: Milan Zamazal <mzamazal@redhat.com>\n---\n Documentation/documentation-contents.rst      |   2 +-\n Documentation/index.rst                       |   4 +-\n Documentation/meson.build                     |   2 +-\n ...ariables.rst => runtime_configuration.rst} | 111 ++++++++++++++++--\n 4 files changed, 102 insertions(+), 17 deletions(-)\n rename Documentation/{environment_variables.rst => runtime_configuration.rst} (63%)",
    "diff": "diff --git a/Documentation/documentation-contents.rst b/Documentation/documentation-contents.rst\nindex 5c1118493..4be3729cf 100644\n--- a/Documentation/documentation-contents.rst\n+++ b/Documentation/documentation-contents.rst\n@@ -7,7 +7,7 @@\n    * :doc:`/feature_requirements`\n    * :doc:`/guides/application-developer`\n    * :doc:`/python-bindings`\n-   * :doc:`/environment_variables`\n+   * :doc:`/runtime_configuration`\n    * :doc:`/api-html/index`\n    * :doc:`/code-of-conduct`\n    * |\ndiff --git a/Documentation/index.rst b/Documentation/index.rst\nindex bea406608..20d46788f 100644\n--- a/Documentation/index.rst\n+++ b/Documentation/index.rst\n@@ -12,13 +12,13 @@\n \n    Application Writer's Guide <guides/application-developer>\n    Camera Sensor Model <camera-sensor-model>\n-   Environment variables <environment_variables>\n    Feature Requirements <feature_requirements>\n    IPA Writer's guide <guides/ipa>\n    Lens driver requirements <lens_driver_requirements>\n    libcamera Architecture <libcamera_architecture>\n    Pipeline Handler Writer's Guide <guides/pipeline-handler>\n    Python Bindings <python-bindings>\n+   Runtime configuration <runtime_configuration>\n    Sensor driver requirements <sensor_driver_requirements>\n    SoftwareISP Benchmarking <software-isp-benchmarking>\n    Tracing guide <guides/tracing>\n@@ -26,4 +26,4 @@\n .. toctree::\n    :hidden:\n \n-   introduction\n\\ No newline at end of file\n+   introduction\ndiff --git a/Documentation/meson.build b/Documentation/meson.build\nindex 36ffae239..b55e25b18 100644\n--- a/Documentation/meson.build\n+++ b/Documentation/meson.build\n@@ -129,7 +129,6 @@ if sphinx.found()\n         'conf.py',\n         'contributing.rst',\n         'documentation-contents.rst',\n-        'environment_variables.rst',\n         'feature_requirements.rst',\n         'guides/application-developer.rst',\n         'guides/ipa.rst',\n@@ -141,6 +140,7 @@ if sphinx.found()\n         'libcamera_architecture.rst',\n         'mali-c55.dot',\n         'python-bindings.rst',\n+        'runtime_configuration.rst',\n         'sensor_driver_requirements.rst',\n         'software-isp-benchmarking.rst',\n        '../README.rst',\ndiff --git a/Documentation/environment_variables.rst b/Documentation/runtime_configuration.rst\nsimilarity index 63%\nrename from Documentation/environment_variables.rst\nrename to Documentation/runtime_configuration.rst\nindex 7da9883a8..819b1c830 100644\n--- a/Documentation/environment_variables.rst\n+++ b/Documentation/runtime_configuration.rst\n@@ -2,49 +2,134 @@\n \n .. include:: documentation-contents.rst\n \n-Environment variables\n+Runtime configuration\n =====================\n \n-The libcamera behaviour can be tuned through environment variables. This\n-document lists all the available variables and describes their usage.\n+The libcamera behaviour can be tuned through a configuration file or\n+environment variables. This document lists all the configuration options\n+and describes their usage.\n+\n+General rules\n+-------------\n+\n+The configuration file is looked up in the following locations, in this\n+order:\n+\n+- $XDG_CONFIG_HOME/libcamera/configuration.yaml\n+- LIBCAMERA_SYSCONF_DIR/configuration.yaml\n+- /etc/libcamera/configuration.yaml\n+\n+The first configuration file found wins, contingent configuration files\n+in other locations are ignored.\n+\n+Settings in environment variables take precedence over settings in\n+configuration files. This allows overriding behaviour temporarily\n+without the need to modify configuration files.\n+\n+Configuration options\n+---------------------\n+\n+Here is an overview of the available configuration options, in the YAML\n+file structure:\n+\n+::\n+\n+  configuration:\n+    ipa:\n+       config_paths: # full paths to directories, separated by colons\n+       force_isolation: # true/false\n+       module_paths: # full paths to directories, separated by colons\n+    log:\n+      color: # true/false for color/no-color\n+      file: # either `syslog` or a full path\n+      levels: # see Log levels\n+    pipelines_match_list: # pipeline names, separated by commas\n+    pipelines:\n+      rkisp1:\n+        cameras:\n+        - CAMERA-ID:\n+          tuning-file: # full path\n+      rpi:\n+        config_file: # full path\n+        cameras:\n+        - CAMERA-ID:\n+          tuning-file: # full path\n+      simple:\n+        supported_devices:\n+        - driver: # driver name, e.g. `mxc-isi`\n+          software_isp: # true/false\n+\n+Configuration file example\n+--------------------------\n+\n+::\n+\n+   ---\n+   version: 1\n+   configuration:\n+     ipa:\n+       config_paths: /home/user/.libcamera/share/ipa:/opt/libcamera/vendor/share/ipa\n+       module_paths: /home/user/.libcamera/lib:/opt/libcamera/vendor/lib\n+       proxy_paths: /home/user/.libcamera/proxy/worker:/opt/libcamera/vendor/proxy/worker\n+       force_isolation: true\n+     log:\n+       color: false\n+       file: syslog\n+       levels: 'IPAManager:DEBUG'\n+     pipelines_match_list: rkisp1,simple\n+     pipelines:\n+       rkisp1:\n+         cameras:\n+         - \"/base/axi/pcie@120000/rp1/i2c@88000/imx283@1a\":\n+           tuning_file: /home/pi/imx283.json\n+         - \"/base/axi/pcie@120000/rp1/i2c@80000/imx335@1a\":\n+           tuning_file: /home/pi/imx335.json\n+       rpi:\n+         config_file: /usr/local/share/libcamera/pipeline/rpi/vc4/minimal_mem.yaml\n+       simple:\n+         supported_devices:\n+         - driver: mxc-isi\n+           software_isp: true\n \n List of variables\n -----------------\n \n-LIBCAMERA_LOG_FILE\n+The corresponding configuration file paths are listed in parentheses.\n+\n+LIBCAMERA_LOG_FILE (log.file)\n    The custom destination for log output.\n \n    Example value: ``/home/{user}/camera_log.log``\n \n-LIBCAMERA_LOG_LEVELS\n+LIBCAMERA_LOG_LEVELS (log.levels)\n    Configure the verbosity of log messages for different categories (`more <Log levels_>`__).\n \n    Example value: ``*:DEBUG``\n \n-LIBCAMERA_LOG_NO_COLOR\n+LIBCAMERA_LOG_NO_COLOR (log.color)\n    Disable coloring of log messages (`more <Notes about debugging_>`__).\n \n-LIBCAMERA_IPA_CONFIG_PATH\n+LIBCAMERA_IPA_CONFIG_PATH (ipa.config_paths)\n    Define custom search locations for IPA configurations (`more <IPA configuration_>`__).\n \n    Example value: ``${HOME}/.libcamera/share/ipa:/opt/libcamera/vendor/share/ipa``\n \n-LIBCAMERA_IPA_FORCE_ISOLATION\n+LIBCAMERA_IPA_FORCE_ISOLATION (ipa.force_isolation)\n    When set to a non-empty string, force process isolation of all IPA modules.\n \n    Example value: ``1``\n \n-LIBCAMERA_IPA_MODULE_PATH\n+LIBCAMERA_IPA_MODULE_PATH (ipa.module_paths)\n    Define custom search locations for IPA modules (`more <IPA module_>`__).\n \n    Example value: ``${HOME}/.libcamera/lib:/opt/libcamera/vendor/lib``\n \n-LIBCAMERA_IPA_PROXY_PATH\n+LIBCAMERA_IPA_PROXY_PATH (ipa.proxy_paths)\n    Define custom full path for a proxy worker for a given executable name.\n \n    Example value: ``${HOME}/.libcamera/proxy/worker:/opt/libcamera/vendor/proxy/worker``\n \n-LIBCAMERA_PIPELINES_MATCH_LIST\n+LIBCAMERA_PIPELINES_MATCH_LIST (pipelines_match_list)\n    Define an ordered list of pipeline names to be used to match the media\n    devices in the system. The pipeline handler names used to populate the\n    variable are the ones passed to the REGISTER_PIPELINE_HANDLER() macro in the\n@@ -52,7 +137,7 @@ LIBCAMERA_PIPELINES_MATCH_LIST\n \n    Example value: ``rkisp1,simple``\n \n-LIBCAMERA_RPI_CONFIG_FILE\n+LIBCAMERA_RPI_CONFIG_FILE (pipelines.rpi.config_file)\n    Define a custom configuration file to use in the Raspberry Pi pipeline handler.\n \n    Example value: ``/usr/local/share/libcamera/pipeline/rpi/vc4/minimal_mem.yaml``\n@@ -156,7 +241,7 @@ code.\n IPA configuration\n ~~~~~~~~~~~~~~~~~\n \n-IPA modules use configuration files to store parameters. The format and\n+IPA modules use their own configuration files to store parameters. The format and\n contents of the configuration files is specific to the IPA module. They usually\n contain tuning parameters for the algorithms, in JSON format.\n \n",
    "prefixes": [
        "v4",
        "13/15"
    ]
}