From patchwork Sat Dec 24 10:28:28 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: 18055 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 7BD37C3200 for ; Sat, 24 Dec 2022 10:28:55 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C0631625CC; Sat, 24 Dec 2022 11:28:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1671877734; bh=rbnzsZn6OEa9IOkRlH0W5fVajtMn0hg2Zc2ttkJoMTI=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=hM4jYxf7FoaIDHmSEt7IZIoMReCt5SBAghF15QgjHXT4fwC9OMJ2/1sZgTctyJiok v62fV2X1pbSuKSgKQvIEQ9uZqTikKjhWXavn/A1mgucNGzaeoJ+51YPeziTjjuC0fj U/H9NmeK4nk6wpbyvL4ilDzkuQ/+gfIwOSfgGlIAMS80KI28qH+csHSKudn5AhH48P Xan5lbCio1csjXp+Qx4uq3U20fb8TYJlBhUGqPn8Ej7Ffy1BPt/qbPeRBiCmFx35Ds yaSiRU7m5T1u0LnTXjDlVrhGNG1LlXDsYkqUI3/Eo8n4scIe5VdqscBmDkGf6RT7hZ Me9DyPNhGuYew== 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 98056625C8 for ; Sat, 24 Dec 2022 11:28:53 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="LeV+fy4d"; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1671877732; 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=RVHpS7VQrhLYabdj4qqkJpHchoBR4i1FP9s5uGjwaVY=; b=LeV+fy4dxsRtEVVdaX7i+odVcPhV3Oe0lV9gFk2brT3WjReHL8ckGDg5B3QSkQ5CDLbb/O 9t+cwHx+DxrdDsMUprr17MCqJ/ZrTCOSV0YF/buWiYQSCwlvfoWwKgZac5xFzxKanu+CoM eV2QazRknzF6ed1czfz7Sn69gayUKp4= 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-370-6dCZ5hOrM0-qe3MyXhkuwg-1; Sat, 24 Dec 2022 05:28:51 -0500 X-MC-Unique: 6dCZ5hOrM0-qe3MyXhkuwg-1 Received: by mail-wm1-f69.google.com with SMTP id bi19-20020a05600c3d9300b003cf9d6c4016so5134121wmb.8 for ; Sat, 24 Dec 2022 02:28:51 -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=RVHpS7VQrhLYabdj4qqkJpHchoBR4i1FP9s5uGjwaVY=; b=Te/DzXN1QoZVosIR+aluaHfV78EgCuwsPRDHPaJGaTONKSMm/kOUp6H6WH3ngD2poC YhBonivlsp8LxdjZPmmvChHDZRY5BzAmKg1IXb9wUfPXGR/9CXpvweMNRyFAUT5jMNsm 9oXvYa4G4nf+PzWred+RLpgs8h4I/scr63Y7JWF+e4N2exIJ2PESmTzRW16fnEBxiBcn KzvXyGxQsKxJGvfZoNlg/x82KKo31SYd/IpS2YvM62zNO/gWKuTPZhGhb6FnACCMl3Ia c6wEFf1un9qXAryt/jrBCwVGRT2Ww1BlrAVJwMXAx/i+jlZWOYqIXVWtD/H9i1J3OUP4 nMbg== X-Gm-Message-State: AFqh2krbp/iDiGpe6gwZrF60LrjPGcA00YvO+WCHIYU21WY9+BQS1flk HV0fz1VM93i2QW4dGh3ed9WMZSW/pGanEqhVhnsmyLo51xfq6FIc/kAe5G9Mg6Ac5mh9EJtm61s c7WmSUwGp6EbbVsmOz6+zrJU2cAcF9+4foDStTd+WWXrqHo/prHQwShTboWWNqGhYCIaYktD+69 r1CW7b2nhN X-Received: by 2002:adf:c751:0:b0:273:e357:1ca with SMTP id b17-20020adfc751000000b00273e35701camr4100712wrh.67.1671877729811; Sat, 24 Dec 2022 02:28:49 -0800 (PST) X-Google-Smtp-Source: AMrXdXs0DSNcqn2FFbZUrdQgRDygGQ8pw+C2Q2nmKW88Kx2wNPQfPOR5yGWrkbxSri9ezu2ZmLoCRQ== X-Received: by 2002:adf:c751:0:b0:273:e357:1ca with SMTP id b17-20020adfc751000000b00273e35701camr4100700wrh.67.1671877729488; Sat, 24 Dec 2022 02:28:49 -0800 (PST) Received: from minerva.home (205.pool92-176-231.dynamic.orange.es. [92.176.231.205]) by smtp.gmail.com with ESMTPSA id m15-20020a056000008f00b00267e918d1ecsm5204280wrx.24.2022.12.24.02.28.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Dec 2022 02:28:48 -0800 (PST) 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 Subject: [libcamera-devel] [PATCH v2] 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 Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- Changes in v2: - Add collected reviewed-by tags. - Don't include ipu3 pipeline handler for aarch64 (pinchartl). - Only include the simple pipeline handler for arm and aarch64 (pinchartl). - Remove spaces in pipelines meson option description (pinchartl). - Wrap pipelines meson option choice list (pinchartl). meson.build | 17 +++++++++++++++++ meson_options.txt | 14 ++++++++++++-- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index d02f9917965c..df9099d0b996 100644 --- a/meson.build +++ b/meson.build @@ -164,6 +164,23 @@ liblttng = dependency('lttng-ust', required : get_option('tracing')) # are enabled. pipelines = get_option('pipelines') +if pipelines.contains('auto') + host_cpu = host_machine.cpu_family() + pipelines = [] + if host_cpu == 'x86' or host_cpu == 'x86_64' + pipelines += ['ipu3'] + elif host_cpu == 'aarch64' + pipelines += ['imx8-isi', 'rkisp1'] + endif + + if host_cpu == 'arm' or host_cpu == 'aarch64' + pipelines += ['raspberrypi', 'simple'] + endif + + # Always include the uvcvideo pipeline handler. + pipelines += ['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..1a68bcd37e88 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -37,8 +37,18 @@ 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 it this set to auto, all the pipelines applicable to the target architecture will be built.') option('qcam', type : 'feature',