{"id":18223,"url":"https://patchwork.libcamera.org/api/1.1/patches/18223/?format=json","web_url":"https://patchwork.libcamera.org/patch/18223/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20230130124559.1838507-1-kieran.bingham@ideasonboard.com>","date":"2023-01-30T12:45:59","name":"[libcamera-devel,v2] meson: Rework automatic pipeline selection","commit_ref":"8f85c024f9224ccb75819812b888ee6c007ff834","pull_url":null,"state":"accepted","archived":false,"hash":"48840ffe7903e5a2645f89043c500301fc1aa43d","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/1.1/people/4/?format=json","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/18223/mbox/","series":[{"id":3731,"url":"https://patchwork.libcamera.org/api/1.1/series/3731/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3731","date":"2023-01-30T12:45:59","name":"[libcamera-devel,v2] meson: Rework automatic pipeline selection","version":2,"mbox":"https://patchwork.libcamera.org/series/3731/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/18223/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/18223/checks/","tags":{},"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 59A03BDC71\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 30 Jan 2023 12:46:04 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7E4D6625E4;\n\tMon, 30 Jan 2023 13:46:03 +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 B407E60482\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 30 Jan 2023 13:46:02 +0100 (CET)","from Monstersaurus.local\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 1EBA08B8;\n\tMon, 30 Jan 2023 13:46:02 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1675082763;\n\tbh=fZ+H8oYY9pyZaF5aaWz2GMQtAyt41WDrVxEAiZPfIpk=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:From;\n\tb=aIoCZCF2Q44FyW+6TyupsnaUCV9g2Y7I96c0RSquNo5RiT8hw2OZk8fs2vHcupQ9G\n\tiu7YpViO3N/h1mJ0NKFTkbRdLmVuuWbtLVukCoDJzMkGcquyMKSCTW2rw5x1ZbZeBm\n\tZeGJJh/DepaMWKhbHKUKe09nFZ5g46J7G8sGTtnQoRJ8rlh2kvIp+2ebDoK6pehi/j\n\tnAo121o5C3QyS55PHlvEQFWR6G9wtt/dM6GxvRRjCx119dotide0ppTqGMuDERrmsl\n\tzdGEePREaAw5DRTclV6zXTaPB8qpXKJGNxVZvXDLZpDEKg9+JSuludbNx6/Ib05mAx\n\tX66qwHi2OrBHg==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1675082762;\n\tbh=fZ+H8oYY9pyZaF5aaWz2GMQtAyt41WDrVxEAiZPfIpk=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=s6wnTxUMTWdDglWo2HrdZ3pbnXCywdBJLt6tF0CA4EWl0XKU75IM1Yf++ONk6IShE\n\tDDjs2Iq64s1HhYI91UP8hcJWMvED6/2IZlXFn/oqduS5WbuA2aUfKglHyt+8kfiFTl\n\tH7zeS7AfZ+y2RHvTzfBz4e27tKjUm6Ii9YRaqD2I="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"s6wnTxUM\"; dkim-atps=neutral","To":"libcamera devel <libcamera-devel@lists.libcamera.org>","Date":"Mon, 30 Jan 2023 12:45:59 +0000","Message-Id":"<20230130124559.1838507-1-kieran.bingham@ideasonboard.com>","X-Mailer":"git-send-email 2.34.1","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v2] 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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"The supported pipelines are listed in three places: the\nmeson_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\nThis can be hard to maintain and error prone.\n\nRework the definition of pipeline selection to a single table which\nspecifies the architecture(s) that the pipeline handler supports and\niterate it to handle the special cases for 'all', 'auto' and 'test'.\n\nThe current behaviour such that 'all' takes precedence over 'auto' is\nmaintained, and 'test' is now extended such that additional test\npipeline handlers can easily be introduced.\n\nThe existing implementation defines the i.MX8-ISI and RKISP1 pipeline\nhandlers as only supported by 'aarch64'. This conversion changes the\nbehaviour such that those pipeline handlers are now supported on both\n'arm' and 'aarch64' as each of those platforms could support a 32-bit\nARM build.\n\nSuggested-by: Javier Martinez Canillas <javierm@redhat.com>\nReviewed-by: Javier Martinez Canillas <javierm@redhat.com>\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n\nv2:\n - Took in Laurent's feedback, and moved the comment regarding enableing\n   VIMC for tests closer to the code block where that actually occurs.\n\n meson.build | 57 ++++++++++++++++++++++++++---------------------------\n 1 file changed, 28 insertions(+), 29 deletions(-)","diff":"diff --git a/meson.build b/meson.build\nindex 389c547206fb..3cbe1584e2dd 100644\n--- a/meson.build\n+++ b/meson.build\n@@ -164,42 +164,41 @@ liblttng = dependency('lttng-ust', required : get_option('tracing'))\n \n # Pipeline handlers\n #\n-# Tests require the vimc pipeline handler, include it automatically when tests\n-# are enabled.\n pipelines = get_option('pipelines')\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-endif\n+arch_arm = ['arm', 'aarch64']\n+arch_x86 = ['x86', 'x86_64']\n+pipelines_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('auto')\n+if pipelines.contains('all')\n+    pipelines = pipelines_support.keys()\n+elif 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 pipeline, archs : pipelines_support\n+        if host_cpu in archs or 'any' in archs\n+            pipelines += pipeline\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+# Tests require the vimc pipeline handler, include it automatically when tests\n+# are enabled.\n+if get_option('test')\n+    foreach pipeline, archs : pipelines_support\n+        if 'test' in archs and pipeline not in pipelines\n+            message('Enabling ' + pipeline + ' pipeline handler for tests')\n+            pipelines += pipeline\n+        endif\n+    endforeach\n endif\n \n # Utilities are parsed first to provide support for other components.\n","prefixes":["libcamera-devel","v2"]}