[{"id":34890,"web_url":"https://patchwork.libcamera.org/comment/34890/","msgid":"<6509c91f-4367-4616-809f-49a6810be142@ideasonboard.com>","date":"2025-07-14T13:50:51","subject":"Re: [PATCH v13 08/12] config: Add global configuration file\n\tdocumentation","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. 07. 11. 22:12 keltezéssel, Milan Zamazal írta:\n> Extend (and rename) the documentation of environment variables with\n> information about the configuration file.\n> \n> Signed-off-by: Milan Zamazal <mzamazal@redhat.com>\n> ---\n>   Documentation/documentation-contents.rst      |   2 +-\n>   Documentation/index.rst                       |   2 +-\n>   Documentation/meson.build                     |   2 +-\n>   ...ariables.rst => runtime_configuration.rst} | 108 ++++++++++++++++--\n>   4 files changed, 102 insertions(+), 12 deletions(-)\n>   rename Documentation/{environment_variables.rst => runtime_configuration.rst} (66%)\n> \n> diff --git a/Documentation/documentation-contents.rst b/Documentation/documentation-contents.rst\n> index 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>      * |\n> diff --git a/Documentation/index.rst b/Documentation/index.rst\n> index 251112fbd..200de6f67 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> diff --git a/Documentation/meson.build b/Documentation/meson.build\n> index 0fc5909d0..6d5af0f62 100644\n> --- a/Documentation/meson.build\n> +++ b/Documentation/meson.build\n> @@ -128,7 +128,6 @@ if sphinx.found()\n>           'contributing.rst',\n>           'design/ae.rst',\n>           'documentation-contents.rst',\n> -        'environment_variables.rst',\n>           'feature_requirements.rst',\n>           'guides/application-developer.rst',\n>           'guides/ipa.rst',\n> @@ -140,6 +139,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',\n> diff --git a/Documentation/environment_variables.rst b/Documentation/runtime_configuration.rst\n> similarity index 66%\n> rename from Documentation/environment_variables.rst\n> rename to Documentation/runtime_configuration.rst\n> index 6f1235587..04289cd16 100644\n> --- a/Documentation/environment_variables.rst\n> +++ b/Documentation/runtime_configuration.rst\n> @@ -2,15 +2,101 @@\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> +- LIBCAMERA_DATA_DIR/libcamera/configuration.yaml\n> +\n> +The first configuration file found wins, configuration files in other\n> +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> +      ipas:\n> +        rkisp1:\n> +          tuning_file: # full path\n> +        rpi:\n> +          tuning_file: # full path\n\nI believe the \"ipas\" part has been removed.\n\n\nRegards,\nBarnabás Pőcze\n\n\n> +    pipelines_match_list: # pipeline names, separated by commas\n> +    pipelines:\n> +      rpi:\n> +        bcm2835:\n> +          pipeline_handler:\n> +            ...\n> +        pisp:\n> +          pipeline_handler:\n> +            ...\n> +      simple:\n> +        supported_devices:\n> +        - driver: # driver name, e.g. `mxc-isi`\n> +          software_isp: # true/false\n> +\n> [...g","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 D1114C3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 14 Jul 2025 13:50:55 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8740B68F4D;\n\tMon, 14 Jul 2025 15:50:55 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4137968F3F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 14 Jul 2025 15:50:54 +0200 (CEST)","from [192.168.33.16] (185.221.140.39.nat.pool.zt.hu\n\t[185.221.140.39])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 4379B166D;\n\tMon, 14 Jul 2025 15:50:22 +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=\"qttvBRlp\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1752501022;\n\tbh=gqra3pqYlJFvXhNvVsGsMD/wyOM2DBGFjbdkgYENBkA=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=qttvBRlpWR1zWnJmZzNbqA1QEQvgLWL5HnqwNopmlclbXXlgZEW9JY+cUfcLc2rGA\n\td4tpoDNvJbfECfOYeLvReATRxF0Qk9YJzSQr2/M4T1nrtPsr6A6KNLWIC4nzHL4bhZ\n\t4Bi9XKugz/W0Z0oI1vfmC/GPs3l73C857nsQCaVw=","Message-ID":"<6509c91f-4367-4616-809f-49a6810be142@ideasonboard.com>","Date":"Mon, 14 Jul 2025 15:50:51 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v13 08/12] config: Add global configuration file\n\tdocumentation","To":"Milan Zamazal <mzamazal@redhat.com>, libcamera-devel@lists.libcamera.org","Cc":"Kieran Bingham <kieran.bingham@ideasonboard.com>, =?utf-8?q?Barnab?=\n\t=?utf-8?b?w6FzIFDFkWN6ZQ==?= <barnabas.pocze@ideasonboard.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>","References":"<20250711201232.129264-1-mzamazal@redhat.com>\n\t<u58VIAOkUkuBTxCsTgETgnbvVw0e97yrwMdQf2HyRW_nLXU8g8P1o1ZiHr4dfwxk1aKMKJ7NDWqKPrxqpu79jA==@protonmail.internalid>\n\t<20250711201232.129264-9-mzamazal@redhat.com>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<20250711201232.129264-9-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>"}}]