[{"id":17152,"web_url":"https://patchwork.libcamera.org/comment/17152/","msgid":"<YKr7S/TIQDv7mfnq@pendragon.ideasonboard.com>","date":"2021-05-24T01:03:07","subject":"Re: [libcamera-devel] [PATCH v3 6/6] meson: Add a configuration\n\toption to build IPAs","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Umang,\n\nThank you for the patch.\n\nOn Fri, May 21, 2021 at 06:58:23PM +0530, Umang Jain wrote:\n> There can be multiple IPAs per pipeline-handler or platform.\n> They can live in-tree or externally linked. To support the externally\n> linked IPA use-case, provide a mechanism to choose whether or not\n> to build the IPAs in tree, with the help of a meson configuration\n> option.\n\nWe can still build an out-of-tree IPA module if the in-tree module is\nbuilt. I don't dispute the fact that it's useful to select which in-tree\nIPA modules to build, but maybe a more accurate explanation could be\nuseful in the commit message ?\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> By default, all in-tree IPAs are built when a matching Pipeline handler\n> is also enabled.\n> \n> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>\n> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n> Reviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\n> ---\n>  meson.build         | 1 +\n>  meson_options.txt   | 5 +++++\n>  src/ipa/meson.build | 5 +++--\n>  3 files changed, 9 insertions(+), 2 deletions(-)\n> \n> diff --git a/meson.build b/meson.build\n> index fa2a62cf..35c80c6a 100644\n> --- a/meson.build\n> +++ b/meson.build\n> @@ -167,6 +167,7 @@ py_mod.find_installation('python3', modules: py_modules)\n>  ## Summarise Configurations\n>  summary({\n>              'Enabled pipelines': pipelines,\n> +            'Enabled IPA modules': ipa_modules,\n>              'Android support': android_enabled,\n>              'GStreamer support': gst_enabled,\n>              'V4L2 emulation support': v4l2_enabled,\n> diff --git a/meson_options.txt b/meson_options.txt\n> index 69f11f85..2c80ad8b 100644\n> --- a/meson_options.txt\n> +++ b/meson_options.txt\n> @@ -25,6 +25,11 @@ option('gstreamer',\n>          value : 'auto',\n>          description : 'Compile libcamera GStreamer plugin')\n>  \n> +option('ipas',\n> +        type : 'array',\n> +        choices : ['ipu3', 'raspberrypi', 'rkisp1', 'vimc'],\n> +        description : 'Select which IPA modules to build')\n> +\n>  option('lc-compliance',\n>          type : 'feature',\n>          value : 'auto',\n> diff --git a/src/ipa/meson.build b/src/ipa/meson.build\n> index 5b5684a1..49245e5e 100644\n> --- a/src/ipa/meson.build\n> +++ b/src/ipa/meson.build\n> @@ -19,14 +19,15 @@ subdir('libipa')\n>  \n>  ipa_sign = files('ipa-sign.sh')\n>  \n> -ipas = ['ipu3', 'raspberrypi', 'rkisp1', 'vimc']\n>  ipa_names = []\n>  \n> +ipa_modules = get_option('ipas')\n> +\n>  # The ipa-sign-install.sh script which uses the ipa_names variable will itself\n>  # prepend MESON_INSTALL_DESTDIR_PREFIX to each ipa module name, therefore we\n>  # must not include the prefix string here.\n>  foreach pipeline : pipelines\n> -    if ipas.contains(pipeline)\n> +    if ipa_modules.contains(pipeline)\n>          subdir(pipeline)\n>          ipa_names += ipa_install_dir / ipa_name + '.so'\n>      endif","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 E81C6C3201\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 24 May 2021 01:03:12 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 508F66891E;\n\tMon, 24 May 2021 03:03:12 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id CFCF16050F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 24 May 2021 03:03:10 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 279D4476;\n\tMon, 24 May 2021 03:03:10 +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=\"s5O1dj4a\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1621818190;\n\tbh=rXCCZ2iRGUkhIiMz+iDbOwfj0Fq4Uxit6m8U4L16/iI=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=s5O1dj4a+hGqsYR104Wnn+CcBUvyVN3aPsVmovTbMOA4Gm8M1Vz0y3PdBpVU9328P\n\t0KQSDXyLL+QXDwNkbS7NTrXp0IY2Wx7zokDRCzNQgYwzQ7KG69CZRF7wzoFuX6XrQJ\n\tEl11lBj5xdTwFHnsF+8N3mUgDGiw7CX/ANqIH70s=","Date":"Mon, 24 May 2021 04:03:07 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Umang Jain <umang.jain@ideasonboard.com>","Message-ID":"<YKr7S/TIQDv7mfnq@pendragon.ideasonboard.com>","References":"<20210521132823.322076-1-umang.jain@ideasonboard.com>\n\t<20210521132823.322076-7-umang.jain@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20210521132823.322076-7-umang.jain@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v3 6/6] meson: Add a configuration\n\toption to build IPAs","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>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17153,"web_url":"https://patchwork.libcamera.org/comment/17153/","msgid":"<YKr7kyAGE4FxJhKD@pendragon.ideasonboard.com>","date":"2021-05-24T01:04:19","subject":"Re: [libcamera-devel] [PATCH v3 0/6] External IPU3 IPA Support","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Umang,\n\nThank you for the series.\n\nYou're nearly there, I've only had minor comments. The corresponding\nchanges are however a bit too large for me to be comfortable with fixing\nthem when applying, so I'm afraid a v4 is needed. I'm quite sure it will\nbe the last one.\n\nOn Fri, May 21, 2021 at 06:58:17PM +0530, Umang Jain wrote:\n> Changes in v3:\n> - Drop 7/7 patch - decided to be done on top\n> - Add a \\todo about documenting IPA interfaces in [1/7]\n> - Few style cleanups\n> \n> Changes in v2:\n> - IPA Docs rework patch split (into 3)\n> - Don't try to make a different 'internal' helper library\n>   - Drop relevant patch\n>   - Under discussion for now AND out of scope for this series.\n> - Drop IPAConfigInfo documentation\n>   - Needs to happen during a follow up \"doc\" patch for entire ipu3.mojom\n>     adapted same as [PATCH 2/7]\n> \n> Umang Jain (6):\n>   ipa: Move core IPA interface documentation to a .cpp file\n>   ipa: mojom: Move CameraSensorInfo struct exclusively to IPA IPC\n>   ipa: ipc: Rename CameraSensorInfo to IPACameraSensorInfo\n>   ipa: meson: Install mojom generated headers to include paths\n>   ipa: ipu3: Introduce IPAConfigInfo in IPC\n>   meson: Add a configuration option to build IPAs\n> \n>  Documentation/Doxyfile.in                     |   8 +-\n>  Documentation/guides/ipa.rst                  |   8 +-\n>  Documentation/meson.build                     |   1 +\n>  include/libcamera/internal/camera_sensor.h    |  19 +-\n>  include/libcamera/ipa/core.mojom              |  74 +-----\n>  include/libcamera/ipa/ipa_interface.h         |   2 -\n>  include/libcamera/ipa/ipu3.mojom              |  15 +-\n>  include/libcamera/ipa/meson.build             |   8 +-\n>  include/libcamera/ipa/raspberrypi.mojom       |   7 +-\n>  include/libcamera/ipa/rkisp1.mojom            |   7 +-\n>  include/libcamera/ipa/vimc.mojom              |   5 +\n>  meson.build                                   |   1 +\n>  meson_options.txt                             |   5 +\n>  src/ipa/ipu3/ipu3.cpp                         |  14 +-\n>  src/ipa/ipu3/ipu3_agc.cpp                     |   2 +-\n>  src/ipa/meson.build                           |   5 +-\n>  src/ipa/raspberrypi/raspberrypi.cpp           |   9 +-\n>  src/ipa/rkisp1/rkisp1.cpp                     |   6 +-\n>  src/libcamera/camera_sensor.cpp               | 117 +--------\n>  src/libcamera/ipa/core_ipa_interface.cpp      | 237 ++++++++++++++++++\n>  src/libcamera/ipa/meson.build                 |   5 +\n>  src/libcamera/meson.build                     |   1 +\n>  src/libcamera/pipeline/ipu3/ipu3.cpp          |  14 +-\n>  .../pipeline/raspberrypi/raspberrypi.cpp      |   4 +-\n>  src/libcamera/pipeline/rkisp1/rkisp1.cpp      |   2 +-\n>  25 files changed, 332 insertions(+), 244 deletions(-)\n>  create mode 100644 src/libcamera/ipa/core_ipa_interface.cpp\n>  create mode 100644 src/libcamera/ipa/meson.build\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 5E0DBC3201\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 24 May 2021 01:04:24 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 23ACE6891B;\n\tMon, 24 May 2021 03:04:24 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E4E296050F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 24 May 2021 03:04:22 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 89BDB476;\n\tMon, 24 May 2021 03:04: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=\"LqT5FEO6\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1621818262;\n\tbh=MIEWnCpMYuFj42H+IerYW903Jcnw3mvCv51wbPyV1Ik=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=LqT5FEO63Du5Cj8Qg+BAWHSSHJ1SX8stqd7Ts7XEkOfA4KGqwy8Qb0tnRyPs8BJnj\n\tiFUtgYK56x7VJgSNG8posdhd8V7ANRPhf5PJWlDFI1cNfFl44UvPQu7ftxsng0UhrK\n\tg5O7SI7Vms/uNI47C+GGpXahwfihSJ6QbHOaI2rc=","Date":"Mon, 24 May 2021 04:04:19 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Umang Jain <umang.jain@ideasonboard.com>","Message-ID":"<YKr7kyAGE4FxJhKD@pendragon.ideasonboard.com>","References":"<20210521132823.322076-1-umang.jain@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20210521132823.322076-1-umang.jain@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v3 0/6] External IPU3 IPA Support","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>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]