[{"id":26210,"web_url":"https://patchwork.libcamera.org/comment/26210/","msgid":"<52bbed3d-47e9-fb81-6f94-9a48a1c4ccfb@posteo.de>","date":"2023-01-11T23:29:33","subject":"Re: [libcamera-devel] [PATCH] meson: Remove pipelines list\n\tduplication","submitter":{"id":142,"url":"https://patchwork.libcamera.org/api/people/142/","name":"Robert Mader","email":"robert.mader@posteo.de"},"content":"Hi! Just a drive-by comment:\n\nOn 12.01.23 00:22, Javier Martinez Canillas via libcamera-devel wrote:\n> The supported pipelines are listed in three places: the meson_options.txt\n> file, the defined array when a user selects -Dpipelines=\"all\", and arrays\n> defined when the default -Dpipelines=\"auto\" is selected.\n>\n> This is hard to maintain and error prone, let's at least in the meson file\n> have a single place where these pipelines lists are defined.\n>\n> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>\n> ---\n>\n>   meson.build | 31 +++++++++++++++++--------------\n>   1 file changed, 17 insertions(+), 14 deletions(-)\n>\n> diff --git a/meson.build b/meson.build\n> index 389c547206fb..f9e3280ec0f2 100644\n> --- a/meson.build\n> +++ b/meson.build\n> @@ -168,38 +168,41 @@ liblttng = dependency('lttng-ust', required : get_option('tracing'))\n>   # are enabled.\n>   pipelines = get_option('pipelines')\n>   \n> +pipelines_aarch64 = ['imx8-isi', 'rkisp1']\n> +pipelines_arm = ['raspberrypi', 'simple']\n> +pipelines_agnostic = ['uvcvideo']\n> +pipelines_test = ['vimc']\n> +pipelines_x86 = ['ipu3']\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> +    pipelines += pipelines_aarch64\n> +    pipelines += pipelines_arm\n> +    pipelines += pipelines_agnostic\n> +    pipelines += pipelines_test\n> +    pipelines += pipelines_x86\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> +        pipelines += pipelines_x86\n>       elif host_cpu == 'aarch64'\n> -        pipelines += ['imx8-isi', 'rkisp1']\n> +        pipelines += pipelines_aarch64\n>       endif\n>   \n>       if host_cpu == 'arm' or host_cpu == 'aarch64'\n> -        pipelines += ['raspberrypi', 'simple']\n> +        pipelines += pipeines_arm\nTypo: pipeines_arm\n>       endif\n>   \n>       # Always include the uvcvideo pipeline handler.\n> -    pipelines += ['uvcvideo']\n> +    pipelines += pipelines_agnostic\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> +    pipelines += pipelines_test\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 72D91C3292\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 11 Jan 2023 23:29:37 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E6C9F625CF;\n\tThu, 12 Jan 2023 00:29:36 +0100 (CET)","from mout01.posteo.de (mout01.posteo.de [185.67.36.65])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id B732261F07\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 12 Jan 2023 00:29:34 +0100 (CET)","from submission (posteo.de [185.67.36.169]) \n\tby mout01.posteo.de (Postfix) with ESMTPS id 4B70A240352\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 12 Jan 2023 00:29:34 +0100 (CET)","from customer (localhost [127.0.0.1])\n\tby submission (posteo.de) with ESMTPSA id 4NskRK5zWVz6tmQ\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 12 Jan 2023 00:29:33 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1673479776;\n\tbh=uW41zIeziZvU8GgbsX5DDbfuJZRIL8BknUdup8eJ/7o=;\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:\n\tFrom;\n\tb=RFyZgw0ehEe18yMK6ysUoeA7/Pe7JDrTPmslfhw70+s6QdGlFXuTWb3uFRE5p1Vip\n\tvUWpYHFwcHzqBHXvUuhFYiJOJ470aP2FaLRC/BefNJlccUBF2nWdhVnid0C8QfCEz8\n\tQ65ij1tF8PHF+IsdxWfYJdSZeGdst7rojUSbjDD8C++ys7r/kKFGANgVCg3iR5JIga\n\tSQ6dBV4fz9NTwfpFodj/fZRt73C1Fl4pLT8Xd4UEmHOj7AGMzPZ7ZBWmmbXWRKZ1CD\n\t+ktAY5n5FN99DPwZuF9EnGMqU56GA33uU9rxd+GEjYad20zKNfKD30YJZxp2H/FwEe\n\tgKrm3XmL4RL+Q==","v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017;\n\tt=1673479774; bh=uW41zIeziZvU8GgbsX5DDbfuJZRIL8BknUdup8eJ/7o=;\n\th=Date:Subject:To:From:From;\n\tb=Dtb7jWZXFxxJMBBbyW63zp3IkUyq5BZsvHYHiHgPZom3eWdJGzFQj/go4PKq+EUV4\n\tgl79xg2SPud1SCGVXwqp/hTHvfEVujJSUCjQ3i0dLpjD/u/pdNzAK/y/x1/Bf3eHPn\n\tR7B1jAdcMZCD6912a5xeHhOM0jXcHw8JZ/ACbg9XJgUYyS6tgP0/Dc0FmK0nAl4YfA\n\tF1Hngg0yRykI+QoWKTm/B1e1iy0Q7lzHyg7s8IqqsLzNJ48aaBQ01vtmQYEoUbndLy\n\tn1zCz/0hLwOybpEWlk1TR4LngbhEHrzQkKpDJCwBnAayj2L2DRVV3shDiXOBewU9JH\n\tfUyazWv0kxbjw=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=posteo.de header.i=@posteo.de\n\theader.b=\"Dtb7jWZX\"; dkim-atps=neutral","Message-ID":"<52bbed3d-47e9-fb81-6f94-9a48a1c4ccfb@posteo.de>","Date":"Wed, 11 Jan 2023 23:29:33 +0000","MIME-Version":"1.0","To":"libcamera-devel@lists.libcamera.org","References":"<20230111232221.265057-1-javierm@redhat.com>","Content-Language":"en-US","In-Reply-To":"<20230111232221.265057-1-javierm@redhat.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH] meson: Remove pipelines list\n\tduplication","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":"Robert Mader via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Robert Mader <robert.mader@posteo.de>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":26211,"web_url":"https://patchwork.libcamera.org/comment/26211/","msgid":"<3c3c1fd1-57c8-d826-3f6f-9defc2da4dee@redhat.com>","date":"2023-01-12T08:39:24","subject":"Re: [libcamera-devel] [PATCH] meson: Remove pipelines list\n\tduplication","submitter":{"id":95,"url":"https://patchwork.libcamera.org/api/people/95/","name":"Javier Martinez Canillas","email":"javierm@redhat.com"},"content":"Hello Robert,\n\nOn 1/12/23 00:29, Robert Mader via libcamera-devel wrote:\n> Hi! Just a drive-by comment:\n\n[...]\n\n>>       if host_cpu == 'arm' or host_cpu == 'aarch64'\n>> -        pipelines += ['raspberrypi', 'simple']\n>> +        pipelines += pipeines_arm\n> Typo: pipeines_arm\n>>       endif\n\nOh, indeed! Thanks a lot for catching this.\n\nKieran though has an idea that these pipelines could be defined\nusing a data driven approach. So I'll wait for his proposal and\nhave an agreement on the way forward before posting a v2.","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 EBE2AC3240\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 12 Jan 2023 08:39:32 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2655A625DE;\n\tThu, 12 Jan 2023 09:39:32 +0100 (CET)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.133.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 319EA61F03\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 12 Jan 2023 09:39:30 +0100 (CET)","from mail-wm1-f69.google.com (mail-wm1-f69.google.com\n\t[209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id\n\tus-mta-248-igNLIFy3OnCgEnqIFE1r2w-1; Thu, 12 Jan 2023 03:39:27 -0500","by mail-wm1-f69.google.com with SMTP id\n\tbi18-20020a05600c3d9200b003d991844dbcso12120430wmb.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 12 Jan 2023 00:39:27 -0800 (PST)","from [192.168.1.130] (205.pool92-176-231.dynamic.orange.es.\n\t[92.176.231.205]) by smtp.gmail.com with ESMTPSA id\n\ti6-20020adfe486000000b002423dc3b1a9sm15526387wrm.52.2023.01.12.00.39.24\n\t(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n\tThu, 12 Jan 2023 00:39:25 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1673512772;\n\tbh=yhZ64OgfvwYo9HrBv9gQdKpi9V4RpmeHCuIj9dpR5dA=;\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:\n\tFrom;\n\tb=her3zFuuLLklMupPEqEtbNpor/k9MoW+zsJYPKtNimdJrbCZSdroeOd3zUp/oqaOt\n\tqNqc/vGrMcjyfLW+jyr66PXAPzXSV0MLZN5+wDFe8Fdcz0lLq7LZIUGIWVm4EjBi4N\n\txzdNzkBnycFSE78tE+E8tMWlrvEkaAejc4JEi9reEv0s0ceAQgQa3OyHw6dRBYTRZx\n\tgufyGA9bcg66ttg6cXGkLeDLfmFAhe/mdqtAnPUnxVQTPCSN7buuWZJscN1wkXDqGS\n\tkfswDqnQkUc355YabxHETNYpRRZLEDQv36/QH6HEXNXFKaB3mRxt/RMqAM31fCco7y\n\tHLe1KF5rX7/zg==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1673512769;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:mime-version:mime-version:content-type:content-type:\n\tcontent-transfer-encoding:content-transfer-encoding:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=hnDBnuxEUmxpKvQU+3C4k/tNA93yRgnCm3Amkj5z0ew=;\n\tb=XWtxP2eh6IIdfkmoxOYcXXpxXCJ3i7gBwwIjuLCVjEtJX9xbiXgcTBTOs+f9REwoLGu+7B\n\tjsU6nbTCdOaszS3Wxw7zmDpvVbkYsT4JgQP46yfLrtlQ/aX/keZGYXKDmLcN0atyF3CYFu\n\ttLHQM4OgxHI/iqryma9enBxY+S0kGK4="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=redhat.com\n\theader.i=@redhat.com header.b=\"XWtxP2eh\"; \n\tdkim-atps=neutral","X-MC-Unique":"igNLIFy3OnCgEnqIFE1r2w-1","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=content-transfer-encoding:in-reply-to:from:references:to\n\t:content-language:subject:user-agent:mime-version:date:message-id\n\t:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;\n\tbh=hnDBnuxEUmxpKvQU+3C4k/tNA93yRgnCm3Amkj5z0ew=;\n\tb=O4FtCc57ECk9ZF+hRC/USWyZF0zEm38aDwnJsx4s5YdzhdxhHcqGAlUyyVID+Qm3I1\n\t6cZ35URFh9WPWm2Ra/xcSQTEoMVOMRDMLVTxVp3mJM/gvIhT4qJoKbLnNPT01ecemWVi\n\tDAjCGy7v/La2YuSSw/eRIPZvj4b25VTKBSumFEpVXRm+RcVw3KT1/kA0IGjuxxLlXDhc\n\t59wj/4nxuWRkpS4BZaQWGBgNZM2hQCSBMnoJY1TPMrJvD3q08pInnM/LZI96MT04P7bI\n\tHWprXioetN9ymz/kz9t/mDM88dbz5wfBJSQE3Tb2IvOLUekoYGBpr6xOPgBJT/MwVfYa\n\teLWA==","X-Gm-Message-State":"AFqh2kqCxgcEiXgXJJ36UCLp4kx/CoWcD6Agbqi/jMOIKfy9kZzZySty\n\t6/We5axSXjryGo0q7FY39NDQQXkFGtRunb1QWnntuWgGLOuS+P39Dr8GRLcUXVFwSx0+hPsm+uQ\n\tELhheZk2uSbgqs7Ekv97gbiOvCTDuNUGijQ==","X-Received":["by 2002:a05:600c:1503:b0:3d0:8722:a145 with SMTP id\n\tb3-20020a05600c150300b003d08722a145mr53399007wmg.40.1673512766220; \n\tThu, 12 Jan 2023 00:39:26 -0800 (PST)","by 2002:a05:600c:1503:b0:3d0:8722:a145 with SMTP id\n\tb3-20020a05600c150300b003d08722a145mr53398994wmg.40.1673512765961; \n\tThu, 12 Jan 2023 00:39:25 -0800 (PST)"],"X-Google-Smtp-Source":"AMrXdXtTP9Gfeo7icWMuoHidynwo6ax4G4hL3uKtYinAV107qXYAyqZyR3g1c1wYlAH3WcV51RaI/A==","Message-ID":"<3c3c1fd1-57c8-d826-3f6f-9defc2da4dee@redhat.com>","Date":"Thu, 12 Jan 2023 09:39:24 +0100","MIME-Version":"1.0","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101\n\tThunderbird/102.5.0","To":"Robert Mader <robert.mader@posteo.de>,\n\tlibcamera-devel@lists.libcamera.org, \n\tKieran Bingham <kieran.bingham@ideasonboard.com>","References":"<20230111232221.265057-1-javierm@redhat.com>\n\t<52bbed3d-47e9-fb81-6f94-9a48a1c4ccfb@posteo.de>","In-Reply-To":"<52bbed3d-47e9-fb81-6f94-9a48a1c4ccfb@posteo.de>","X-Mimecast-Spam-Score":"0","X-Mimecast-Originator":"redhat.com","Content-Language":"en-US","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH] meson: Remove pipelines list\n\tduplication","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":"Javier Martinez Canillas via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Javier Martinez Canillas <javierm@redhat.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":26212,"web_url":"https://patchwork.libcamera.org/comment/26212/","msgid":"<Y7/TRmj18JES9oBS@pendragon.ideasonboard.com>","date":"2023-01-12T09:30:46","subject":"Re: [libcamera-devel] [PATCH] meson: Remove pipelines list\n\tduplication","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Javier,\n\nThank you for the patch.\n\nOn Thu, Jan 12, 2023 at 12:22:21AM +0100, Javier Martinez Canillas wrote:\n> The supported pipelines are listed in three places: the meson_options.txt\n> file, the defined array when a user selects -Dpipelines=\"all\", and arrays\n> defined when the default -Dpipelines=\"auto\" is selected.\n> \n> This is hard to maintain and error prone, let's at least in the meson file\n> have a single place where these pipelines lists are defined.\n> \n> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>\n> ---\n> \n>  meson.build | 31 +++++++++++++++++--------------\n>  1 file changed, 17 insertions(+), 14 deletions(-)\n\nLooking at the diffstat, I'm not sure if it's worth it. It feels a bit\noverengineered, especially given that the pipeline handlers also have to\nbe added to meson_options.txt too. If we had thousands of pipeline\nhandlers we would need to do better, but at the moment, I'm not entirely\nconvinced.\n\nIf you want to continue in this direction, I would at least turn the\npipelines_* variables into a single dictionary indexed by architecture,\nor do it the other way around, indexing by pipeline handler name and\nlisting the supported architectures as the value. This could help making\nthe x86 vs. x86_64 and arm vs. aarch64 a bit less special cases.\n\n> diff --git a/meson.build b/meson.build\n> index 389c547206fb..f9e3280ec0f2 100644\n> --- a/meson.build\n> +++ b/meson.build\n> @@ -168,38 +168,41 @@ liblttng = dependency('lttng-ust', required : get_option('tracing'))\n>  # are enabled.\n>  pipelines = get_option('pipelines')\n>  \n> +pipelines_aarch64 = ['imx8-isi', 'rkisp1']\n> +pipelines_arm = ['raspberrypi', 'simple']\n> +pipelines_agnostic = ['uvcvideo']\n> +pipelines_test = ['vimc']\n> +pipelines_x86 = ['ipu3']\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> +    pipelines += pipelines_aarch64\n> +    pipelines += pipelines_arm\n> +    pipelines += pipelines_agnostic\n> +    pipelines += pipelines_test\n> +    pipelines += pipelines_x86\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> +        pipelines += pipelines_x86\n>      elif host_cpu == 'aarch64'\n> -        pipelines += ['imx8-isi', 'rkisp1']\n> +        pipelines += pipelines_aarch64\n>      endif\n>  \n>      if host_cpu == 'arm' or host_cpu == 'aarch64'\n> -        pipelines += ['raspberrypi', 'simple']\n> +        pipelines += pipeines_arm\n>      endif\n>  \n>      # Always include the uvcvideo pipeline handler.\n> -    pipelines += ['uvcvideo']\n> +    pipelines += pipelines_agnostic\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> +    pipelines += pipelines_test\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 05143C3292\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 12 Jan 2023 09:30:49 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 67C31625CF;\n\tThu, 12 Jan 2023 10:30:48 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 00D2261F03\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 12 Jan 2023 10:30:46 +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 65D4C505;\n\tThu, 12 Jan 2023 10:30:46 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1673515848;\n\tbh=i6B9zpYpJ1pMhNpAFdTreIrEerUa6UCIqDdGacavITI=;\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=u139BpCLk2RkQ7UMec/BOzzuQaGe/YImdjBeVshtkSW6L4wtcqpilt3NMAWBVsHq1\n\tLfDFmnqwSK5/Y/c4Tuho7dxHHp1E9I4m6v6y2mweWAuIjl7yt7yCHUI7DP7qrnC6Fy\n\tOWLwW4iD6O+PB6UcE++k+rzDH1RNAzWyN3tJi+J+lRqgS7T98C3UEE/Yf1mekrBRUK\n\tE/P3gdJVd+5/HFX2lTufuuCXFznWcI+dUkQzWsmQ+IV1RQiHgXs+DytHYnBANJGYja\n\tXnzUaYXVDMIk1pnyfkgDcmRirKB/ZS3+BWV95euVz5dZAuRxq0mbkmAGlrlxudsspc\n\t3M2a8/dAPiF8A==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1673515846;\n\tbh=i6B9zpYpJ1pMhNpAFdTreIrEerUa6UCIqDdGacavITI=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=lYEpJrv8hPfw8/T+zVklIfYriwbgl7VjhyO3ZOXeIUcJYFRasxpDIBHKlWnA6Sez/\n\t6STNoF/R2G/v3tJUaPqHoMbC5ODaFjiXWL+nI499nudZfiE5VZRDPf9pJT0NYmjBjw\n\tjHrR6K45pUh07hEDcHRfXZ+zQkQ7/sfCaWLp1e2Q="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"lYEpJrv8\"; dkim-atps=neutral","Date":"Thu, 12 Jan 2023 11:30:46 +0200","To":"Javier Martinez Canillas <javierm@redhat.com>","Message-ID":"<Y7/TRmj18JES9oBS@pendragon.ideasonboard.com>","References":"<20230111232221.265057-1-javierm@redhat.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20230111232221.265057-1-javierm@redhat.com>","Subject":"Re: [libcamera-devel] [PATCH] meson: Remove pipelines list\n\tduplication","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@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":26213,"web_url":"https://patchwork.libcamera.org/comment/26213/","msgid":"<167351683225.541190.866796468414078503@Monstersaurus>","date":"2023-01-12T09:47:12","subject":"Re: [libcamera-devel] [PATCH] meson: Remove pipelines list\n\tduplication","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-12 09:30:46)\n> Hi Javier,\n> \n> Thank you for the patch.\n> \n> On Thu, Jan 12, 2023 at 12:22:21AM +0100, Javier Martinez Canillas wrote:\n> > The supported pipelines are listed in three places: the meson_options.txt\n> > file, the defined array when a user selects -Dpipelines=\"all\", and arrays\n> > defined when the default -Dpipelines=\"auto\" is selected.\n> > \n> > This is hard to maintain and error prone, let's at least in the meson file\n> > have a single place where these pipelines lists are defined.\n> > \n> > Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>\n> > ---\n> > \n> >  meson.build | 31 +++++++++++++++++--------------\n> >  1 file changed, 17 insertions(+), 14 deletions(-)\n> \n> Looking at the diffstat, I'm not sure if it's worth it. It feels a bit\n> overengineered, especially given that the pipeline handlers also have to\n> be added to meson_options.txt too. If we had thousands of pipeline\n> handlers we would need to do better, but at the moment, I'm not entirely\n> convinced.\n> \n> If you want to continue in this direction, I would at least turn the\n> pipelines_* variables into a single dictionary indexed by architecture,\n> or do it the other way around, indexing by pipeline handler name and\n> listing the supported architectures as the value. This could help making\n> the x86 vs. x86_64 and arm vs. aarch64 a bit less special cases.\n\nPrecisely what I had in mind last night.\n\nSketched out that would be:\n\npipelines = get_option('pipelines')\n\npipes_support = {\n  'imx8-isi':     ['aarch64'],\n  'ipu3':         ['x86', 'x86_64'],\n  'raspberrypi':  ['arm', 'aarch64'],\n  'rkisp1':       ['aarch64'],\n  'simple':       ['arm', 'aarch64'],\n  'uvcvideo':     ['any'],\n  'vimc':         ['test'],\n  'virtual':      ['test'],\n}\n\nif pipelines.contains('all')\n    pipelines = []\n    foreach pipe, archs : pipes_support\n        pipelines += pipe\n    endforeach\nendif\n\nif pipelines.contains('auto')\n    host_cpu = host_machine.cpu_family()\n    pipelines = []\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\nendif\n\nif get_option('test')\n    foreach pipe, archs : pipes_support\n        if 'test' in archs and pipe not in pipelines\n            message('Test Support: Enabling ' + pipe + ' pipeline handler')\n            pipelines += pipe\n        endif\n    endforeach\nendif\n\n\n> \n> > diff --git a/meson.build b/meson.build\n> > index 389c547206fb..f9e3280ec0f2 100644\n> > --- a/meson.build\n> > +++ b/meson.build\n> > @@ -168,38 +168,41 @@ liblttng = dependency('lttng-ust', required : get_option('tracing'))\n> >  # are enabled.\n> >  pipelines = get_option('pipelines')\n> >  \n> > +pipelines_aarch64 = ['imx8-isi', 'rkisp1']\n> > +pipelines_arm = ['raspberrypi', 'simple']\n> > +pipelines_agnostic = ['uvcvideo']\n> > +pipelines_test = ['vimc']\n> > +pipelines_x86 = ['ipu3']\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> > +    pipelines += pipelines_aarch64\n> > +    pipelines += pipelines_arm\n> > +    pipelines += pipelines_agnostic\n> > +    pipelines += pipelines_test\n> > +    pipelines += pipelines_x86\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> > +        pipelines += pipelines_x86\n> >      elif host_cpu == 'aarch64'\n> > -        pipelines += ['imx8-isi', 'rkisp1']\n> > +        pipelines += pipelines_aarch64\n> >      endif\n> >  \n> >      if host_cpu == 'arm' or host_cpu == 'aarch64'\n> > -        pipelines += ['raspberrypi', 'simple']\n> > +        pipelines += pipeines_arm\n> >      endif\n> >  \n> >      # Always include the uvcvideo pipeline handler.\n> > -    pipelines += ['uvcvideo']\n> > +    pipelines += pipelines_agnostic\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> > +    pipelines += pipelines_test\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 BCD97C3240\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 12 Jan 2023 09:47:16 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 256E2625DE;\n\tThu, 12 Jan 2023 10:47:16 +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 0BE4561F03\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 12 Jan 2023 10:47:15 +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 6A03D505;\n\tThu, 12 Jan 2023 10:47:14 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1673516836;\n\tbh=/9ZiX1uxPuccnAb2rsT9SgI3Zs7FTR1sNRYV+8KTvx0=;\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=PmFxnHQpWgWm7jnyoSlHVXCM/8XbU5FFkit2vfxVpKFz9iD0frsgtiW2xuAkcoD5d\n\twMYlkGRtIrEWE8d0J/Q60Mnk4/FWgPCNDoiIOzO9I12ecn9opH/OlB59ZFMHiWPk0+\n\thDLyQM9szmuAoEJshNUi7UFycpSY03k7pChMtUojvtKKsMNi3k23Mhtp//M0eIaDMW\n\tANtNuqZCBTqzBSb5CKmgudjLtAksH1KOCfWYNmjmvCldTc7rn2qhqwabpNFZg0w2u2\n\tQaZgqYERLYnUlgL0qBs/x1OUkxUs2otzg1Pbr+tkjKZ9SzP03Py/GPMOB5T398Rf5n\n\tyiSSGfDupUx6Q==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1673516834;\n\tbh=/9ZiX1uxPuccnAb2rsT9SgI3Zs7FTR1sNRYV+8KTvx0=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=PnykCTxxWcUVSEyDhEkd362PVqFHkiKrmucc3LgMx/N8R9eAuFUH354efv2RUteMP\n\tsia3SRuuYolyQYmApB4BPEV/TJLHoiGzFLHn9VIsPTsaAzSg75i+PV56QC//WOC5+X\n\tbaLmkAZ0bpWdUZq9gG+ayO5VWR7rrd3lLe2wWJkE="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"PnykCTxx\"; dkim-atps=neutral","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<Y7/TRmj18JES9oBS@pendragon.ideasonboard.com>","References":"<20230111232221.265057-1-javierm@redhat.com>\n\t<Y7/TRmj18JES9oBS@pendragon.ideasonboard.com>","To":"Javier Martinez Canillas <javierm@redhat.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>","Date":"Thu, 12 Jan 2023 09:47:12 +0000","Message-ID":"<167351683225.541190.866796468414078503@Monstersaurus>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [PATCH] meson: Remove pipelines list\n\tduplication","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Kieran Bingham via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":26214,"web_url":"https://patchwork.libcamera.org/comment/26214/","msgid":"<167351698596.541190.3936395724190469163@Monstersaurus>","date":"2023-01-12T09:49:45","subject":"Re: [libcamera-devel] [PATCH] meson: Remove pipelines list\n\tduplication","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Kieran Bingham (2023-01-12 09:47:12)\n> Quoting Laurent Pinchart (2023-01-12 09:30:46)\n> > Hi Javier,\n> > \n> > Thank you for the patch.\n> > \n> > On Thu, Jan 12, 2023 at 12:22:21AM +0100, Javier Martinez Canillas wrote:\n> > > The supported pipelines are listed in three places: the meson_options.txt\n> > > file, the defined array when a user selects -Dpipelines=\"all\", and arrays\n> > > defined when the default -Dpipelines=\"auto\" is selected.\n> > > \n> > > This is hard to maintain and error prone, let's at least in the meson file\n> > > have a single place where these pipelines lists are defined.\n> > > \n> > > Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>\n> > > ---\n> > > \n> > >  meson.build | 31 +++++++++++++++++--------------\n> > >  1 file changed, 17 insertions(+), 14 deletions(-)\n> > \n> > Looking at the diffstat, I'm not sure if it's worth it. It feels a bit\n> > overengineered, especially given that the pipeline handlers also have to\n> > be added to meson_options.txt too. If we had thousands of pipeline\n> > handlers we would need to do better, but at the moment, I'm not entirely\n> > convinced.\n> > \n> > If you want to continue in this direction, I would at least turn the\n> > pipelines_* variables into a single dictionary indexed by architecture,\n> > or do it the other way around, indexing by pipeline handler name and\n> > listing the supported architectures as the value. This could help making\n> > the x86 vs. x86_64 and arm vs. aarch64 a bit less special cases.\n> \n> Precisely what I had in mind last night.\n> \n> Sketched out that would be:\n> \n> pipelines = get_option('pipelines')\n> \n> pipes_support = {\n>   'imx8-isi':     ['aarch64'],\n>   'ipu3':         ['x86', 'x86_64'],\n>   'raspberrypi':  ['arm', 'aarch64'],\n>   'rkisp1':       ['aarch64'],\n\nNote I've intentionally kept rkisp1 and imx8-isi as aarch64 only, as I\nbelieve that's how I interpret the current implementation.\n\nI expect it should really be both for each of them?\nWe could wrap a x86 = ['x86', 'x86_64'], and an arm = ['arm', 'aarch64']\nhelper too.\n\n>   'simple':       ['arm', 'aarch64'],\n>   'uvcvideo':     ['any'],\n>   'vimc':         ['test'],\n>   'virtual':      ['test'],\n> }\n> \n> if pipelines.contains('all')\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>     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')\n>     foreach pipe, archs : pipes_support\n>         if 'test' in archs and pipe not in pipelines\n>             message('Test Support: Enabling ' + pipe + ' pipeline handler')\n>             pipelines += pipe\n>         endif\n>     endforeach\n> endif","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 4CEE3C3240\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 12 Jan 2023 09:49:51 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id B9992625CF;\n\tThu, 12 Jan 2023 10:49:50 +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 BC67361F03\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 12 Jan 2023 10:49:48 +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 366E9505;\n\tThu, 12 Jan 2023 10:49:48 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1673516990;\n\tbh=75BSMpdRrTdMPMe2jqB5WsXa+ataHnZHs64SkHmvrhA=;\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=QhxZQmqpWN5oTslsv/ohS/D+hY//moTL2XX4hoPTCYQSV+z50T02KAE/fJZryDmCC\n\tG9mpafEL9zK0PsYu5BoeihuGwcFdGbWxWJwkQ1jmPovf6s/KRW+YUEw3Rw7AP+Zjfx\n\te6CAVIqA83j+QBiuEx0EJB5lsW6AchwZyoNXEgagfH4U0B8rpTagN2Wy/i9+JBPXgn\n\t8FTQhnJkzw/3qj44VHRvOugXjt0q2LqDqWUOR6ownTNDSA1AATbiZLeNq9FZPH+bG+\n\tawLgWA5mzIgmkpHA1wCr0vooVH9v7OrHm52ro6fJQlL0/XIs31RQDcjZLysZ627rRN\n\tUdW0W/Axy6M9w==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1673516988;\n\tbh=75BSMpdRrTdMPMe2jqB5WsXa+ataHnZHs64SkHmvrhA=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=OJyWY9/Iw16HBLoNn6+lKxhsJ0oARcIJi28LOEj4WP4rqq4mtX2LY2g9R5qRsYwdV\n\t4U6pbLXyXOoVoEiP2PDz8ivsnQteqWrjkhCQIdQu6vhU4uyxxjHup+VxM7vWupt/9C\n\tEM/IXMxNr/sKci8Aq8uvhIN8NBvBYJPlGdYWz8a0="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"OJyWY9/I\"; dkim-atps=neutral","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<167351683225.541190.866796468414078503@Monstersaurus>","References":"<20230111232221.265057-1-javierm@redhat.com>\n\t<Y7/TRmj18JES9oBS@pendragon.ideasonboard.com>\n\t<167351683225.541190.866796468414078503@Monstersaurus>","To":"Javier Martinez Canillas <javierm@redhat.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>","Date":"Thu, 12 Jan 2023 09:49:45 +0000","Message-ID":"<167351698596.541190.3936395724190469163@Monstersaurus>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [PATCH] meson: Remove pipelines list\n\tduplication","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Kieran Bingham via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":26215,"web_url":"https://patchwork.libcamera.org/comment/26215/","msgid":"<61dbbe66-a0f5-5134-d1e6-0badffa00e52@redhat.com>","date":"2023-01-12T09:54:34","subject":"Re: [libcamera-devel] [PATCH] meson: Remove pipelines list\n\tduplication","submitter":{"id":95,"url":"https://patchwork.libcamera.org/api/people/95/","name":"Javier Martinez Canillas","email":"javierm@redhat.com"},"content":"Hello Laurent and Kieran,\n\nOn 1/12/23 10:47, Kieran Bingham wrote:\n> Quoting Laurent Pinchart (2023-01-12 09:30:46)\n>> Hi Javier,\n>>\n>> Thank you for the patch.\n>>\n>> On Thu, Jan 12, 2023 at 12:22:21AM +0100, Javier Martinez Canillas wrote:\n>>> The supported pipelines are listed in three places: the meson_options.txt\n>>> file, the defined array when a user selects -Dpipelines=\"all\", and arrays\n>>> defined when the default -Dpipelines=\"auto\" is selected.\n>>>\n>>> This is hard to maintain and error prone, let's at least in the meson file\n>>> have a single place where these pipelines lists are defined.\n>>>\n>>> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>\n>>> ---\n>>>\n>>>  meson.build | 31 +++++++++++++++++--------------\n>>>  1 file changed, 17 insertions(+), 14 deletions(-)\n>>\n>> Looking at the diffstat, I'm not sure if it's worth it. It feels a bit\n>> overengineered, especially given that the pipeline handlers also have to\n>> be added to meson_options.txt too. If we had thousands of pipeline\n>> handlers we would need to do better, but at the moment, I'm not entirely\n>> convinced.\n>>\n>> If you want to continue in this direction, I would at least turn the\n>> pipelines_* variables into a single dictionary indexed by architecture,\n>> or do it the other way around, indexing by pipeline handler name and\n>> listing the supported architectures as the value. This could help making\n>> the x86 vs. x86_64 and arm vs. aarch64 a bit less special cases.\n> \n> Precisely what I had in mind last night.\n>\n\nAgreed with you both. I wasn't aware that the meson language was that\nexpressive and had support for dictionaries.\n \n> Sketched out that would be:\n> \n> pipelines = get_option('pipelines')\n> \n> pipes_support = {\n>   'imx8-isi':     ['aarch64'],\n>   'ipu3':         ['x86', 'x86_64'],\n>   'raspberrypi':  ['arm', 'aarch64'],\n>   'rkisp1':       ['aarch64'],\n>   'simple':       ['arm', 'aarch64'],\n>   'uvcvideo':     ['any'],\n>   'vimc':         ['test'],\n>   'virtual':      ['test'],\n> }\n> \n> if pipelines.contains('all')\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>     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')\n>     foreach pipe, archs : pipes_support\n>         if 'test' in archs and pipe not in pipelines\n>             message('Test Support: Enabling ' + pipe + ' pipeline handler')\n>             pipelines += pipe\n>         endif\n>     endforeach\n> endif\n> \n>\n\nThis is indeed a much better approach. If you post a patch, feel free to add\nmy Reviewed-by. Thanks!","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 29B29C3292\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 12 Jan 2023 09:54:42 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 890CD625DE;\n\tThu, 12 Jan 2023 10:54:41 +0100 (CET)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.129.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 50CFA61F03\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 12 Jan 2023 10:54:40 +0100 (CET)","from mail-wm1-f69.google.com (mail-wm1-f69.google.com\n\t[209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id\n\tus-mta-311-MGe5N0HvM2yDxnSK_qGBuw-1; Thu, 12 Jan 2023 04:54:37 -0500","by mail-wm1-f69.google.com with SMTP id\n\tm38-20020a05600c3b2600b003d1fc5f1f80so12212294wms.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 12 Jan 2023 01:54:37 -0800 (PST)","from [192.168.1.130] (205.pool92-176-231.dynamic.orange.es.\n\t[92.176.231.205]) by smtp.gmail.com with ESMTPSA id\n\tl13-20020adfe58d000000b00296730b5c3esm16090161wrm.102.2023.01.12.01.54.35\n\t(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n\tThu, 12 Jan 2023 01:54:35 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1673517281;\n\tbh=BRm4quxN+WnVXc5zzu8Ii3/w91bNqdFghspfwIYYpPo=;\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=AaWL19UANzRtVa+NcTLg9QX9m6HadeuUttDLHEusBAT/u8Y4t0hEylmGZqkGf7hGx\n\tD2Lb9Cm0MSY8ndvlSnL0jdo7OSYWSzGLLQ2KJjvyGhh4iFt/ObMGrkwvuCc9oSl+1m\n\tG4k8Bf64v2mbIXux6lRz+uJ7GdlXzJ6OzeL6iYRWr0oUBc/ESrYpYoMfFL/rsIGSAT\n\tTYcAbZ0NPVAFLVAkK6BH50HEF3mdKh24lWHyhpJjswecLLDorkrETCtO/vcYVO9jqW\n\t1svoD7tWYwTpyrTN7RhFeT235lAJj5bkaKsUzJQn5VDomeHvR6XNVGBo33Hw7lyKYW\n\tUDFcT1G+8hMIQ==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1673517279;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tcontent-transfer-encoding:content-transfer-encoding:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=66ABt88LChLSXPnydbkwq0VpnQsW4CML21321VxWmHA=;\n\tb=FuQjCTJ5DRYU25pGma6Egq0kJtp5LP/0hUIAbTOh+qIE5JbK4LfC/enII/Xx6SBaRQY81R\n\t7NPV69uXmw4LYHefbxnN3r4OwdKmyBD85b+AIiM7XDzki2j7rDpkRloqFdH3tiDlzyVIsE\n\tD6FOJVqHFumnLMq/yyLNE4PVXgm/6tI="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=redhat.com\n\theader.i=@redhat.com header.b=\"FuQjCTJ5\"; \n\tdkim-atps=neutral","X-MC-Unique":"MGe5N0HvM2yDxnSK_qGBuw-1","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=content-transfer-encoding:in-reply-to:from:references:cc:to\n\t:content-language:subject:user-agent:mime-version:date:message-id\n\t:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;\n\tbh=66ABt88LChLSXPnydbkwq0VpnQsW4CML21321VxWmHA=;\n\tb=2SJ9rfbetbkCM+3YG6PIXo+Pf/UtKA9zakM+eQ2gFwE8x83sdVV44iCmkPmEANkpT1\n\tuNY73knGcbuIEVijoNabGKfIdzD75IKoyHr31vF7YRJSPoXG5vgo/Vzr9Pthf/a61Ay/\n\tAtRYqzeqHP+lOVLExB7+sDm9D2mRkE7UEBMEHURETk7hxIBlj9ylXHb22sJ2t7o06pnS\n\tUosvDgoKJm7eSbAgw3fJSdp3xuCAqlY/nC8FNCoqykZGf+o5Ah2pbfFyiNOlw4HtIxhy\n\t4MurD5pqs/AUZSUWs6ECP4pAum5ofBh30KkuPghjGwPdQJR4Lq7gbi5HfxzYOsZ892zX\n\thLcg==","X-Gm-Message-State":"AFqh2kr5jm2D32ATgDIi+Oqkaxt6MDFdViCce+NtVGBTjiqpwZPigE0C\n\tSkRa/wRkqvjdYl+vJ/swcgcXO9gLLzoQ/ZEiMOEGhamIenV7eQOtrmeMnvA8NoumMnJwmG5+DtM\n\thtACsU18wNjpRuxU1qPgDx+9yfygDh2WZXA==","X-Received":["by 2002:a5d:4fc1:0:b0:2bc:834a:a06 with SMTP id\n\th1-20020a5d4fc1000000b002bc834a0a06mr7742375wrw.4.1673517276744; \n\tThu, 12 Jan 2023 01:54:36 -0800 (PST)","by 2002:a5d:4fc1:0:b0:2bc:834a:a06 with SMTP id\n\th1-20020a5d4fc1000000b002bc834a0a06mr7742362wrw.4.1673517276470; \n\tThu, 12 Jan 2023 01:54:36 -0800 (PST)"],"X-Google-Smtp-Source":"AMrXdXsmZzQbMqUU49qw4VA4bnjXc4dwvaScyi1pmPkdotnqXS68Zfyv45TA7hmAikl172AtaUmUkg==","Message-ID":"<61dbbe66-a0f5-5134-d1e6-0badffa00e52@redhat.com>","Date":"Thu, 12 Jan 2023 10:54:34 +0100","MIME-Version":"1.0","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101\n\tThunderbird/102.5.0","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>","References":"<20230111232221.265057-1-javierm@redhat.com>\n\t<Y7/TRmj18JES9oBS@pendragon.ideasonboard.com>\n\t<167351683225.541190.866796468414078503@Monstersaurus>","In-Reply-To":"<167351683225.541190.866796468414078503@Monstersaurus>","X-Mimecast-Spam-Score":"0","X-Mimecast-Originator":"redhat.com","Content-Language":"en-US","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH] meson: Remove pipelines list\n\tduplication","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":"Javier Martinez Canillas via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Javier Martinez Canillas <javierm@redhat.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]