[{"id":26024,"web_url":"https://patchwork.libcamera.org/comment/26024/","msgid":"<CAEmqJPqoegFZBGiSSQq4bCb-KdsKsVjFnBLns1PUEZCh9xW_Ew@mail.gmail.com>","date":"2022-12-08T10:27:47","subject":"Re: [libcamera-devel] [PATCH 0/9] Introduce Pipeline configuration\n\tpreference for IPU3","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"Hi Han-Lin,\n\nI realise this replay might be very (very) late now :-) However, I have been\nworking on something very similar to this work for the Raspberry Pi pipeline\nhandler: https://patchwork.libcamera.org/project/libcamera/list/?series=3659\n.\nI just wanted to reach out to see if there is any common ground between\nboth our\npatch series that would help us both.\n\nHaving briefly looked through your series, I think the key difference is\nhow we\nprovide the config file to the respective pipeline handlers.  I've opted\nfor a\nsimpler approach of using an environment variable to provide a filename to\nthe\npipeline handler.  There is a helper function\nPipelineHandler::configurationFile()\nthat will attempt to locate the file from either the system install path, or\nthe source directory.  It's up to the respective pipeline handler to parse\nthe\nfile and interpret the parameters as required.\n\nIs this approach something you can make use of for your series, replacing\nthe\n\"options\" mechanism that you have implemented?  As always, feel free to ask\nany\nquestions if you have them.\n\nRegards,\nNaush\n\nOn Wed, 9 Feb 2022 at 07:19, Han-Lin Chen <hanlinchen@chromium.org> wrote:\n\n> Hello,\n>\n> This patch series is to introduce the pipeline configuration preference\n> for IPU3. Before the series, IPU3 calculates the ImgU configuration\n> based on the algorithm from Intel:\n> https://github.com/intel/intel-ipu3-pipecfg\n>\n> However, IPU3 seems not well defined with the limitation on ImgU and\n> leading to configuration failure in some cases. See:\n> https://bugs.libcamera.org/show_bug.cgi?id=67\n>\n> Due to this, on ChromeOS, Intel made manual adjusts on the validated\n> setting for each camera module. The patch series is to introduce the\n> feature for IPU3, and possibly other platforms with similar issues.\n>\n> The patch 1-2 is to introduce Option control for user to enable features\n> which need to be selected before querying capabilities of a camera.\n>\n> The patch 3 Adds helper class to wrap libyaml for easier reading yaml\n> files.\n>\n> The patch 4-9 Supports the Pipeline configuration preference of IPU3 and\n> default to be enabled on ChromeOS is it's specified on hal_config.yaml.\n>\n> Han-Lin Chen (9):\n>   libcamera: Introduce option to customize behavior for a camera module\n>   libcamera: Add options() and setOptions() operations to Camera\n>   libcamera: Introduce YamlParser as a helper to parse yaml files\n>   android: camera_hal_config: Use YamlParser to parse android hal config\n>   android: Add pipeline_config_file parameter for camera_hal.yaml\n>   android: Set PipelineConfigFile option if it's supported by the camera\n>   libcamera: ipu3: Add helper class PipeConfigPreference\n>   libcamera: ipu3: Support PipelineConfigFile option\n>   android: Elevate min duration to 30 FPS if it's lower within 2%\n>\n>  README.rst                                    |   2 +-\n>  include/libcamera/camera.h                    |   3 +\n>  include/libcamera/geometry.h                  |   4 +\n>  include/libcamera/internal/camera.h           |   2 +\n>  include/libcamera/internal/meson.build        |   1 +\n>  include/libcamera/internal/pipeline_handler.h |   2 +\n>  include/libcamera/internal/yaml_parser.h      |  82 ++\n>  include/libcamera/ipa/ipa_controls.h          |   1 +\n>  include/libcamera/meson.build                 |   3 +-\n>  include/libcamera/option_ids.h.in             |  36 +\n>  src/android/camera_capabilities.cpp           |  31 +-\n>  src/android/camera_device.cpp                 |  19 +\n>  src/android/camera_hal_config.cpp             | 344 ++------\n>  src/android/camera_hal_config.h               |   1 +\n>  src/android/data/nautilus/camera_hal.yaml     |   2 +\n>  src/android/data/nautilus/imx258.yaml         | 248 ++++++\n>  src/android/data/soraka/camera_hal.yaml       |   2 +\n>  src/android/data/soraka/ov13858.yaml          | 236 ++++++\n>  src/android/data/soraka/ov5670.yaml           | 242 ++++++\n>  src/libcamera/camera.cpp                      |  59 ++\n>  src/libcamera/control_serializer.cpp          |  12 +\n>  src/libcamera/geometry.cpp                    |  20 +\n>  src/libcamera/meson.build                     |   3 +\n>  src/libcamera/option_ids.cpp.in               |  58 ++\n>  src/libcamera/option_ids.yaml                 |  16 +\n>  src/libcamera/pipeline/ipu3/ipu3.cpp          | 215 ++++-\n>  src/libcamera/pipeline/ipu3/meson.build       |   1 +\n>  .../pipeline/ipu3/pipe_config_pref.cpp        | 285 +++++++\n>  .../pipeline/ipu3/pipe_config_pref.h          |  80 ++\n>  src/libcamera/pipeline_handler.cpp            |  26 +\n>  src/libcamera/yaml_parser.cpp                 | 796 ++++++++++++++++++\n>  31 files changed, 2563 insertions(+), 269 deletions(-)\n>  create mode 100644 include/libcamera/internal/yaml_parser.h\n>  create mode 100644 include/libcamera/option_ids.h.in\n>  create mode 100644 src/android/data/nautilus/imx258.yaml\n>  create mode 100644 src/android/data/soraka/ov13858.yaml\n>  create mode 100644 src/android/data/soraka/ov5670.yaml\n>  create mode 100644 src/libcamera/option_ids.cpp.in\n>  create mode 100644 src/libcamera/option_ids.yaml\n>  create mode 100644 src/libcamera/pipeline/ipu3/pipe_config_pref.cpp\n>  create mode 100644 src/libcamera/pipeline/ipu3/pipe_config_pref.h\n>  create mode 100644 src/libcamera/yaml_parser.cpp\n>\n> --\n> 2.35.0.263.gb82422642f-goog\n>\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 8B2EEBDE6B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  8 Dec 2022 10:28:06 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id AC9396334C;\n\tThu,  8 Dec 2022 11:28:05 +0100 (CET)","from mail-il1-x134.google.com (mail-il1-x134.google.com\n\t[IPv6:2607:f8b0:4864:20::134])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2D3AA61F1F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  8 Dec 2022 11:28:03 +0100 (CET)","by mail-il1-x134.google.com with SMTP id m15so457262ilq.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 08 Dec 2022 02:28:03 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1670495285;\n\tbh=UwyAV4VMgMwIKVu/NgZwQBdA+Akixu8HxMJREO12Q5Q=;\n\th=References:In-Reply-To:Date:To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=cCOBIFy99w5E37eh7L2kDpCfVdIabPPCOtzuGHDDVy8xE+LYYhMF5m7QmB7/ld6TU\n\t4nS2BIiAb7cv1y18oF+SbzmDNqHi5AybJMLiPZj4UWH4rhzKl3EaHeNT4rAzi0Vo5M\n\tC9fCA30F89K86EfZ8BSSaIO4zJFnks80ZMY5Ggo+wuV9V0xfMPxBU5+ysnW/fzBBHn\n\tmMdV85BPZ2/9VzSDVxbcg4QO1PnY9zVjjx7+sN/EPHubJrsIxC9eBDG8PkbYuLTwMv\n\tp/8M8BrFPNKqWp20d+/echYcaEj/YjZdIsACJV75khd/MqZ73HqtPYXTNmhcR1cP12\n\tQn2Q8DYYbLvkA==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:from:to:cc:subject:date:message-id:reply-to;\n\tbh=klWx4YI9nmJVUy9PqWKM+tpXnDScCtpcxfQa+Fkpz1E=;\n\tb=DitTMAD7culiWkjIfPIztHqQVh+3M2JnEkXDnew8Vgk2JmNwQpKzlX1M0HlgCqGo0F\n\to//nJhV1pav7qYTr/YaRTTmOvWiLD9EwAnb4Jhs/g2X4OPO00G+dkoBp+UaEI6NdrhTS\n\tdJowTUfhLSUgoCcaH8RBdsCWhUhuJZvtxddA9DZTLADZMGU1i0pywuW5iLu4HDsB4evn\n\t28Dxkpj4Sm/3Q9zRH/IXV/uMz7HmvseHnjgoe+XmJvghOUXnCApWZanVRDLuYcKTeYH+\n\tagvwH/Oql1guYs/huCmFCUvFikViFUGPswr4TZEy6epFg3ZbxSUgC3E5pLmOgcLLtUpB\n\tkpxg=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"DitTMAD7\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=klWx4YI9nmJVUy9PqWKM+tpXnDScCtpcxfQa+Fkpz1E=;\n\tb=jmiMmV9j1O+gRlAFPfHtCCp63+Q7Bi94iE2q7vkXVlzHi7xl7yA6ADAnWmfk17xy5l\n\tDDtngfze3R740WSH6mx9RCVhvyrwmQRSYpOequsLpH7OR6v6ZaYP6JRWhTQprUPvpmNB\n\ti0HdqSiWgOVaXkNYWpCw5EhcGgHeuLVRKt2IZVu4AXULXgC+zfbWW1MBQ6fCHsIy7fvw\n\tkb1+x/e27kz6BOhhQNPeE58u7kGjf/j7+lSB3lLDqlVxPUrByOxRcKdxbxlt0ZX8e+xB\n\tXRIJy8+Ish/X2s9zxHN45G5Se9WdtBEXys6IFcEHzHwaaPvpczt2fQgk5cSgfXTZKFvm\n\tJt/A==","X-Gm-Message-State":"ANoB5ploO2bLXHaKrKegzYGlND2qQabk4ZjbroESiK+FVIR37mCinznf\n\t3hHF6KUYQd9aGBv6OEPBME4uJnLTOdBLhCmRqrBIGQ==","X-Google-Smtp-Source":"AA0mqf4dqdGS30RfvxbjprWEuFccGyc2aRUPb4HZakV9QPb4ztSsLkT3yRYeJ8uRrQNKd0e0uGsQsLwsoPNafHTzyG8=","X-Received":"by 2002:a92:c212:0:b0:303:7011:85d3 with SMTP id\n\tj18-20020a92c212000000b00303701185d3mr5960828ilo.181.1670495281733;\n\tThu, 08 Dec 2022 02:28:01 -0800 (PST)","MIME-Version":"1.0","References":"<20220209071917.559993-1-hanlinchen@chromium.org>","In-Reply-To":"<20220209071917.559993-1-hanlinchen@chromium.org>","Date":"Thu, 8 Dec 2022 10:27:47 +0000","Message-ID":"<CAEmqJPqoegFZBGiSSQq4bCb-KdsKsVjFnBLns1PUEZCh9xW_Ew@mail.gmail.com>","To":"Han-Lin Chen <hanlinchen@chromium.org>","Content-Type":"multipart/alternative; boundary=\"000000000000ddff5105ef4e7d06\"","Subject":"Re: [libcamera-devel] [PATCH 0/9] Introduce Pipeline configuration\n\tpreference for IPU3","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>","From":"Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Naushir Patuck <naush@raspberrypi.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":26194,"web_url":"https://patchwork.libcamera.org/comment/26194/","msgid":"<CAJAuwMmAeztvoZbRb_2YhHOB5UDbu=O8wCqJm7wPB6_n4oqihw@mail.gmail.com>","date":"2023-01-07T12:30:43","subject":"Re: [libcamera-devel] [PATCH 0/9] Introduce Pipeline configuration\n\tpreference for IPU3","submitter":{"id":98,"url":"https://patchwork.libcamera.org/api/people/98/","name":"Hanlin Chen","email":"hanlinchen@chromium.org"},"content":"Hi Naushir,\n\nThanks for reaching out.\nIn fact, I have no preference either way, as long as we can get the\nconfig file for the pipeline handler :)\nJust that ChromeOS usually does not use environment variables to\ndefine config files.\nIf the helper function PipelineHandler::configurationFile() can have a\ndefault path, maybe only for the ChromeOS builds, that would be good\nenough for me.\nPlease don't hesitate to continue your changes. I will follow up when\nI get cycles to update my series :P\n\nOn Thu, Dec 8, 2022 at 6:28 PM Naushir Patuck <naush@raspberrypi.com> wrote:\n>\n> Hi Han-Lin,\n>\n> I realise this replay might be very (very) late now :-) However, I have been\n> working on something very similar to this work for the Raspberry Pi pipeline\n> handler: https://patchwork.libcamera.org/project/libcamera/list/?series=3659.\n> I just wanted to reach out to see if there is any common ground between both our\n> patch series that would help us both.\n>\n> Having briefly looked through your series, I think the key difference is how we\n> provide the config file to the respective pipeline handlers.  I've opted for a\n> simpler approach of using an environment variable to provide a filename to the\n> pipeline handler.  There is a helper function PipelineHandler::configurationFile()\n> that will attempt to locate the file from either the system install path, or\n> the source directory.  It's up to the respective pipeline handler to parse the\n> file and interpret the parameters as required.\n>\n> Is this approach something you can make use of for your series, replacing the\n> \"options\" mechanism that you have implemented?  As always, feel free to ask any\n> questions if you have them.\n>\n> Regards,\n> Naush\n>\n> On Wed, 9 Feb 2022 at 07:19, Han-Lin Chen <hanlinchen@chromium.org> wrote:\n>>\n>> Hello,\n>>\n>> This patch series is to introduce the pipeline configuration preference\n>> for IPU3. Before the series, IPU3 calculates the ImgU configuration\n>> based on the algorithm from Intel:\n>> https://github.com/intel/intel-ipu3-pipecfg\n>>\n>> However, IPU3 seems not well defined with the limitation on ImgU and\n>> leading to configuration failure in some cases. See:\n>> https://bugs.libcamera.org/show_bug.cgi?id=67\n>>\n>> Due to this, on ChromeOS, Intel made manual adjusts on the validated\n>> setting for each camera module. The patch series is to introduce the\n>> feature for IPU3, and possibly other platforms with similar issues.\n>>\n>> The patch 1-2 is to introduce Option control for user to enable features\n>> which need to be selected before querying capabilities of a camera.\n>>\n>> The patch 3 Adds helper class to wrap libyaml for easier reading yaml\n>> files.\n>>\n>> The patch 4-9 Supports the Pipeline configuration preference of IPU3 and\n>> default to be enabled on ChromeOS is it's specified on hal_config.yaml.\n>>\n>> Han-Lin Chen (9):\n>>   libcamera: Introduce option to customize behavior for a camera module\n>>   libcamera: Add options() and setOptions() operations to Camera\n>>   libcamera: Introduce YamlParser as a helper to parse yaml files\n>>   android: camera_hal_config: Use YamlParser to parse android hal config\n>>   android: Add pipeline_config_file parameter for camera_hal.yaml\n>>   android: Set PipelineConfigFile option if it's supported by the camera\n>>   libcamera: ipu3: Add helper class PipeConfigPreference\n>>   libcamera: ipu3: Support PipelineConfigFile option\n>>   android: Elevate min duration to 30 FPS if it's lower within 2%\n>>\n>>  README.rst                                    |   2 +-\n>>  include/libcamera/camera.h                    |   3 +\n>>  include/libcamera/geometry.h                  |   4 +\n>>  include/libcamera/internal/camera.h           |   2 +\n>>  include/libcamera/internal/meson.build        |   1 +\n>>  include/libcamera/internal/pipeline_handler.h |   2 +\n>>  include/libcamera/internal/yaml_parser.h      |  82 ++\n>>  include/libcamera/ipa/ipa_controls.h          |   1 +\n>>  include/libcamera/meson.build                 |   3 +-\n>>  include/libcamera/option_ids.h.in             |  36 +\n>>  src/android/camera_capabilities.cpp           |  31 +-\n>>  src/android/camera_device.cpp                 |  19 +\n>>  src/android/camera_hal_config.cpp             | 344 ++------\n>>  src/android/camera_hal_config.h               |   1 +\n>>  src/android/data/nautilus/camera_hal.yaml     |   2 +\n>>  src/android/data/nautilus/imx258.yaml         | 248 ++++++\n>>  src/android/data/soraka/camera_hal.yaml       |   2 +\n>>  src/android/data/soraka/ov13858.yaml          | 236 ++++++\n>>  src/android/data/soraka/ov5670.yaml           | 242 ++++++\n>>  src/libcamera/camera.cpp                      |  59 ++\n>>  src/libcamera/control_serializer.cpp          |  12 +\n>>  src/libcamera/geometry.cpp                    |  20 +\n>>  src/libcamera/meson.build                     |   3 +\n>>  src/libcamera/option_ids.cpp.in               |  58 ++\n>>  src/libcamera/option_ids.yaml                 |  16 +\n>>  src/libcamera/pipeline/ipu3/ipu3.cpp          | 215 ++++-\n>>  src/libcamera/pipeline/ipu3/meson.build       |   1 +\n>>  .../pipeline/ipu3/pipe_config_pref.cpp        | 285 +++++++\n>>  .../pipeline/ipu3/pipe_config_pref.h          |  80 ++\n>>  src/libcamera/pipeline_handler.cpp            |  26 +\n>>  src/libcamera/yaml_parser.cpp                 | 796 ++++++++++++++++++\n>>  31 files changed, 2563 insertions(+), 269 deletions(-)\n>>  create mode 100644 include/libcamera/internal/yaml_parser.h\n>>  create mode 100644 include/libcamera/option_ids.h.in\n>>  create mode 100644 src/android/data/nautilus/imx258.yaml\n>>  create mode 100644 src/android/data/soraka/ov13858.yaml\n>>  create mode 100644 src/android/data/soraka/ov5670.yaml\n>>  create mode 100644 src/libcamera/option_ids.cpp.in\n>>  create mode 100644 src/libcamera/option_ids.yaml\n>>  create mode 100644 src/libcamera/pipeline/ipu3/pipe_config_pref.cpp\n>>  create mode 100644 src/libcamera/pipeline/ipu3/pipe_config_pref.h\n>>  create mode 100644 src/libcamera/yaml_parser.cpp\n>>\n>> --\n>> 2.35.0.263.gb82422642f-goog\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 D7758C3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat,  7 Jan 2023 12:30:57 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5DDE9625CC;\n\tSat,  7 Jan 2023 13:30:57 +0100 (CET)","from mail-ot1-x329.google.com (mail-ot1-x329.google.com\n\t[IPv6:2607:f8b0:4864:20::329])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 719B3625CC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat,  7 Jan 2023 13:30:55 +0100 (CET)","by mail-ot1-x329.google.com with SMTP id\n\tr2-20020a9d7cc2000000b006718a7f7fbaso2437126otn.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 07 Jan 2023 04:30:55 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1673094657;\n\tbh=e8iEVyxbg+TPIL3d/DbSMnZxRIhb+cw8QahpU7gGQqk=;\n\th=References:In-Reply-To:Date:To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=u7eufXWnEQhw4KMKTncMimXK/jVyshLNx7sPGXtzcbd2awkpbwFbrvjB9ZA5bozLh\n\tEKon761E1o62YmvQFKLcBS/H2caLxq04YAuGF0BnYMuy/uSB1JI41hwBKqhTgLyn1f\n\t+eOJUxY8lYaSEDu4tqUTfkVnagayuowpqa4Q4U2peKiOkYEqWttwJyOAfoDJWxzkd/\n\tMqirLjDbKmfK5+GT6ypVwuB7p9664dGKcnzAlh/vADKwo1MsaQOJR0+giRA54P++as\n\tnBPlhfnkh+c9nk28CcEwJI6WJK4CLVxFzyjCdJWCLo0ca6P56MDySnJ4IpR1FzX374\n\tsVQ/Ugg025t2Q==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:from:to:cc:subject:date:message-id:reply-to;\n\tbh=NANiMYkA1YBfpMSUWAyTwqBL0mGMUP2c9K/n+a2/yd4=;\n\tb=JLKfLUPkuC2QrnIwFzhgdSUerTppF2GvHUNFxZmhBvzeUzmeZczJZAkHZiItIUtwpY\n\tAI7XoQah9qpsLtUyRp4SHrrlM685tWqDb6EHiqLLHB6qKAp3wNg3a0RJwQqihCrMWcNJ\n\tDTncfNMqyTXObCoch8B8LPNincx10b7v9ae84="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=chromium.org\n\theader.i=@chromium.org header.b=\"JLKfLUPk\"; \n\tdkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=NANiMYkA1YBfpMSUWAyTwqBL0mGMUP2c9K/n+a2/yd4=;\n\tb=Tv9Jc/oSrBgAqHPOKdpE8P8GEklIwLgWQ5lrzPWPaN8suR24qHmniD3kryZ3ed8MdF\n\twANk4lPdIAKMl4A0IZw0MYMX9miPpNyFhke64fpKIdmstmKHCRBX1RNqw5pdWEGHt9ix\n\tvFaRncU9sdJ+yLOzOmzXmDR4JVGKNgD+KTSxwwT1OVSLh8q1SuEO6eWgI5ZNPSqJRuR4\n\tOSFi82jypoEQdu+xERFgEm1Qa2fi60IYCmZhqg8gXvnnSiV+meg3qhooTKiHmfcqR5eJ\n\tOam6UqgeImSNZNT6Z6mAP73LmKK0qYxbllOjUwW8UA4tT5LrT+A6ScPt2lg2bQHASW5J\n\tUUOg==","X-Gm-Message-State":"AFqh2kow4biEOy8SiZIN9H5KNiQu4wgBB+dPludH41ARWkkdtLuGENI3\n\tnOFnP7095sH080yhtVXbKMFV8FMIEH8sJr3BUw5Jdw==","X-Google-Smtp-Source":"AMrXdXv7WZr3za6GmiX2ipfCvrNj60Y8zpG9QLTBfudNelTb7QyehrM4CKpWIcr0pZyFHl/RHOY7XxzeCeVTVQ1+m58=","X-Received":"by 2002:a05:6830:16d2:b0:66e:34d1:2088 with SMTP id\n\tl18-20020a05683016d200b0066e34d12088mr3076958otr.149.1673094654048;\n\tSat, 07 Jan 2023 04:30:54 -0800 (PST)","MIME-Version":"1.0","References":"<20220209071917.559993-1-hanlinchen@chromium.org>\n\t<CAEmqJPqoegFZBGiSSQq4bCb-KdsKsVjFnBLns1PUEZCh9xW_Ew@mail.gmail.com>","In-Reply-To":"<CAEmqJPqoegFZBGiSSQq4bCb-KdsKsVjFnBLns1PUEZCh9xW_Ew@mail.gmail.com>","Date":"Sat, 7 Jan 2023 20:30:43 +0800","Message-ID":"<CAJAuwMmAeztvoZbRb_2YhHOB5UDbu=O8wCqJm7wPB6_n4oqihw@mail.gmail.com>","To":"Naushir Patuck <naush@raspberrypi.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH 0/9] Introduce Pipeline configuration\n\tpreference for IPU3","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>","From":"Hanlin Chen via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Hanlin Chen <hanlinchen@chromium.org>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":26387,"web_url":"https://patchwork.libcamera.org/comment/26387/","msgid":"<167516489169.42371.9565210576217106613@Monstersaurus>","date":"2023-01-31T11:34:51","subject":"Re: [libcamera-devel] [PATCH 0/9] Introduce Pipeline configuration\n\tpreference for IPU3","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Hanlin Chen via libcamera-devel (2023-01-07 12:30:43)\n> Hi Naushir,\n> \n> Thanks for reaching out.\n> In fact, I have no preference either way, as long as we can get the\n> config file for the pipeline handler :)\n\nIt looks like I'm going to merge at least the core support for pipeline\nconfiguration files from Naush's series quite soon.\n\n> Just that ChromeOS usually does not use environment variables to\n> define config files.\n> If the helper function PipelineHandler::configurationFile() can have a\n> default path, maybe only for the ChromeOS builds, that would be good\n> enough for me.\n\nI think I would like to see a 'core' libcamera configuration file, with\na well defined path that can set anything that we currently set by\nenvironment variable.\n\n--\nKieran\n\n\n> Please don't hesitate to continue your changes. I will follow up when\n> I get cycles to update my series :P\n> \n> On Thu, Dec 8, 2022 at 6:28 PM Naushir Patuck <naush@raspberrypi.com> wrote:\n> >\n> > Hi Han-Lin,\n> >\n> > I realise this replay might be very (very) late now :-) However, I have been\n> > working on something very similar to this work for the Raspberry Pi pipeline\n> > handler: https://patchwork.libcamera.org/project/libcamera/list/?series=3659.\n> > I just wanted to reach out to see if there is any common ground between both our\n> > patch series that would help us both.\n> >\n> > Having briefly looked through your series, I think the key difference is how we\n> > provide the config file to the respective pipeline handlers.  I've opted for a\n> > simpler approach of using an environment variable to provide a filename to the\n> > pipeline handler.  There is a helper function PipelineHandler::configurationFile()\n> > that will attempt to locate the file from either the system install path, or\n> > the source directory.  It's up to the respective pipeline handler to parse the\n> > file and interpret the parameters as required.\n> >\n> > Is this approach something you can make use of for your series, replacing the\n> > \"options\" mechanism that you have implemented?  As always, feel free to ask any\n> > questions if you have them.\n> >\n> > Regards,\n> > Naush\n> >\n> > On Wed, 9 Feb 2022 at 07:19, Han-Lin Chen <hanlinchen@chromium.org> wrote:\n> >>\n> >> Hello,\n> >>\n> >> This patch series is to introduce the pipeline configuration preference\n> >> for IPU3. Before the series, IPU3 calculates the ImgU configuration\n> >> based on the algorithm from Intel:\n> >> https://github.com/intel/intel-ipu3-pipecfg\n> >>\n> >> However, IPU3 seems not well defined with the limitation on ImgU and\n> >> leading to configuration failure in some cases. See:\n> >> https://bugs.libcamera.org/show_bug.cgi?id=67\n> >>\n> >> Due to this, on ChromeOS, Intel made manual adjusts on the validated\n> >> setting for each camera module. The patch series is to introduce the\n> >> feature for IPU3, and possibly other platforms with similar issues.\n> >>\n> >> The patch 1-2 is to introduce Option control for user to enable features\n> >> which need to be selected before querying capabilities of a camera.\n> >>\n> >> The patch 3 Adds helper class to wrap libyaml for easier reading yaml\n> >> files.\n> >>\n> >> The patch 4-9 Supports the Pipeline configuration preference of IPU3 and\n> >> default to be enabled on ChromeOS is it's specified on hal_config.yaml.\n> >>\n> >> Han-Lin Chen (9):\n> >>   libcamera: Introduce option to customize behavior for a camera module\n> >>   libcamera: Add options() and setOptions() operations to Camera\n> >>   libcamera: Introduce YamlParser as a helper to parse yaml files\n> >>   android: camera_hal_config: Use YamlParser to parse android hal config\n> >>   android: Add pipeline_config_file parameter for camera_hal.yaml\n> >>   android: Set PipelineConfigFile option if it's supported by the camera\n> >>   libcamera: ipu3: Add helper class PipeConfigPreference\n> >>   libcamera: ipu3: Support PipelineConfigFile option\n> >>   android: Elevate min duration to 30 FPS if it's lower within 2%\n> >>\n> >>  README.rst                                    |   2 +-\n> >>  include/libcamera/camera.h                    |   3 +\n> >>  include/libcamera/geometry.h                  |   4 +\n> >>  include/libcamera/internal/camera.h           |   2 +\n> >>  include/libcamera/internal/meson.build        |   1 +\n> >>  include/libcamera/internal/pipeline_handler.h |   2 +\n> >>  include/libcamera/internal/yaml_parser.h      |  82 ++\n> >>  include/libcamera/ipa/ipa_controls.h          |   1 +\n> >>  include/libcamera/meson.build                 |   3 +-\n> >>  include/libcamera/option_ids.h.in             |  36 +\n> >>  src/android/camera_capabilities.cpp           |  31 +-\n> >>  src/android/camera_device.cpp                 |  19 +\n> >>  src/android/camera_hal_config.cpp             | 344 ++------\n> >>  src/android/camera_hal_config.h               |   1 +\n> >>  src/android/data/nautilus/camera_hal.yaml     |   2 +\n> >>  src/android/data/nautilus/imx258.yaml         | 248 ++++++\n> >>  src/android/data/soraka/camera_hal.yaml       |   2 +\n> >>  src/android/data/soraka/ov13858.yaml          | 236 ++++++\n> >>  src/android/data/soraka/ov5670.yaml           | 242 ++++++\n> >>  src/libcamera/camera.cpp                      |  59 ++\n> >>  src/libcamera/control_serializer.cpp          |  12 +\n> >>  src/libcamera/geometry.cpp                    |  20 +\n> >>  src/libcamera/meson.build                     |   3 +\n> >>  src/libcamera/option_ids.cpp.in               |  58 ++\n> >>  src/libcamera/option_ids.yaml                 |  16 +\n> >>  src/libcamera/pipeline/ipu3/ipu3.cpp          | 215 ++++-\n> >>  src/libcamera/pipeline/ipu3/meson.build       |   1 +\n> >>  .../pipeline/ipu3/pipe_config_pref.cpp        | 285 +++++++\n> >>  .../pipeline/ipu3/pipe_config_pref.h          |  80 ++\n> >>  src/libcamera/pipeline_handler.cpp            |  26 +\n> >>  src/libcamera/yaml_parser.cpp                 | 796 ++++++++++++++++++\n> >>  31 files changed, 2563 insertions(+), 269 deletions(-)\n> >>  create mode 100644 include/libcamera/internal/yaml_parser.h\n> >>  create mode 100644 include/libcamera/option_ids.h.in\n> >>  create mode 100644 src/android/data/nautilus/imx258.yaml\n> >>  create mode 100644 src/android/data/soraka/ov13858.yaml\n> >>  create mode 100644 src/android/data/soraka/ov5670.yaml\n> >>  create mode 100644 src/libcamera/option_ids.cpp.in\n> >>  create mode 100644 src/libcamera/option_ids.yaml\n> >>  create mode 100644 src/libcamera/pipeline/ipu3/pipe_config_pref.cpp\n> >>  create mode 100644 src/libcamera/pipeline/ipu3/pipe_config_pref.h\n> >>  create mode 100644 src/libcamera/yaml_parser.cpp\n> >>\n> >> --\n> >> 2.35.0.263.gb82422642f-goog\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 CD817C323E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 31 Jan 2023 11:34:57 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E18A9625E4;\n\tTue, 31 Jan 2023 12:34:56 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 042DA625D0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 31 Jan 2023 12:34:54 +0100 (CET)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 661A6D6;\n\tTue, 31 Jan 2023 12:34:54 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1675164896;\n\tbh=+upaDBzAa6Jcafx3hdWuR0Pwu/nDuiLMrumIg4h9Gyw=;\n\th=In-Reply-To:References:To:Date:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=MB/I5F3OcHxkyW0uvkwpp2uKS0N/6Q2Nhq0Rj7/lHhlV4FXw5ddpuWS3hGZne4hTY\n\tfZ5RoLCL2mR/OOfV6PrCeyoz05qMULABOG6lcARQsaMNWaVfNoNUl1NCUU1PavsTkq\n\tLeGKHNVU0dIFXTFef/lyMhF4xPFwqnrqFYECvnWAMgb/8bXOf4zve6MsCyHKpLablk\n\tfr9y1xoxeD/xwtQ+luoNmBj8qvYqTPC4yExSIWccne93fD4lvRnyJWGjH9iu+kqpwW\n\t/pG8KHVkFlQJVB26YA+6kIljYURXkZVJYzdyUwv7vZxodc/bw2p9ei5OsDJzsJacrf\n\tcuzsohUgKc3Vg==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1675164894;\n\tbh=+upaDBzAa6Jcafx3hdWuR0Pwu/nDuiLMrumIg4h9Gyw=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=ooOEEOyxGJPUnaWMYkFp4XOX3cM7qNQJtjuiQzOOVOZgYwxRM6S5o7QWcRPbipKOg\n\t+ycKQ6RqvOxKiIRUZjbRksQEK9ZUklpSwjsjUlitrMwqijERkIY28l7HTHziHHdbpP\n\tg6xQBRNj2vNjdy80KnneAJwCmAzTxGGMNXfdSHvI="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"ooOEEOyx\"; dkim-atps=neutral","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<CAJAuwMmAeztvoZbRb_2YhHOB5UDbu=O8wCqJm7wPB6_n4oqihw@mail.gmail.com>","References":"<20220209071917.559993-1-hanlinchen@chromium.org>\n\t<CAEmqJPqoegFZBGiSSQq4bCb-KdsKsVjFnBLns1PUEZCh9xW_Ew@mail.gmail.com>\n\t<CAJAuwMmAeztvoZbRb_2YhHOB5UDbu=O8wCqJm7wPB6_n4oqihw@mail.gmail.com>","To":"Hanlin Chen <hanlinchen@chromium.org>,\n\tHanlin Chen via libcamera-devel <libcamera-devel@lists.libcamera.org>,\n\tNaushir Patuck <naush@raspberrypi.com>","Date":"Tue, 31 Jan 2023 11:34:51 +0000","Message-ID":"<167516489169.42371.9565210576217106613@Monstersaurus>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [PATCH 0/9] Introduce Pipeline configuration\n\tpreference for IPU3","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>","From":"Kieran Bingham via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]