[{"id":26358,"web_url":"https://patchwork.libcamera.org/comment/26358/","msgid":"<Y9IJ/K+27Np4H8Rf@pyrite.rasen.tech>","date":"2023-01-26T05:05:00","subject":"Re: [libcamera-devel] [PATCH] meson: Rework automatic pipeline\n\tselection","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"On Thu, Jan 12, 2023 at 11:07:56AM +0000, Kieran Bingham via libcamera-devel wrote:\n> The supported pipelines are listed in three places: the\n> meson_options.txt file, the defined array when a user selects\n> -Dpipelines=\"all\", and arrays defined when the default\n> -Dpipelines=\"auto\" is selected.\n> \n> This can be hard to maintain and error prone.\n> \n> Rework the definition of pipeline selection to a single table within the\n> meson.build to reduce duplication within this file. The new table\n> specifies the architecture(s) that the pipeline handler supports and\n> is iterated to handle the special cases for 'all', 'auto' and 'test'.\n> \n> The current behaviour such that 'all' takes precedence over 'auto' is\n> maintained, and 'test' is now extended such that additional test\n> pipeline handlers can easily be introduced.\n> \n> The existing implementation defines the i.MX8-ISI and RKISP1 pipeline\n> handlers as only supported by 'aarch64'. This conversion changes the\n> behaviour such that those pipeline handlers are now supported on both\n> 'arm' and 'aarch64' as each of those platforms could support a 32-bit\n> ARM build.\n> \n> Suggested-by: Javier Martinez Canillas <javierm@redhat.com>\n> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>\n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n\n> ---\n>  meson.build | 54 +++++++++++++++++++++++++++++------------------------\n>  1 file changed, 30 insertions(+), 24 deletions(-)\n> \n> diff --git a/meson.build b/meson.build\n> index e86673dd5c0c..c35376e1e97b 100644\n> --- a/meson.build\n> +++ b/meson.build\n> @@ -164,38 +164,44 @@ liblttng = dependency('lttng-ust', required : get_option('tracing'))\n>  # are enabled.\n>  pipelines = get_option('pipelines')\n>  \n> +arch_arm = ['arm', 'aarch64']\n> +arch_x86 = ['x86', 'x86_64']\n> +pipes_support = {\n> +  'imx8-isi':     arch_arm,\n> +  'ipu3':         arch_x86,\n> +  'raspberrypi':  arch_arm,\n> +  'rkisp1':       arch_arm,\n> +  'simple':       arch_arm,\n> +  'uvcvideo':     ['any'],\n> +  'vimc':         ['test'],\n> +}\n> +\n>  if pipelines.contains('all')\n> -    pipelines = [\n> -        'imx8-isi',\n> -        'ipu3',\n> -        'raspberrypi',\n> -        'rkisp1',\n> -        'simple',\n> -        'uvcvideo',\n> -        'vimc',\n> -    ]\n> +    pipelines = []\n> +    foreach pipe, archs : pipes_support\n> +        pipelines += pipe\n> +    endforeach\n>  endif\n>  \n>  if pipelines.contains('auto')\n>      host_cpu = host_machine.cpu_family()\n>      pipelines = []\n> -    if host_cpu == 'x86' or host_cpu == 'x86_64'\n> -        pipelines += ['ipu3']\n> -    elif host_cpu == 'aarch64'\n> -        pipelines += ['imx8-isi', 'rkisp1']\n> -    endif\n> -\n> -    if host_cpu == 'arm' or host_cpu == 'aarch64'\n> -        pipelines += ['raspberrypi', 'simple']\n> -    endif\n> -\n> -    # Always include the uvcvideo pipeline handler.\n> -    pipelines += ['uvcvideo']\n> +    foreach pipe, archs : pipes_support\n> +        if host_cpu in archs or 'any' in archs\n> +            message('Auto-enabling ' + pipe + ' pipeline handler')\n> +            pipelines += pipe\n> +        endif\n> +    endforeach\n>  endif\n>  \n> -if get_option('test') and 'vimc' not in pipelines\n> -    message('Enabling vimc pipeline handler to support tests')\n> -    pipelines += ['vimc']\n> +if get_option('test')\n> +    foreach pipe, archs : pipes_support\n> +        if 'test' in archs and pipe not in pipelines\n> +            message('Enabling ' + pipe + ' pipeline handler for tests')\n> +            pipelines += pipe\n> +        endif\n> +    endforeach\n>  endif\n>  \n>  # Utilities are parsed first to provide support for other components.\n> -- \n> 2.34.1\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 56B43BEFBE\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 26 Jan 2023 05:05:11 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 76592625E4;\n\tThu, 26 Jan 2023 06:05:10 +0100 (CET)","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 6B4D261506\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 26 Jan 2023 06:05:08 +0100 (CET)","from pyrite.rasen.tech (h175-177-042-159.catv02.itscom.jp\n\t[175.177.42.159])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id DF1B6975;\n\tThu, 26 Jan 2023 06:05:06 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1674709510;\n\tbh=GXQXkuvtCuH+7NQekaO/uQ3oKhuXyKaf0+l3VbTuAjA=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=BOKWVUM2SSwQb9XARpyXgy3MqWbltg2l6WB69dmjrE6v5O77iwgcWVdjtko9FQmCs\n\tnt16glUrV9WTElY8uBel54VfLCJuGGtg4L6fKNP5Q9XwS/CfThPt0TpOlnORhVvEqi\n\tkH1JZ4hnzRFC7wSepw3h15PMDlcv5ylC9sHk0LdqqTTllJhk+wT7F7Q6Pp19OqVK7U\n\t4CYXMycsCy1Z1b+yLBSsntvGxIVWkq5xZP1BSMWPmb8fLjrlaKx6pcJ67phpKmOQad\n\tdSw+L2NT4EsUmE7ErLPkL3sKJSr+zoz2koRIeViDXDucHv5+BCWiLPwwDN5aIq/oNU\n\tjQJklDOeAksAw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1674709508;\n\tbh=GXQXkuvtCuH+7NQekaO/uQ3oKhuXyKaf0+l3VbTuAjA=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=C0SoXDw9MacnDnm0YQJFW1T2ae7obFMu5B7eBqlIpSuQtLFvj6MDlWGcR7pc/QRn1\n\txUX0qxTQtbSPMIW54yzhB5DFSQSUZzCk0YFL7cc2hg6gjdXvK1N282+5+hiciXacjj\n\tXVjblo9djHjyH5Ir5aBNpMK7UgYjQNDLCVD4Nhds="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"C0SoXDw9\"; dkim-atps=neutral","Date":"Thu, 26 Jan 2023 14:05:00 +0900","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<Y9IJ/K+27Np4H8Rf@pyrite.rasen.tech>","References":"<20230112110756.1944607-1-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20230112110756.1944607-1-kieran.bingham@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH] meson: Rework automatic pipeline\n\tselection","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":"Paul Elder via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Paul Elder <paul.elder@ideasonboard.com>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":26359,"web_url":"https://patchwork.libcamera.org/comment/26359/","msgid":"<Y9JgQWSKpjDYNpAt@pendragon.ideasonboard.com>","date":"2023-01-26T11:13:05","subject":"Re: [libcamera-devel] [PATCH] meson: Rework automatic pipeline\n\tselection","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Kieran,\n\nThank you for the patch.\n\nOn Thu, Jan 12, 2023 at 11:07:56AM +0000, Kieran Bingham via libcamera-devel wrote:\n> The supported pipelines are listed in three places: the\n> meson_options.txt file, the defined array when a user selects\n> -Dpipelines=\"all\", and arrays defined when the default\n> -Dpipelines=\"auto\" is selected.\n> \n> This can be hard to maintain and error prone.\n> \n> Rework the definition of pipeline selection to a single table within the\n> meson.build to reduce duplication within this file. The new table\n> specifies the architecture(s) that the pipeline handler supports and\n> is iterated to handle the special cases for 'all', 'auto' and 'test'.\n> \n> The current behaviour such that 'all' takes precedence over 'auto' is\n> maintained, and 'test' is now extended such that additional test\n> pipeline handlers can easily be introduced.\n> \n> The existing implementation defines the i.MX8-ISI and RKISP1 pipeline\n> handlers as only supported by 'aarch64'. This conversion changes the\n> behaviour such that those pipeline handlers are now supported on both\n> 'arm' and 'aarch64' as each of those platforms could support a 32-bit\n> ARM build.\n> \n> Suggested-by: Javier Martinez Canillas <javierm@redhat.com>\n> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>\n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> ---\n>  meson.build | 54 +++++++++++++++++++++++++++++------------------------\n>  1 file changed, 30 insertions(+), 24 deletions(-)\n> \n> diff --git a/meson.build b/meson.build\n> index e86673dd5c0c..c35376e1e97b 100644\n> --- a/meson.build\n> +++ b/meson.build\n> @@ -164,38 +164,44 @@ liblttng = dependency('lttng-ust', required : get_option('tracing'))\n>  # are enabled.\n>  pipelines = get_option('pipelines')\n>  \n> +arch_arm = ['arm', 'aarch64']\n> +arch_x86 = ['x86', 'x86_64']\n> +pipes_support = {\n\npipelines_support to match the pipelines option ?\n\n> +  'imx8-isi':     arch_arm,\n> +  'ipu3':         arch_x86,\n> +  'raspberrypi':  arch_arm,\n> +  'rkisp1':       arch_arm,\n> +  'simple':       arch_arm,\n> +  'uvcvideo':     ['any'],\n> +  'vimc':         ['test'],\n\n4 spaces for indentation please.\n\n> +}\n> +\n>  if pipelines.contains('all')\n> -    pipelines = [\n> -        'imx8-isi',\n> -        'ipu3',\n> -        'raspberrypi',\n> -        'rkisp1',\n> -        'simple',\n> -        'uvcvideo',\n> -        'vimc',\n> -    ]\n> +    pipelines = []\n> +    foreach pipe, archs : pipes_support\n\nSame here, s/pipe/pipeline/ ?\n\n> +        pipelines += pipe\n> +    endforeach\n\nI think this could be simplified to\n\n    pipelines = pipes_support.keys()\n\n>  endif\n>  \n>  if pipelines.contains('auto')\n\nelif ? The above case has added all pipeline handlers already. It will\nalso making it clearer that 'all' takes precedence over 'auto'.\n\n>      host_cpu = host_machine.cpu_family()\n>      pipelines = []\n> -    if host_cpu == 'x86' or host_cpu == 'x86_64'\n> -        pipelines += ['ipu3']\n> -    elif host_cpu == 'aarch64'\n> -        pipelines += ['imx8-isi', 'rkisp1']\n> -    endif\n> -\n> -    if host_cpu == 'arm' or host_cpu == 'aarch64'\n> -        pipelines += ['raspberrypi', 'simple']\n> -    endif\n> -\n> -    # Always include the uvcvideo pipeline handler.\n> -    pipelines += ['uvcvideo']\n> +    foreach pipe, archs : pipes_support\n> +        if host_cpu in archs or 'any' in archs\n> +            message('Auto-enabling ' + pipe + ' pipeline handler')\n\nDo we need a message ? The selected pipeline handlers are printed in the\nsummary, I'm not sure this message adds much value.\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> +            pipelines += pipe\n> +        endif\n> +    endforeach\n>  endif\n>  \n> -if get_option('test') and 'vimc' not in pipelines\n> -    message('Enabling vimc pipeline handler to support tests')\n> -    pipelines += ['vimc']\n> +if get_option('test')\n> +    foreach pipe, archs : pipes_support\n> +        if 'test' in archs and pipe not in pipelines\n> +            message('Enabling ' + pipe + ' pipeline handler for tests')\n> +            pipelines += pipe\n> +        endif\n> +    endforeach\n>  endif\n>  \n>  # Utilities are parsed first to provide support for other components.","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 8B3A4BDC71\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 26 Jan 2023 11:13:12 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BAD8F625E4;\n\tThu, 26 Jan 2023 12:13:11 +0100 (CET)","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 2AC9B61EFB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 26 Jan 2023 12:13:10 +0100 (CET)","from pendragon.ideasonboard.com (213-243-189-158.bb.dnainternet.fi\n\t[213.243.189.158])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 7759B2B3;\n\tThu, 26 Jan 2023 12:13:09 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1674731591;\n\tbh=UmIE0UU4JQiyQNQZzsOOrC/oYNXCwjToDTZB7M3Mh4Q=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=Q6Z4Ob40rj7VPbxUwpe+ZrFnO17ppUvqD7Xmox5sQmPpzHE0YGNJgS9eAMKtjhUOP\n\toBRHnh9Zvb8gnOTwb30VoXScSu7gHLM088tBtRAABuK19Di3XYZ7yE0K4P/71SkBzB\n\tDM0QXUCtrz84OQqfoCKdVgDngGclMti2/kSQy+cKTUAVTuVGIuDyoIx/qa2CKtQ8uv\n\tne615rSZbFSEkdUStgGc026DSusuA4RWo0MkEgpj+MHvvrCmy97kndIXx4hcxxJ3Af\n\tdRqbOuzohujfNEwAHDaFfoCQa9HSPMhFVwBBV/+wD02D3IyZHLy/5mesjAu7XamwGI\n\t7sNM34fUWbc/w==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1674731589;\n\tbh=UmIE0UU4JQiyQNQZzsOOrC/oYNXCwjToDTZB7M3Mh4Q=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=aTxbf7hSQgtru79Utjc73nRwezGNqAm5S6+P1pnuGPqyI7gh1wIZVhsecjQUweJSh\n\t9Vt/LTb9OryoK5GDTvlbzBcq8DIZ5H3wxf4PjMymJyDgV3w3WguIKOeFA7JUwuZ969\n\tUL/EhlwKdHuzkUaQVpgvZsf8JqdQ9FxYgIbZLrzM="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"aTxbf7hS\"; dkim-atps=neutral","Date":"Thu, 26 Jan 2023 13:13:05 +0200","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<Y9JgQWSKpjDYNpAt@pendragon.ideasonboard.com>","References":"<20230112110756.1944607-1-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20230112110756.1944607-1-kieran.bingham@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH] meson: Rework automatic pipeline\n\tselection","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":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":26360,"web_url":"https://patchwork.libcamera.org/comment/26360/","msgid":"<167473356736.42371.1933601851040870450@Monstersaurus>","date":"2023-01-26T11:46:07","subject":"Re: [libcamera-devel] [PATCH] meson: Rework automatic pipeline\n\tselection","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Laurent Pinchart (2023-01-26 11:13:05)\n> Hi Kieran,\n> \n> Thank you for the patch.\n> \n> On Thu, Jan 12, 2023 at 11:07:56AM +0000, Kieran Bingham via libcamera-devel wrote:\n> > The supported pipelines are listed in three places: the\n> > meson_options.txt file, the defined array when a user selects\n> > -Dpipelines=\"all\", and arrays defined when the default\n> > -Dpipelines=\"auto\" is selected.\n> > \n> > This can be hard to maintain and error prone.\n> > \n> > Rework the definition of pipeline selection to a single table within the\n> > meson.build to reduce duplication within this file. The new table\n> > specifies the architecture(s) that the pipeline handler supports and\n> > is iterated to handle the special cases for 'all', 'auto' and 'test'.\n> > \n> > The current behaviour such that 'all' takes precedence over 'auto' is\n> > maintained, and 'test' is now extended such that additional test\n> > pipeline handlers can easily be introduced.\n> > \n> > The existing implementation defines the i.MX8-ISI and RKISP1 pipeline\n> > handlers as only supported by 'aarch64'. This conversion changes the\n> > behaviour such that those pipeline handlers are now supported on both\n> > 'arm' and 'aarch64' as each of those platforms could support a 32-bit\n> > ARM build.\n> > \n> > Suggested-by: Javier Martinez Canillas <javierm@redhat.com>\n> > Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>\n> > Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> > ---\n> >  meson.build | 54 +++++++++++++++++++++++++++++------------------------\n> >  1 file changed, 30 insertions(+), 24 deletions(-)\n> > \n> > diff --git a/meson.build b/meson.build\n> > index e86673dd5c0c..c35376e1e97b 100644\n> > --- a/meson.build\n> > +++ b/meson.build\n> > @@ -164,38 +164,44 @@ liblttng = dependency('lttng-ust', required : get_option('tracing'))\n> >  # are enabled.\n> >  pipelines = get_option('pipelines')\n> >  \n> > +arch_arm = ['arm', 'aarch64']\n> > +arch_x86 = ['x86', 'x86_64']\n> > +pipes_support = {\n> \n> pipelines_support to match the pipelines option ?\n\nAck.\n\n> \n> > +  'imx8-isi':     arch_arm,\n> > +  'ipu3':         arch_x86,\n> > +  'raspberrypi':  arch_arm,\n> > +  'rkisp1':       arch_arm,\n> > +  'simple':       arch_arm,\n> > +  'uvcvideo':     ['any'],\n> > +  'vimc':         ['test'],\n> \n> 4 spaces for indentation please.\n\nAck.\n\n> > +}\n> > +\n> >  if pipelines.contains('all')\n> > -    pipelines = [\n> > -        'imx8-isi',\n> > -        'ipu3',\n> > -        'raspberrypi',\n> > -        'rkisp1',\n> > -        'simple',\n> > -        'uvcvideo',\n> > -        'vimc',\n> > -    ]\n> > +    pipelines = []\n> > +    foreach pipe, archs : pipes_support\n> \n> Same here, s/pipe/pipeline/ ?\n> \n> > +        pipelines += pipe\n> > +    endforeach\n> \n> I think this could be simplified to\n> \n>     pipelines = pipes_support.keys()\n\nAha, I didn't realise we could do that.\n\n> \n> >  endif\n> >  \n> >  if pipelines.contains('auto')\n> \n> elif ? The above case has added all pipeline handlers already. It will\n> also making it clearer that 'all' takes precedence over 'auto'.\n\nAck\n\n> \n> >      host_cpu = host_machine.cpu_family()\n> >      pipelines = []\n> > -    if host_cpu == 'x86' or host_cpu == 'x86_64'\n> > -        pipelines += ['ipu3']\n> > -    elif host_cpu == 'aarch64'\n> > -        pipelines += ['imx8-isi', 'rkisp1']\n> > -    endif\n> > -\n> > -    if host_cpu == 'arm' or host_cpu == 'aarch64'\n> > -        pipelines += ['raspberrypi', 'simple']\n> > -    endif\n> > -\n> > -    # Always include the uvcvideo pipeline handler.\n> > -    pipelines += ['uvcvideo']\n> > +    foreach pipe, archs : pipes_support\n> > +        if host_cpu in archs or 'any' in archs\n> > +            message('Auto-enabling ' + pipe + ' pipeline handler')\n> \n> Do we need a message ? The selected pipeline handlers are printed in the\n> summary, I'm not sure this message adds much value.\n\nI can drop it - it was mostly about the fact that it's happening\n'automatically' rather than explicitly.\n\n> \n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> \n> > +            pipelines += pipe\n> > +        endif\n> > +    endforeach\n> >  endif\n> >  \n> > -if get_option('test') and 'vimc' not in pipelines\n> > -    message('Enabling vimc pipeline handler to support tests')\n> > -    pipelines += ['vimc']\n> > +if get_option('test')\n> > +    foreach pipe, archs : pipes_support\n> > +        if 'test' in archs and pipe not in pipelines\n> > +            message('Enabling ' + pipe + ' pipeline handler for tests')\n> > +            pipelines += pipe\n> > +        endif\n> > +    endforeach\n> >  endif\n> >  \n> >  # Utilities are parsed first to provide support for other components.\n> \n> -- \n> Regards,\n> \n> Laurent Pinchart","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 9ED57BEFBE\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 26 Jan 2023 11:46:12 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E13C1625E4;\n\tThu, 26 Jan 2023 12:46:11 +0100 (CET)","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 4DB6261EFB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 26 Jan 2023 12:46:10 +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 C0BD62B3;\n\tThu, 26 Jan 2023 12:46:09 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1674733571;\n\tbh=WSSRSXBbfLoJJIiS745Zh7z1dcPrelq3Zbl7JUY5kyo=;\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=D6QRMSpAjNJxLRsmSwRY4Yfak3jNasGAWViiMcgNFccb7xAA5V5W0gjJItnZCpd0A\n\tak3VMZaRYZzpVeIS9lYF9Wbz5N8UWXg/Vf0ub3N21xahUWi11jKIj7faPQ7SaAEISl\n\tXzJtGBT7rYPGkwy48ou6Um03in40uG3vLAX++YgmP4Jc3PiFxkv5NSfOKn+QC6417/\n\tcHPR0jJIh3Dk0ZH8mazYmC9On3fNqOuMMKPPLb43ti2e/6SM9XexQkc/5I3c5bY07E\n\tHePBILp3yvyvvlE11eqZGESMVVVI9WuGG68VShCUduc3TSWhmjQfEjxtYs77Ife2dt\n\tueokWrb53oR5A==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1674733569;\n\tbh=WSSRSXBbfLoJJIiS745Zh7z1dcPrelq3Zbl7JUY5kyo=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=U9K7iwILwHIWn3utlIkiuKZEvy8zJkBjzq0HqihWpJPvza9hsckRCHB5/+WygSrMN\n\tnNHEziI7jRUdewW7neY90qD+0Z3qvPA3GQphUt5CyCdXga+oyI2chaUIPMQVh9nKsO\n\tOXNUf366WFGh7eq44Sz0YOuPOZc6xhzwgrcRTjGk="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"U9K7iwIL\"; dkim-atps=neutral","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<Y9JgQWSKpjDYNpAt@pendragon.ideasonboard.com>","References":"<20230112110756.1944607-1-kieran.bingham@ideasonboard.com>\n\t<Y9JgQWSKpjDYNpAt@pendragon.ideasonboard.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Date":"Thu, 26 Jan 2023 11:46:07 +0000","Message-ID":"<167473356736.42371.1933601851040870450@Monstersaurus>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [PATCH] meson: Rework automatic pipeline\n\tselection","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 <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]