From patchwork Fri Dec 23 08:22:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martinez Canillas X-Patchwork-Id: 18053 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 9CFC1BD78E for ; Fri, 23 Dec 2022 08:23:02 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 093C7633AC; Fri, 23 Dec 2022 09:23:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1671783782; bh=qjs8tI5yV+o4xnfE6oiPZys/CEGMhXyprZMB/4QOBZc=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=g/dJzjxhiXSzTgHTtmI74AFy6nXu/1LGriN9ANBQOIj37wTT8bhL+z/VMCfc0ZE1f N20sE/rYWlReVEH/jwdiSiUnWEik649yYtilwcVpgMJVhHJtaVurP3iB8ax28W2lKC l054xZnz+1DFPi9BqOoMZVfuwI6Q3kr3AHr9hUGcVDfAy5Mn1FhT/HFtmKlgoZ+tRf h21Wjf1MQUZkEnAhAVJ0kiWPwZ0sMsuTXPkXp4j1BFZC32mHSfas7jDbFkzL029FMC vbHRFC6qrYHmy2MChB94eVLotvMRSIs49YU6BVcQv4stT1mJab3X8UQynp5w4gD2of Z0IYJdsseLcCg== Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 8EE9E6339D for ; Fri, 23 Dec 2022 09:22:59 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="UXTXU2kh"; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1671783778; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F7RSiprDs5BAPOtNBMZDFJDd+c8Lsho3AqYziGvxrGE=; b=UXTXU2khFZwUMFVUcVbtXFnFdfGmncZAO+g1OjgCkNKdsVFJAL02pZLuz02gqBnNsl8a3s HepXkchc9imoLPKjr+bZDIyeUvpZ55pvTJZy3JbRmPBiv16gLHH+0ZHl/PsHQAfZVzyXtT WsZzoR4UKQxUyFVVKtk2CwSIV2RkUq0= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-44-jCLkjBYWNlyj4pAsDFcG6Q-1; Fri, 23 Dec 2022 03:22:49 -0500 X-MC-Unique: jCLkjBYWNlyj4pAsDFcG6Q-1 Received: by mail-wm1-f69.google.com with SMTP id m8-20020a05600c3b0800b003d96bdce12fso202769wms.9 for ; Fri, 23 Dec 2022 00:22:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=F7RSiprDs5BAPOtNBMZDFJDd+c8Lsho3AqYziGvxrGE=; b=M4hwSK0bq9wRdOM3dMTNuBCs1Udq7PpfvcWUdqky3xRFCkxE1Szu+QqfyGP9gjxV/C 7YiiGHtwNVpOaaXUaI5F+nD97WIWxTmVWQbITNEAT3JjZ5DwlFjq7qBfOMRiSHQK3D24 CK/uM3x7ZC/RoPgsX5yEUxl+z2wtt+BT8zxFiQ96xWOMBkgXvuIYNQ6O3tbc6GpLdKq1 7S2UdM2fgbk9+hdqMUeZHgh94VYq0lQv5xwp5hPnovSXSjMdjAP2lAxWjWWARB3fhZRa XevdQrcbktP8xzU+S+Yluh/CZVYXUR0d3XoJoXA14b14NIT8qOBe9k1m7E3aCK6ldoPY B0Fw== X-Gm-Message-State: AFqh2kq00mmoxpovqQolPcy3oP1zXWDybhHAe8uT76n+iSLPyzSX9Gv9 T7VvTnuE5zc9anbkjiQyVi4iO1zLUt610+Aa8pGFPqA/Uc2OrC6UFxMoCJ+yqEMdZCuk1BmH8GS oQ68Uti3fx7B6jmZaESfc/lAZkJhSTVghYSxRZYPBQecmL8xAV9gPciy6OtyEkmcsVTLAIBxxAq pRtPvOvBJw X-Received: by 2002:adf:cf04:0:b0:242:3be9:71c5 with SMTP id o4-20020adfcf04000000b002423be971c5mr4740968wrj.54.1671783768617; Fri, 23 Dec 2022 00:22:48 -0800 (PST) X-Google-Smtp-Source: AMrXdXs/tA3ZS0bVwZCzCrhRHlkd6lvYn8ICzIsIOMXF5B2AfHgRwnlJBQYSWDJkOdK71s5t+yHyIw== X-Received: by 2002:adf:cf04:0:b0:242:3be9:71c5 with SMTP id o4-20020adfcf04000000b002423be971c5mr4740953wrj.54.1671783768293; Fri, 23 Dec 2022 00:22:48 -0800 (PST) Received: from minerva.home (205.pool92-176-231.dynamic.orange.es. [92.176.231.205]) by smtp.gmail.com with ESMTPSA id c4-20020a5d4f04000000b002365cd93d05sm2464672wru.102.2022.12.23.00.22.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Dec 2022 00:22:47 -0800 (PST) To: libcamera-devel@lists.libcamera.org Date: Fri, 23 Dec 2022 09:22:29 +0100 Message-Id: <20221223082229.2559907-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 Subject: [libcamera-devel] [PATCH] meson: Only build pipeline handlers needed in the host architecture X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Javier Martinez Canillas via libcamera-devel From: Javier Martinez Canillas Reply-To: Javier Martinez Canillas Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" By default all pipeline handlers are built, regardless on whether these are needed in the host architecture or not. It makes more sense to build only the pipeline handlers that will be used for the given architecture. Let's do that by default now, but still allow to build the other pipeline handlers if needed, by using the `pipelines` meson option. For example: $ meson build ... Configuration Enabled pipelines : ipu3 simple uvcvideo Enabled IPA modules : ipu3 ... $ meson build -Dpipelines="ipu3,raspberrypi,rkisp1" -Dtest=true ... Configuration Enabled pipelines : ipu3 raspberrypi rkisp1 vimc Enabled IPA modules : ipu3 raspberrypi rkisp1 vimc ... Suggested-by: Kieran Bingham Signed-off-by: Javier Martinez Canillas Reviewed-by: Umang Jain Reviewed-by: Paul Elder --- meson.build | 14 ++++++++++++++ meson_options.txt | 6 ++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index d02f9917965c..fc1023326ed3 100644 --- a/meson.build +++ b/meson.build @@ -164,6 +164,20 @@ liblttng = dependency('lttng-ust', required : get_option('tracing')) # are enabled. pipelines = get_option('pipelines') +if pipelines.contains('auto') + host_cpu = host_machine.cpu_family() + if host_cpu == 'x86' or host_cpu == 'x86_64' + pipelines = ['ipu3'] + elif host_cpu == 'aarch64' + pipelines = ['imx8-isi', 'ipu3', 'raspberrypi', 'rkisp1'] + elif host_cpu == 'arm' + pipelines = ['raspberrypi'] + endif + + # Always include the simple and uvcvideo pipeline handlers. + pipelines += ['simple', 'uvcvideo'] +endif + if get_option('test') and 'vimc' not in pipelines message('Enabling vimc pipeline handler to support tests') pipelines += ['vimc'] diff --git a/meson_options.txt b/meson_options.txt index 1ba6778ce257..23505805de41 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -37,8 +37,10 @@ option('lc-compliance', option('pipelines', type : 'array', - choices : ['imx8-isi', 'ipu3', 'raspberrypi', 'rkisp1', 'simple', 'uvcvideo', 'vimc'], - description : 'Select which pipeline handlers to include') + value : ['auto'], + choices : ['auto', 'imx8-isi', 'ipu3', 'raspberrypi', 'rkisp1', 'simple', 'uvcvideo', 'vimc'], + description : '''Select which pipeline handlers to build. If this is set to auto, all + the pipelines applicable to the target architecture will be built.''') option('qcam', type : 'feature',