{"id":18055,"url":"https://patchwork.libcamera.org/api/patches/18055/?format=json","web_url":"https://patchwork.libcamera.org/patch/18055/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/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":"<20221224102828.2602512-1-javierm@redhat.com>","date":"2022-12-24T10:28:28","name":"[libcamera-devel,v2] meson: Only build pipeline handlers needed in the host architecture","commit_ref":"0a8ac1ee06a47079e5272656be4653b1b12916ef","pull_url":null,"state":"accepted","archived":false,"hash":"6d3dd3149243a41943f4331b26ab6859af97340e","submitter":{"id":95,"url":"https://patchwork.libcamera.org/api/people/95/?format=json","name":"Javier Martinez Canillas","email":"javierm@redhat.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/18055/mbox/","series":[{"id":3690,"url":"https://patchwork.libcamera.org/api/series/3690/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3690","date":"2022-12-24T10:28:28","name":"[libcamera-devel,v2] meson: Only build pipeline handlers needed in the host architecture","version":2,"mbox":"https://patchwork.libcamera.org/series/3690/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/18055/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/18055/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 7BD37C3200\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 24 Dec 2022 10:28:55 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C0631625CC;\n\tSat, 24 Dec 2022 11:28:54 +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 98056625C8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 24 Dec 2022 11:28:53 +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-370-6dCZ5hOrM0-qe3MyXhkuwg-1; Sat, 24 Dec 2022 05:28:51 -0500","by mail-wm1-f69.google.com with SMTP id\n\tbi19-20020a05600c3d9300b003cf9d6c4016so5134121wmb.8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 24 Dec 2022 02:28:51 -0800 (PST)","from minerva.home (205.pool92-176-231.dynamic.orange.es.\n\t[92.176.231.205]) by smtp.gmail.com with ESMTPSA id\n\tm15-20020a056000008f00b00267e918d1ecsm5204280wrx.24.2022.12.24.02.28.48\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tSat, 24 Dec 2022 02:28:48 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1671877734;\n\tbh=rbnzsZn6OEa9IOkRlH0W5fVajtMn0hg2Zc2ttkJoMTI=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:From;\n\tb=hM4jYxf7FoaIDHmSEt7IZIoMReCt5SBAghF15QgjHXT4fwC9OMJ2/1sZgTctyJiok\n\tv62fV2X1pbSuKSgKQvIEQ9uZqTikKjhWXavn/A1mgucNGzaeoJ+51YPeziTjjuC0fj\n\tU/H9NmeK4nk6wpbyvL4ilDzkuQ/+gfIwOSfgGlIAMS80KI28qH+csHSKudn5AhH48P\n\tXan5lbCio1csjXp+Qx4uq3U20fb8TYJlBhUGqPn8Ej7Ffy1BPt/qbPeRBiCmFx35Ds\n\tyaSiRU7m5T1u0LnTXjDlVrhGNG1LlXDsYkqUI3/Eo8n4scIe5VdqscBmDkGf6RT7hZ\n\tMe9DyPNhGuYew==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1671877732;\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\tbh=RVHpS7VQrhLYabdj4qqkJpHchoBR4i1FP9s5uGjwaVY=;\n\tb=LeV+fy4dxsRtEVVdaX7i+odVcPhV3Oe0lV9gFk2brT3WjReHL8ckGDg5B3QSkQ5CDLbb/O\n\t9t+cwHx+DxrdDsMUprr17MCqJ/ZrTCOSV0YF/buWiYQSCwlvfoWwKgZac5xFzxKanu+CoM\n\teV2QazRknzF6ed1czfz7Sn69gayUKp4="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=redhat.com\n\theader.i=@redhat.com header.b=\"LeV+fy4d\"; \n\tdkim-atps=neutral","X-MC-Unique":"6dCZ5hOrM0-qe3MyXhkuwg-1","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=content-transfer-encoding:mime-version:message-id:date:subject:cc\n\t:to:from:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=RVHpS7VQrhLYabdj4qqkJpHchoBR4i1FP9s5uGjwaVY=;\n\tb=Te/DzXN1QoZVosIR+aluaHfV78EgCuwsPRDHPaJGaTONKSMm/kOUp6H6WH3ngD2poC\n\tYhBonivlsp8LxdjZPmmvChHDZRY5BzAmKg1IXb9wUfPXGR/9CXpvweMNRyFAUT5jMNsm\n\t9oXvYa4G4nf+PzWred+RLpgs8h4I/scr63Y7JWF+e4N2exIJ2PESmTzRW16fnEBxiBcn\n\tKzvXyGxQsKxJGvfZoNlg/x82KKo31SYd/IpS2YvM62zNO/gWKuTPZhGhb6FnACCMl3Ia\n\tc6wEFf1un9qXAryt/jrBCwVGRT2Ww1BlrAVJwMXAx/i+jlZWOYqIXVWtD/H9i1J3OUP4\n\tnMbg==","X-Gm-Message-State":"AFqh2krbp/iDiGpe6gwZrF60LrjPGcA00YvO+WCHIYU21WY9+BQS1flk\n\tHV0fz1VM93i2QW4dGh3ed9WMZSW/pGanEqhVhnsmyLo51xfq6FIc/kAe5G9Mg6Ac5mh9EJtm61s\n\tc7WmSUwGp6EbbVsmOz6+zrJU2cAcF9+4foDStTd+WWXrqHo/prHQwShTboWWNqGhYCIaYktD+69\n\tr1CW7b2nhN","X-Received":["by 2002:adf:c751:0:b0:273:e357:1ca with SMTP id\n\tb17-20020adfc751000000b00273e35701camr4100712wrh.67.1671877729811; \n\tSat, 24 Dec 2022 02:28:49 -0800 (PST)","by 2002:adf:c751:0:b0:273:e357:1ca with SMTP id\n\tb17-20020adfc751000000b00273e35701camr4100700wrh.67.1671877729488; \n\tSat, 24 Dec 2022 02:28:49 -0800 (PST)"],"X-Google-Smtp-Source":"AMrXdXs0DSNcqn2FFbZUrdQgRDygGQ8pw+C2Q2nmKW88Kx2wNPQfPOR5yGWrkbxSri9ezu2ZmLoCRQ==","To":"libcamera-devel@lists.libcamera.org","Date":"Sat, 24 Dec 2022 11:28:28 +0100","Message-Id":"<20221224102828.2602512-1-javierm@redhat.com>","X-Mailer":"git-send-email 2.38.1","MIME-Version":"1.0","X-Mimecast-Spam-Score":"0","X-Mimecast-Originator":"redhat.com","Content-Transfer-Encoding":"8bit","Content-Type":"text/plain; charset=\"US-ASCII\"; x-default=true","Subject":"[libcamera-devel] [PATCH v2] meson: Only build pipeline handlers\n\tneeded in the host architecture","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>"},"content":"By default all pipeline handlers are built, regardless on whether these\nare needed in the host architecture or not. It makes more sense to build\nonly the pipeline handlers that will be used for the given architecture.\n\nLet's do that by default now, but still allow to build the other pipeline\nhandlers if needed, by using the `pipelines` meson option. For example:\n\n  $ meson build\n  ...\n    Configuration\n    Enabled pipelines        : ipu3\n                               simple\n                               uvcvideo\n    Enabled IPA modules      : ipu3\n  ...\n\n  $ meson build -Dpipelines=\"ipu3,raspberrypi,rkisp1\" -Dtest=true\n  ...\n    Configuration\n    Enabled pipelines        : ipu3\n                               raspberrypi\n                               rkisp1\n                               vimc\n    Enabled IPA modules      : ipu3\n                               raspberrypi\n                               rkisp1\n                               vimc\n  ...\n\nSuggested-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\nSigned-off-by: Javier Martinez Canillas <javierm@redhat.com>\nReviewed-by: Umang Jain <umang.jain@ideasonboard.com>\nReviewed-by: Paul Elder <paul.elder@ideasonboard.com>\n---\n\nChanges in v2:\n- Add collected reviewed-by tags.\n- Don't include ipu3 pipeline handler for aarch64 (pinchartl).\n- Only include the simple pipeline handler for arm and aarch64 (pinchartl).\n- Remove spaces in pipelines meson option description (pinchartl).\n- Wrap pipelines meson option choice list (pinchartl).\n\n meson.build       | 17 +++++++++++++++++\n meson_options.txt | 14 ++++++++++++--\n 2 files changed, 29 insertions(+), 2 deletions(-)","diff":"diff --git a/meson.build b/meson.build\nindex d02f9917965c..df9099d0b996 100644\n--- a/meson.build\n+++ b/meson.build\n@@ -164,6 +164,23 @@ liblttng = dependency('lttng-ust', required : get_option('tracing'))\n # are enabled.\n pipelines = get_option('pipelines')\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+endif\n+\n if get_option('test') and 'vimc' not in pipelines\n     message('Enabling vimc pipeline handler to support tests')\n     pipelines += ['vimc']\ndiff --git a/meson_options.txt b/meson_options.txt\nindex 1ba6778ce257..1a68bcd37e88 100644\n--- a/meson_options.txt\n+++ b/meson_options.txt\n@@ -37,8 +37,18 @@ option('lc-compliance',\n \n option('pipelines',\n         type : 'array',\n-        choices : ['imx8-isi', 'ipu3', 'raspberrypi', 'rkisp1', 'simple', 'uvcvideo', 'vimc'],\n-        description : 'Select which pipeline handlers to include')\n+        value : ['auto'],\n+        choices : [\n+            'auto',\n+            'imx8-isi',\n+            'ipu3',\n+            'raspberrypi',\n+            'rkisp1',\n+            'simple',\n+            'uvcvideo',\n+            'vimc'\n+        ],\n+        description : 'Select which pipeline handlers to build. If it this set to auto, all the pipelines applicable to the target architecture will be built.')\n \n option('qcam',\n         type : 'feature',\n","prefixes":["libcamera-devel","v2"]}