[{"id":17034,"web_url":"https://patchwork.libcamera.org/comment/17034/","msgid":"<20210520025242.GE902042@pyrite.rasen.tech>","date":"2021-05-20T02:52:42","subject":"Re: [libcamera-devel] [PATCH v2 4/7] ipa: meson: Install mojom\n\tgenerated headers to include paths","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"On Wed, May 19, 2021 at 03:49:51PM +0530, Umang Jain wrote:\n> Generated IPA headers from mojom files need to be installed to\n> $INCLUDE_PATH in order to be available system-wide. Without this,\n> out-of-tree IPAs won't be able to link and build themselves.\n> \n> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>\n> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n\n> ---\n>  include/libcamera/ipa/meson.build | 8 +++++++-\n>  1 file changed, 7 insertions(+), 1 deletion(-)\n> \n> diff --git a/include/libcamera/ipa/meson.build b/include/libcamera/ipa/meson.build\n> index 40c4e737..eca4e9ee 100644\n> --- a/include/libcamera/ipa/meson.build\n> +++ b/include/libcamera/ipa/meson.build\n> @@ -1,5 +1,7 @@\n>  # SPDX-License-Identifier: CC0-1.0\n>  \n> +libcamera_ipa_include_dir = libcamera_include_dir / 'ipa'\n> +\n>  libcamera_ipa_headers = files([\n>      'ipa_controls.h',\n>      'ipa_interface.h',\n> @@ -7,7 +9,7 @@ libcamera_ipa_headers = files([\n>  ])\n>  \n>  install_headers(libcamera_ipa_headers,\n> -                subdir: libcamera_include_dir / 'ipa')\n> +                subdir: libcamera_ipa_include_dir)\n>  \n>  libcamera_generated_ipa_headers = []\n>  \n> @@ -31,6 +33,8 @@ libcamera_generated_ipa_headers += custom_target('core_ipa_interface_h',\n>                    input : ipa_mojom_core,\n>                    output : 'core_ipa_interface.h',\n>                    depends : mojom_templates,\n> +                  install : true,\n> +                  install_dir : get_option('includedir') / libcamera_ipa_include_dir,\n>                    command : [\n>                        mojom_generator, 'generate',\n>                        '-g', 'libcamera',\n> @@ -93,6 +97,8 @@ foreach file : ipa_mojom_files\n>                             input : mojom,\n>                             output : name + '_ipa_interface.h',\n>                             depends : mojom_templates,\n> +                           install : true,\n> +                           install_dir : get_option('includedir') / libcamera_ipa_include_dir,\n>                             command : [\n>                                 mojom_generator, 'generate',\n>                                 '-g', 'libcamera',\n> -- \n> 2.26.2\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 F2887C31FF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 20 May 2021 02:52:51 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id ADABB6891A;\n\tThu, 20 May 2021 04:52:51 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3725A6050F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 20 May 2021 04:52:50 +0200 (CEST)","from pyrite.rasen.tech (unknown\n\t[IPv6:2400:4051:61:600:2c71:1b79:d06d:5032])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id A8F468DF;\n\tThu, 20 May 2021 04:52:48 +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=\"pq7Uxnym\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1621479169;\n\tbh=l1L9ZAXN54QuIIkAUZyZn/gKTp8MLH51i9PbhNV7dqY=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=pq7UxnymYhYbbJKjJVwz2Q/DFuup/qA+lJAzpcyTlMbTJMXy68awmprO17roai7Xt\n\tRfv3JBTe93T8INjsZF9W4jcLvCMiCDBBiTzFAnSeDWPGMF8TKGF1Iy5wFIIZZ5AMMy\n\t6kHOJ+wmNuBgjYAzvGxT74br4pE8QOEQRDuAcq/o=","Date":"Thu, 20 May 2021 11:52:42 +0900","From":"paul.elder@ideasonboard.com","To":"Umang Jain <umang.jain@ideasonboard.com>","Message-ID":"<20210520025242.GE902042@pyrite.rasen.tech>","References":"<20210519101954.77711-1-umang.jain@ideasonboard.com>\n\t<20210519101954.77711-5-umang.jain@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20210519101954.77711-5-umang.jain@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v2 4/7] ipa: meson: Install mojom\n\tgenerated headers to include paths","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":17037,"web_url":"https://patchwork.libcamera.org/comment/17037/","msgid":"<20210520030243.GG902042@pyrite.rasen.tech>","date":"2021-05-20T03:02:43","subject":"Re: [libcamera-devel] [PATCH v2 6/7] meson: Add a configuration\n\toption to build IPAs","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"On Wed, May 19, 2021 at 03:49:53PM +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> \n> By default, all in-tree IPAs are built.\n> \n> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>\n\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n\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 46eb1b46..6626fa7e 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\n> -- \n> 2.26.2\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 A2281C31FB\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 20 May 2021 03:02:53 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1085668918;\n\tThu, 20 May 2021 05:02:53 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0CACB6050F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 20 May 2021 05:02:51 +0200 (CEST)","from pyrite.rasen.tech (unknown\n\t[IPv6:2400:4051:61:600:2c71:1b79:d06d:5032])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 8C7108DF;\n\tThu, 20 May 2021 05:02:49 +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=\"ScsUnmQc\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1621479770;\n\tbh=E75U5UFcXKMG2aqzripdH6yEg+8nDDgFGntJFi5U2wc=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=ScsUnmQcadEUrcA/g9sC9D7ACmObXzgCDyQgDl2PxZABKzufGwfT0E/08dGfPI8ON\n\tFxJvV3Z1eQvkvIxcxnDkf4g4JHg7D16J+RSppWErAeBaDb4MK9mA0DpQ1ZFGGdoRwm\n\t1+2kkvjieusitTWXGhBIhSikOBkpszDatgvtXZms=","Date":"Thu, 20 May 2021 12:02:43 +0900","From":"paul.elder@ideasonboard.com","To":"Umang Jain <umang.jain@ideasonboard.com>","Message-ID":"<20210520030243.GG902042@pyrite.rasen.tech>","References":"<20210519101954.77711-1-umang.jain@ideasonboard.com>\n\t<20210519101954.77711-7-umang.jain@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20210519101954.77711-7-umang.jain@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v2 6/7] 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":17060,"web_url":"https://patchwork.libcamera.org/comment/17060/","msgid":"<513b4021-e8ed-6865-7fe3-99388a1242b8@ideasonboard.com>","date":"2021-05-21T09:01:37","subject":"Re: [libcamera-devel] [PATCH v2 4/7] ipa: meson: Install mojom\n\tgenerated headers to include paths","submitter":{"id":75,"url":"https://patchwork.libcamera.org/api/people/75/","name":"Jean-Michel Hautbois","email":"jeanmichel.hautbois@ideasonboard.com"},"content":"Hi Umang,\n\nOn 20/05/2021 04:52, paul.elder@ideasonboard.com wrote:\n> On Wed, May 19, 2021 at 03:49:51PM +0530, Umang Jain wrote:\n>> Generated IPA headers from mojom files need to be installed to\n>> $INCLUDE_PATH in order to be available system-wide. Without this,\n>> out-of-tree IPAs won't be able to link and build themselves.\n>>\n>> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>\n>> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n>> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> \n> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>\nReviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\n> \n>> ---\n>>  include/libcamera/ipa/meson.build | 8 +++++++-\n>>  1 file changed, 7 insertions(+), 1 deletion(-)\n>>\n>> diff --git a/include/libcamera/ipa/meson.build b/include/libcamera/ipa/meson.build\n>> index 40c4e737..eca4e9ee 100644\n>> --- a/include/libcamera/ipa/meson.build\n>> +++ b/include/libcamera/ipa/meson.build\n>> @@ -1,5 +1,7 @@\n>>  # SPDX-License-Identifier: CC0-1.0\n>>  \n>> +libcamera_ipa_include_dir = libcamera_include_dir / 'ipa'\n>> +\n>>  libcamera_ipa_headers = files([\n>>      'ipa_controls.h',\n>>      'ipa_interface.h',\n>> @@ -7,7 +9,7 @@ libcamera_ipa_headers = files([\n>>  ])\n>>  \n>>  install_headers(libcamera_ipa_headers,\n>> -                subdir: libcamera_include_dir / 'ipa')\n>> +                subdir: libcamera_ipa_include_dir)\n>>  \n>>  libcamera_generated_ipa_headers = []\n>>  \n>> @@ -31,6 +33,8 @@ libcamera_generated_ipa_headers += custom_target('core_ipa_interface_h',\n>>                    input : ipa_mojom_core,\n>>                    output : 'core_ipa_interface.h',\n>>                    depends : mojom_templates,\n>> +                  install : true,\n>> +                  install_dir : get_option('includedir') / libcamera_ipa_include_dir,\n>>                    command : [\n>>                        mojom_generator, 'generate',\n>>                        '-g', 'libcamera',\n>> @@ -93,6 +97,8 @@ foreach file : ipa_mojom_files\n>>                             input : mojom,\n>>                             output : name + '_ipa_interface.h',\n>>                             depends : mojom_templates,\n>> +                           install : true,\n>> +                           install_dir : get_option('includedir') / libcamera_ipa_include_dir,\n>>                             command : [\n>>                                 mojom_generator, 'generate',\n>>                                 '-g', 'libcamera',\n>> -- \n>> 2.26.2\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 5B0BEC31FB\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 21 May 2021 09:01:39 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1A09D6891D;\n\tFri, 21 May 2021 11:01:39 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 94E9768918\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 21 May 2021 11:01:37 +0200 (CEST)","from [IPv6:2a01:e0a:169:7140:54a2:6f99:9b15:64bc] (unknown\n\t[IPv6:2a01:e0a:169:7140:54a2:6f99:9b15:64bc])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 4A7438D8;\n\tFri, 21 May 2021 11:01:37 +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=\"eQpweg1v\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1621587697;\n\tbh=d1cP+prcQ38AfOcXTFCNVAhr7+4Csym+yB8FqlVNg5A=;\n\th=Subject:To:Cc:References:From:Date:In-Reply-To:From;\n\tb=eQpweg1vDNEydN1rNUuZA9X2ARNMhV4oIzf+MMYLdp6PKc0We7r4Svpy1IIpHup8h\n\tDw8miDCofnezzTbfjs4SwBxOcJo6PveHSgNNi2epHiB0RDgbrslprEK7BNEhnYswuv\n\tzAjQdd0P4F1/gSNPq3D3buIGSIg5Vf9Qy0sJ9aW4=","To":"paul.elder@ideasonboard.com, Umang Jain <umang.jain@ideasonboard.com>","References":"<20210519101954.77711-1-umang.jain@ideasonboard.com>\n\t<20210519101954.77711-5-umang.jain@ideasonboard.com>\n\t<20210520025242.GE902042@pyrite.rasen.tech>","From":"Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>","Message-ID":"<513b4021-e8ed-6865-7fe3-99388a1242b8@ideasonboard.com>","Date":"Fri, 21 May 2021 11:01:37 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101\n\tThunderbird/78.8.1","MIME-Version":"1.0","In-Reply-To":"<20210520025242.GE902042@pyrite.rasen.tech>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH v2 4/7] ipa: meson: Install mojom\n\tgenerated headers to include paths","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":17062,"web_url":"https://patchwork.libcamera.org/comment/17062/","msgid":"<bf214549-141e-f1cc-33d7-b0b923bf7f9a@gmail.com>","date":"2021-05-21T09:02:40","subject":"Re: [libcamera-devel] [PATCH v2 6/7] meson: Add a configuration\n\toption to build IPAs","submitter":{"id":74,"url":"https://patchwork.libcamera.org/api/people/74/","name":"Jean-Michel Hautbois","email":"jeanmichel.hautbois@gmail.com"},"content":"Hi Umang,\n\nOn 20/05/2021 05:02, paul.elder@ideasonboard.com wrote:\n> On Wed, May 19, 2021 at 03:49:53PM +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>>\n>> By default, all in-tree IPAs are built.\n>>\n>> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>\n> \n> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>\nReviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>\n> \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 46eb1b46..6626fa7e 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\n>> -- \n>> 2.26.2\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 35D4DC31FF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 21 May 2021 09:02:43 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EC73C6891B;\n\tFri, 21 May 2021 11:02:42 +0200 (CEST)","from mail-wr1-x435.google.com (mail-wr1-x435.google.com\n\t[IPv6:2a00:1450:4864:20::435])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4441A68918\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 21 May 2021 11:02:42 +0200 (CEST)","by mail-wr1-x435.google.com with SMTP id d11so20251035wrw.8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 21 May 2021 02:02:42 -0700 (PDT)","from ?IPv6:2a01:e0a:169:7140:54a2:6f99:9b15:64bc?\n\t([2a01:e0a:169:7140:54a2:6f99:9b15:64bc])\n\tby smtp.gmail.com with ESMTPSA id\n\tq13sm1369081wrw.56.2021.05.21.02.02.40\n\t(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n\tFri, 21 May 2021 02:02:41 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"AJImWQYY\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=subject:to:cc:references:from:message-id:date:user-agent\n\t:mime-version:in-reply-to:content-language:content-transfer-encoding; \n\tbh=xSkW+TtEDPPJ0WicSSS47oP6qK72XI5MyQjOKDaChXs=;\n\tb=AJImWQYYgsoKIeb3X7OnhlCCUXF+H54m4flf+TcuLs8wwXLVD5WUzX+BDij1YnZzM6\n\t9OxQrtMBGPWAEf0ZgUH2dV/1E5Jjzsvcz3L1hpt5Poqci/50ZFUcvVHqKcZl9cXjajRr\n\tmXQlwf/S13FhwqLlXzsf74439xV1QMueAmsQnbzq0zAHN90u3lMXVM57Yo4WldEhnQon\n\tJWCkerE+LuZVjucdynKavcxHZK1yN7JaNTLk2I4g3Vqe4v8/E9YJTuNjUb12UF2S5kn6\n\tva1yLfFoSRyDCJb0EgBcjKr1Y6s5YRSsuFXR5TjkrJlvVoXUkLOssh08bcfeSK2qllF/\n\teuAA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:subject:to:cc:references:from:message-id:date\n\t:user-agent:mime-version:in-reply-to:content-language\n\t:content-transfer-encoding;\n\tbh=xSkW+TtEDPPJ0WicSSS47oP6qK72XI5MyQjOKDaChXs=;\n\tb=svGSRPWhSZuGB37BPCHaW07SIWX9Q0RskL1VUh6hgKoy6niWa0hV3piWF0SVX3Z5mw\n\tsXrvs2pgUfIwWAnjpp9/kje4lneZKH0gFhNWo0m71Mc9MLGoamwbEQcmuYFp+xAcKD48\n\tRL+QoPz5KAvTtWWal/Kg66MEw4dxdilWDtD9ltc6aAQg2ZmFbOmLCrJVl4nI0ny5ba86\n\tA1wAoNy85nm4xUcRSVf3hvfrRjQcDFYHIqSHOsjcLDL9mTcm/VaZAOssLrnVPVUn9D9A\n\tjSuwcwKtiaalAS6VRnoEGMYtxMFpeDc+8UibrA3G4K77l8IHE2rsujdu/cSYHbfspYqg\n\tijzQ==","X-Gm-Message-State":"AOAM531CflFrnWuvZVFxv4ZT8fpEzbQXpGI1tqnTl4kz2H0g9GDg/6gw\n\ttMCtMxmaXPN0Mg4gYDcmi7J87DX3oCi2Og==","X-Google-Smtp-Source":"ABdhPJxXuqEM58ymkMJ1idjk2oqSX3Q/vGsGMowl/gLDeHxgaUTMUsk9802uN4pjS/Od4GASRP1ykA==","X-Received":"by 2002:a5d:658f:: with SMTP id\n\tq15mr8268457wru.399.1621587761520; \n\tFri, 21 May 2021 02:02:41 -0700 (PDT)","To":"paul.elder@ideasonboard.com, Umang Jain <umang.jain@ideasonboard.com>","References":"<20210519101954.77711-1-umang.jain@ideasonboard.com>\n\t<20210519101954.77711-7-umang.jain@ideasonboard.com>\n\t<20210520030243.GG902042@pyrite.rasen.tech>","From":"Jean-Michel Hautbois <jeanmichel.hautbois@gmail.com>","Message-ID":"<bf214549-141e-f1cc-33d7-b0b923bf7f9a@gmail.com>","Date":"Fri, 21 May 2021 11:02:40 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101\n\tThunderbird/78.8.1","MIME-Version":"1.0","In-Reply-To":"<20210520030243.GG902042@pyrite.rasen.tech>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH v2 6/7] 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":17063,"web_url":"https://patchwork.libcamera.org/comment/17063/","msgid":"<f7316c47-be16-b283-889b-be1e446fd776@ideasonboard.com>","date":"2021-05-21T09:03:21","subject":"Re: [libcamera-devel] [PATCH v2 6/7] meson: Add a configuration\n\toption to build IPAs","submitter":{"id":75,"url":"https://patchwork.libcamera.org/api/people/75/","name":"Jean-Michel Hautbois","email":"jeanmichel.hautbois@ideasonboard.com"},"content":"Hi Umang,\n\nOn 20/05/2021 05:02, paul.elder@ideasonboard.com wrote:\n> On Wed, May 19, 2021 at 03:49:53PM +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>>\n>> By default, all in-tree IPAs are built.\n>>\n>> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>\n> \n> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n> \nReviewed-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 46eb1b46..6626fa7e 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\n>> -- \n>> 2.26.2\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 B6A7DC31FF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 21 May 2021 09:03:24 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 73CA96891C;\n\tFri, 21 May 2021 11:03: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 DBAAC68918\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 21 May 2021 11:03:22 +0200 (CEST)","from [IPv6:2a01:e0a:169:7140:54a2:6f99:9b15:64bc] (unknown\n\t[IPv6:2a01:e0a:169:7140:54a2:6f99:9b15:64bc])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 1097F8D8;\n\tFri, 21 May 2021 11:03: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=\"fPp6CaIW\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1621587802;\n\tbh=cgF2vBUmVDzCVTxkfTsNMttBEmB8bvgHlMYcLDaaXlg=;\n\th=Subject:To:Cc:References:From:Date:In-Reply-To:From;\n\tb=fPp6CaIWlBVnmO89FtwEVA5s4gTvr4ukSUBXhFOcZsBLJF58S9rASlBEgeaAFgNIt\n\to2GzXtKSSwh4ENvq9DVkezbPo15b7pjwzFBP5I16af/kJow26upWaPUmK+mKkd0D5Q\n\tm8Jt7K65Vau67i8RbWR4riq4vDQYN/MPrHQyebmA=","To":"paul.elder@ideasonboard.com, Umang Jain <umang.jain@ideasonboard.com>","References":"<20210519101954.77711-1-umang.jain@ideasonboard.com>\n\t<20210519101954.77711-7-umang.jain@ideasonboard.com>\n\t<20210520030243.GG902042@pyrite.rasen.tech>","From":"Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>","Message-ID":"<f7316c47-be16-b283-889b-be1e446fd776@ideasonboard.com>","Date":"Fri, 21 May 2021 11:03:21 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101\n\tThunderbird/78.8.1","MIME-Version":"1.0","In-Reply-To":"<20210520030243.GG902042@pyrite.rasen.tech>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH v2 6/7] 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":17077,"web_url":"https://patchwork.libcamera.org/comment/17077/","msgid":"<20210521094856.ymmnpuh3tpesajmm@uno.localdomain>","date":"2021-05-21T09:48:56","subject":"Re: [libcamera-devel] [PATCH v2 6/7] meson: Add a configuration\n\toption to build IPAs","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Umang,\n\nOn Wed, May 19, 2021 at 03:49:53PM +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>\n> By default, all in-tree IPAs are built.\n>\n> Signed-off-by: Umang Jain <umang.jain@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 46eb1b46..6626fa7e 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\nMmm, this new options means that by default all the IPAs are built,\neven if the pipeline handler is not built.\n\nThis requires a more precise control of the build options, as it's now\neasier to mis-align pipelines and IPAs.\n\nHave we considered the other way around ? Build by default the IPAs\nfor which a pipeline is built (like we do today) unless it is\nblacklisted ?\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\n> --\n> 2.26.2\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 A23DFC31FB\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 21 May 2021 09:48:12 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2BA4D6891B;\n\tFri, 21 May 2021 11:48:12 +0200 (CEST)","from relay12.mail.gandi.net (relay12.mail.gandi.net\n\t[217.70.178.232])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D063668918\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 21 May 2021 11:48:10 +0200 (CEST)","(Authenticated sender: jacopo@jmondi.org)\n\tby relay12.mail.gandi.net (Postfix) with ESMTPSA id 591D6200005;\n\tFri, 21 May 2021 09:48:09 +0000 (UTC)"],"Date":"Fri, 21 May 2021 11:48:56 +0200","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Umang Jain <umang.jain@ideasonboard.com>","Message-ID":"<20210521094856.ymmnpuh3tpesajmm@uno.localdomain>","References":"<20210519101954.77711-1-umang.jain@ideasonboard.com>\n\t<20210519101954.77711-7-umang.jain@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20210519101954.77711-7-umang.jain@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v2 6/7] 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":17081,"web_url":"https://patchwork.libcamera.org/comment/17081/","msgid":"<0a75f9ef-95ef-e9bb-b0cc-3c01443ecadf@ideasonboard.com>","date":"2021-05-21T10:29:28","subject":"Re: [libcamera-devel] [PATCH v2 6/7] meson: Add a configuration\n\toption to build IPAs","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi Jacopo,\n\nOn 21/05/2021 10:48, Jacopo Mondi wrote:\n> Hi Umang,\n> \n> On Wed, May 19, 2021 at 03:49:53PM +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>>\n>> By default, all in-tree IPAs are built.\n\n\"By default, all in-tree IPAs are built when a matching Pipeline handler\nis also enabled.\"\n\n\n>>\n>> Signed-off-by: Umang Jain <umang.jain@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 46eb1b46..6626fa7e 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> \n> Mmm, this new options means that by default all the IPAs are built,\n> even if the pipeline handler is not built.\n\nIt doesn't because of the implementation below.\n\n> This requires a more precise control of the build options, as it's now\n> easier to mis-align pipelines and IPAs.\n> \n> Have we considered the other way around ? Build by default the IPAs\n> for which a pipeline is built (like we do today) unless it is\n> blacklisted ?\n\n\nThat would be an 'enable' list for PipelineHandlers, and a 'disable'\nlist for IPA's. Would that be confusing?\n\n\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\nThis is filtering to only parse the enabled pipelines, so if the\npipeline is not enabled, the IPA will not be enabled.\n\nHowever that does lead to a tiny issue around what's reported in the\nSumary, as that will now print what the option contains, rather than\nwhat was actually enabled.\n\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\n>> --\n>> 2.26.2\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 69A07C3200\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 21 May 2021 10:29:34 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D68896891D;\n\tFri, 21 May 2021 12:29:33 +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 7A44C68911\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 21 May 2021 12:29:32 +0200 (CEST)","from [192.168.0.20]\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 AB7A28D8;\n\tFri, 21 May 2021 12:29:31 +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=\"RJpKXoq2\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1621592971;\n\tbh=/ISOuJc9nT0tbRXcaYNYd7pcmhERdGxEP3jgDjshPyM=;\n\th=Reply-To:To:Cc:References:From:Subject:Date:In-Reply-To:From;\n\tb=RJpKXoq26+LrJNk6KEsAJMAgbR264/7WC6NKKNItC8Pdzo08WhPtkkVPy8dx1hUHE\n\tZPri5sQ/Qqv88K7LNM+sENvE7w546JrsumUETSmMNTxc0UtBsqGGJfEG5zCLTVMl4D\n\tZoNwSQhdQMBrGm6POp6SuRXuOWZTO4//RWdlm1lM=","To":"Jacopo Mondi <jacopo@jmondi.org>,\n\tUmang Jain <umang.jain@ideasonboard.com>","References":"<20210519101954.77711-1-umang.jain@ideasonboard.com>\n\t<20210519101954.77711-7-umang.jain@ideasonboard.com>\n\t<20210521094856.ymmnpuh3tpesajmm@uno.localdomain>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Organization":"Ideas on Board","Message-ID":"<0a75f9ef-95ef-e9bb-b0cc-3c01443ecadf@ideasonboard.com>","Date":"Fri, 21 May 2021 11:29:28 +0100","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101\n\tThunderbird/78.8.1","MIME-Version":"1.0","In-Reply-To":"<20210521094856.ymmnpuh3tpesajmm@uno.localdomain>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-GB","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH v2 6/7] 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>","Reply-To":"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>"}},{"id":17090,"web_url":"https://patchwork.libcamera.org/comment/17090/","msgid":"<20210521113800.3inc36vmwxoyh4e6@uno.localdomain>","date":"2021-05-21T11:38:00","subject":"Re: [libcamera-devel] [PATCH v2 6/7] meson: Add a configuration\n\toption to build IPAs","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Kieran,\n\nOn Fri, May 21, 2021 at 11:29:28AM +0100, Kieran Bingham wrote:\n> Hi Jacopo,\n>\n> On 21/05/2021 10:48, Jacopo Mondi wrote:\n> > Hi Umang,\n> >\n> > On Wed, May 19, 2021 at 03:49:53PM +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> >>\n> >> By default, all in-tree IPAs are built.\n>\n> \"By default, all in-tree IPAs are built when a matching Pipeline handler\n> is also enabled.\"\n>\n>\n> >>\n> >> Signed-off-by: Umang Jain <umang.jain@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 46eb1b46..6626fa7e 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> >\n> > Mmm, this new options means that by default all the IPAs are built,\n> > even if the pipeline handler is not built.\n>\n> It doesn't because of the implementation below.\n>\n\nCorrect, sorry, I got fooled by the fact the values of a meson array option\ncorrespond to the available choices if not elsewhere specified. But\nyes, they get filtered below. My bad.\n\n> > This requires a more precise control of the build options, as it's now\n> > easier to mis-align pipelines and IPAs.\n> >\n> > Have we considered the other way around ? Build by default the IPAs\n> > for which a pipeline is built (like we do today) unless it is\n> > blacklisted ?\n>\n>\n> That would be an 'enable' list for PipelineHandlers, and a 'disable'\n> list for IPA's. Would that be confusing?\n\nNot sure. By default to run a pipeline that has an associated IPA\nmodule, the module needs to be built otherwise the pipeline won't\nwork, right ?\n\nLooking at\n\tipa_ = IPAManager::createIPA<ipa::ipu3::IPAProxyIPU3>(pipe_, 1, 1);\n\tif (!ipa_)\n\t\treturn -ENOENT;\n\nIf you wish to disable an IPA module you do so because you know what you're\ndoing and you want to run a different one, which I assume will anyway\nrequire some manual handling, if nothing else just for the correct\ndeploy paths setup.\n\nConsidering that, isn't it more natural to express \"please do not\nbuild the IPA as I'm running a different one\" instead of mix-matching\npipeline handlers and IPA modules ?\n\n>\n>\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>\n> This is filtering to only parse the enabled pipelines, so if the\n> pipeline is not enabled, the IPA will not be enabled.\n>\n> However that does lead to a tiny issue around what's reported in the\n> Sumary, as that will now print what the option contains, rather than\n> what was actually enabled.\n>\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\n> >> --\n> >> 2.26.2\n> >>\n>\n> --\n> Regards\n> --\n> Kieran","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 48B31C31FF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 21 May 2021 11:37:16 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0CA1D6891F;\n\tFri, 21 May 2021 13:37:16 +0200 (CEST)","from relay10.mail.gandi.net (relay10.mail.gandi.net\n\t[217.70.178.230])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4F80368911\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 21 May 2021 13:37:15 +0200 (CEST)","(Authenticated sender: jacopo@jmondi.org)\n\tby relay10.mail.gandi.net (Postfix) with ESMTPSA id A413424000A;\n\tFri, 21 May 2021 11:37:14 +0000 (UTC)"],"Date":"Fri, 21 May 2021 13:38:00 +0200","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<20210521113800.3inc36vmwxoyh4e6@uno.localdomain>","References":"<20210519101954.77711-1-umang.jain@ideasonboard.com>\n\t<20210519101954.77711-7-umang.jain@ideasonboard.com>\n\t<20210521094856.ymmnpuh3tpesajmm@uno.localdomain>\n\t<0a75f9ef-95ef-e9bb-b0cc-3c01443ecadf@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<0a75f9ef-95ef-e9bb-b0cc-3c01443ecadf@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v2 6/7] 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":17105,"web_url":"https://patchwork.libcamera.org/comment/17105/","msgid":"<7ca1f8eb-abb5-0c3c-e029-450237daf7db@ideasonboard.com>","date":"2021-05-21T14:46:27","subject":"Re: [libcamera-devel] [PATCH v2 6/7] meson: Add a configuration\n\toption to build IPAs","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi Jacopo,\n\nOn 21/05/2021 12:38, Jacopo Mondi wrote:\n> Hi Kieran,\n> \n> On Fri, May 21, 2021 at 11:29:28AM +0100, Kieran Bingham wrote:\n>> Hi Jacopo,\n>>\n>> On 21/05/2021 10:48, Jacopo Mondi wrote:\n>>> Hi Umang,\n>>>\n>>> On Wed, May 19, 2021 at 03:49:53PM +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>>>>\n>>>> By default, all in-tree IPAs are built.\n>>\n>> \"By default, all in-tree IPAs are built when a matching Pipeline handler\n>> is also enabled.\"\n>>\n>>\n>>>>\n>>>> Signed-off-by: Umang Jain <umang.jain@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 46eb1b46..6626fa7e 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>>>\n>>> Mmm, this new options means that by default all the IPAs are built,\n>>> even if the pipeline handler is not built.\n>>\n>> It doesn't because of the implementation below.\n>>\n> \n> Correct, sorry, I got fooled by the fact the values of a meson array option\n> correspond to the available choices if not elsewhere specified. But\n> yes, they get filtered below. My bad.\n> \n>>> This requires a more precise control of the build options, as it's now\n>>> easier to mis-align pipelines and IPAs.\n>>>\n>>> Have we considered the other way around ? Build by default the IPAs\n>>> for which a pipeline is built (like we do today) unless it is\n>>> blacklisted ?\n>>\n>>\n>> That would be an 'enable' list for PipelineHandlers, and a 'disable'\n>> list for IPA's. Would that be confusing?\n> \n> Not sure. By default to run a pipeline that has an associated IPA\n> module, the module needs to be built otherwise the pipeline won't\n> work, right ?\n\nAt least 'one' needs to be found for the pipeline to work yes.\n\n\n> Looking at\n> \tipa_ = IPAManager::createIPA<ipa::ipu3::IPAProxyIPU3>(pipe_, 1, 1);\n> \tif (!ipa_)\n> \t\treturn -ENOENT;\n> \n> If you wish to disable an IPA module you do so because you know what you're\n> doing and you want to run a different one, which I assume will anyway\n> require some manual handling, if nothing else just for the correct\n> deploy paths setup.\n> \n> Considering that, isn't it more natural to express \"please do not\n> build the IPA as I'm running a different one\" instead of mix-matching\n> pipeline handlers and IPA modules ?\n\nThis method makes it possible to disable all IPA's with -Dipas=''\nEnable all IPA's by not specifying at all, or something in between by\nspecifying exactly what is required.\n\n\nBut lets say for example purposes we want to use a closed source IPU3,\nbut an open RKISP1\n\nthat means the build line is:\n\n  # IPU3 IPA is built externally\n  -Dpipelines=\"ipu3,rkisp1\" -Dipas=\"rkisp1\"\n\n\nYour suggestion (which I'm not opposed to, either way is fine, as long\nas we have something) is:\n\n  # IPU3 IPA is built externally\n  -Dpipelines=\"ipu3,rkisp1\" -Dno-ipa=\"ipu3\"\n\nTo me, this actually reads better - but it doesn't allow for disabling\nall IPA modules.\n\nThat doesn't matter in the case of specifying pipelines, as you know\nwhich pipelines to disable, so the only use case would be if someone\nwanted to build all pipelines but no IPAs.\n\nI 'think' that would count as quite the corner case and not likely, as\nif someone doesn't want any IPA's they'd at least know what IPA's they\nare building themselves to replace the internal ones...\n\n\n\n\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>>\n>> This is filtering to only parse the enabled pipelines, so if the\n>> pipeline is not enabled, the IPA will not be enabled.\n>>\n>> However that does lead to a tiny issue around what's reported in the\n>> Sumary, as that will now print what the option contains, rather than\n>> what was actually enabled.\n>>\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\n>>>> --\n>>>> 2.26.2\n>>>>\n>>\n>> --\n>> Regards\n>> --\n>> Kieran","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 D9D5FC31FF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 21 May 2021 14:46:32 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1AD6A6891D;\n\tFri, 21 May 2021 16:46:32 +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 DBDAB68911\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 21 May 2021 16:46:30 +0200 (CEST)","from [192.168.0.20]\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 540F38D8;\n\tFri, 21 May 2021 16:46:30 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"fj9JUdA+\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1621608390;\n\tbh=1DCfjMUnsz+D+epiYezkP+8nK+NiShMGQ75c1ydY9+o=;\n\th=Reply-To:To:Cc:References:From:Subject:Date:In-Reply-To:From;\n\tb=fj9JUdA+OCPc57dzM5KsKt/4yDd07LHvUQVMiRPPIIQLL9a2e7WqLx2IQO3/x49pp\n\tHspibbZ4lTcKoFQqAahJtXtQKbuhYqcRS+5zEAdSnoQzrO251zKrdvXby1tsFl8gzz\n\tshWMqp4mCeJqCJSSJXE8ci1zVu6SgIBNRmxdHjUo=","To":"Jacopo Mondi <jacopo@jmondi.org>","References":"<20210519101954.77711-1-umang.jain@ideasonboard.com>\n\t<20210519101954.77711-7-umang.jain@ideasonboard.com>\n\t<20210521094856.ymmnpuh3tpesajmm@uno.localdomain>\n\t<0a75f9ef-95ef-e9bb-b0cc-3c01443ecadf@ideasonboard.com>\n\t<20210521113800.3inc36vmwxoyh4e6@uno.localdomain>","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Organization":"Ideas on Board","Message-ID":"<7ca1f8eb-abb5-0c3c-e029-450237daf7db@ideasonboard.com>","Date":"Fri, 21 May 2021 15:46:27 +0100","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101\n\tThunderbird/78.8.1","MIME-Version":"1.0","In-Reply-To":"<20210521113800.3inc36vmwxoyh4e6@uno.localdomain>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-GB","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH v2 6/7] 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>","Reply-To":"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>"}},{"id":17106,"web_url":"https://patchwork.libcamera.org/comment/17106/","msgid":"<20210521145734.ywuenqwmsevizj7d@uno.localdomain>","date":"2021-05-21T14:57:34","subject":"Re: [libcamera-devel] [PATCH v2 6/7] meson: Add a configuration\n\toption to build IPAs","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Kieran,\n\nOn Fri, May 21, 2021 at 03:46:27PM +0100, Kieran Bingham wrote:\n> Hi Jacopo,\n>\n> On 21/05/2021 12:38, Jacopo Mondi wrote:\n> > Hi Kieran,\n> >\n> > On Fri, May 21, 2021 at 11:29:28AM +0100, Kieran Bingham wrote:\n> >> Hi Jacopo,\n> >>\n> >> On 21/05/2021 10:48, Jacopo Mondi wrote:\n> >>> Hi Umang,\n> >>>\n> >>> On Wed, May 19, 2021 at 03:49:53PM +0530, Umang Jain wrote:\n> >>>> +option('ipas',\n> >>>> +        type : 'array',\n> >>>> +        choices : ['ipu3', 'raspberrypi', 'rkisp1', 'vimc'],\n> >>>> +        description : 'Select which IPA modules to build')\n> >>>> +\n> >>>\n> >>> Mmm, this new options means that by default all the IPAs are built,\n> >>> even if the pipeline handler is not built.\n> >>\n> >> It doesn't because of the implementation below.\n> >>\n> >\n> > Correct, sorry, I got fooled by the fact the values of a meson array option\n> > correspond to the available choices if not elsewhere specified. But\n> > yes, they get filtered below. My bad.\n> >\n> >>> This requires a more precise control of the build options, as it's now\n> >>> easier to mis-align pipelines and IPAs.\n> >>>\n> >>> Have we considered the other way around ? Build by default the IPAs\n> >>> for which a pipeline is built (like we do today) unless it is\n> >>> blacklisted ?\n> >>\n> >>\n> >> That would be an 'enable' list for PipelineHandlers, and a 'disable'\n> >> list for IPA's. Would that be confusing?\n> >\n> > Not sure. By default to run a pipeline that has an associated IPA\n> > module, the module needs to be built otherwise the pipeline won't\n> > work, right ?\n>\n> At least 'one' needs to be found for the pipeline to work yes.\n>\n>\n> > Looking at\n> > \tipa_ = IPAManager::createIPA<ipa::ipu3::IPAProxyIPU3>(pipe_, 1, 1);\n> > \tif (!ipa_)\n> > \t\treturn -ENOENT;\n> >\n> > If you wish to disable an IPA module you do so because you know what you're\n> > doing and you want to run a different one, which I assume will anyway\n> > require some manual handling, if nothing else just for the correct\n> > deploy paths setup.\n> >\n> > Considering that, isn't it more natural to express \"please do not\n> > build the IPA as I'm running a different one\" instead of mix-matching\n> > pipeline handlers and IPA modules ?\n>\n> This method makes it possible to disable all IPA's with -Dipas=''\n> Enable all IPA's by not specifying at all, or something in between by\n> specifying exactly what is required.\n>\n>\n> But lets say for example purposes we want to use a closed source IPU3,\n> but an open RKISP1\n>\n> that means the build line is:\n>\n>   # IPU3 IPA is built externally\n>   -Dpipelines=\"ipu3,rkisp1\" -Dipas=\"rkisp1\"\n>\n>\n> Your suggestion (which I'm not opposed to, either way is fine, as long\n> as we have something) is:\n>\n>   # IPU3 IPA is built externally\n>   -Dpipelines=\"ipu3,rkisp1\" -Dno-ipa=\"ipu3\"\n>\n> To me, this actually reads better - but it doesn't allow for disabling\n> all IPA modules.\n>\n> That doesn't matter in the case of specifying pipelines, as you know\n> which pipelines to disable, so the only use case would be if someone\n> wanted to build all pipelines but no IPAs.\n>\n> I 'think' that would count as quite the corner case and not likely, as\n> if someone doesn't want any IPA's they'd at least know what IPA's they\n> are building themselves to replace the internal ones...\n\nThanks for the example.\n\nI won't push in one direction or another, as long as the\ncounter-example is clear as it is now, I'm fine letting the ones who\nare working on this decide how to move forward.\n\nLet me just add one point: if I'm very new to libcamera and I see\noptions to specify which IPAs have to be built I can assume they do\nnot get build by default. If I see a \"no-ipas\" it's easier to\nrecoginze disabling an IPA is the 'unlikely' choice and I would simply\nignore the option.\n\nThanks\n  j\n\n>\n>\n>\n>\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> >>\n> >> This is filtering to only parse the enabled pipelines, so if the\n> >> pipeline is not enabled, the IPA will not be enabled.\n> >>\n> >> However that does lead to a tiny issue around what's reported in the\n> >> Sumary, as that will now print what the option contains, rather than\n> >> what was actually enabled.\n> >>\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\n> >>>> --\n> >>>> 2.26.2\n> >>>>\n> >>\n> >> --\n> >> Regards\n> >> --\n> >> Kieran\n>\n> --\n> Regards\n> --\n> Kieran","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 38C5EC31FF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 21 May 2021 14:56:51 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9AC5B6891D;\n\tFri, 21 May 2021 16:56:50 +0200 (CEST)","from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net\n\t[217.70.183.196])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0661768911\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 21 May 2021 16:56:50 +0200 (CEST)","(Authenticated sender: jacopo@jmondi.org)\n\tby relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 4A066E000C;\n\tFri, 21 May 2021 14:56:49 +0000 (UTC)"],"Date":"Fri, 21 May 2021 16:57:34 +0200","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<20210521145734.ywuenqwmsevizj7d@uno.localdomain>","References":"<20210519101954.77711-1-umang.jain@ideasonboard.com>\n\t<20210519101954.77711-7-umang.jain@ideasonboard.com>\n\t<20210521094856.ymmnpuh3tpesajmm@uno.localdomain>\n\t<0a75f9ef-95ef-e9bb-b0cc-3c01443ecadf@ideasonboard.com>\n\t<20210521113800.3inc36vmwxoyh4e6@uno.localdomain>\n\t<7ca1f8eb-abb5-0c3c-e029-450237daf7db@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<7ca1f8eb-abb5-0c3c-e029-450237daf7db@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH v2 6/7] 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>"}}]