From patchwork Fri Oct 6 13:19:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 19115 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 7E8AFC32B7 for ; Fri, 6 Oct 2023 13:20:17 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 1211862991; Fri, 6 Oct 2023 15:20:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1696598417; bh=pkyf9QZ03S+r76EzK4eUM9gZP+AGWiIsUDgMjJi2Gp8=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=YXokXVGgGa+7syzBGkpN0NcsfNQiZvtr7gW0F44mPjUT5Eg0MgNeTnLIN+0TugvCW W3JRyS4WklaP8+loJzccDhLt/7jAETiOrB7uqArcNAiR2Y7iYHqCCafsqfYzZX0LwL s/nzMR2cdoM+d6KlJSBiGZ0OZho3WkDRUlm6Hay9Y33P5FobqfhQiQ3WfCJC92/Qgr 1E4ReBgKcRv1RKiA2FmfKpq81r2bMfoR47JKJgmXmVAulUa3kPXcn7uuRAq+6PgSvh Ahq3yuDxY9lLOxW8+J621cD7wHbYQFP1QDt+FGR5hccJvmIrzJ+JDCJzOT34bxlCPE StKj88RPNzocg== Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 9FC8F62970 for ; Fri, 6 Oct 2023 15:20:13 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="e8nP080N"; dkim-atps=neutral Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-405505b07dfso19729895e9.0 for ; Fri, 06 Oct 2023 06:20:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1696598413; x=1697203213; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6yici5UMvvwYWxOu71VoDQY6+Vl9nnQ+jk7k7pxhCEs=; b=e8nP080Nj63Vgi2oEn8WaSCmnOQJdLqltvujUcYEZe7BcqmRKqLx9h/SVe7pxkbWDb vttNnhaPyi2LdM497xkUnGqIErsojL9z2waSySl+wrKGkqZDHaez6ZAm3RYFBMKwfiIl k9bre5XW83WuW1wImcmcNh2sALEIqqDRWl//vC40pkgPDHqcTMsLuHfc77qOy7wgv2MZ T0af5CrzFd2v0kb+zHLLd0NAYBmOkHqyZsXj7ZqhS0G277JlbpNArzeCzHwb+fCMPDrM flaHRICbdU/Hxqc4lhoqZmwcZLcfap7XrNPYL1cK7ZQi1ViPhAt06aQKHrBj+PkyJ7N9 q/eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696598413; x=1697203213; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6yici5UMvvwYWxOu71VoDQY6+Vl9nnQ+jk7k7pxhCEs=; b=UojDQF3Ri/kruS6WirY8qfDRrrapZke+cD8W1JPBGhjCS0ynO4wO4odtqyT+qV3mE+ 3yIRHEzrWr+26YGSSVOPgp2buvphgweWw4VDW040wQ4QLU0/s1QiXn5a6gCatqLDfKqM 7pnh+h2qoaO5QSLaOp1RGt2kEAmKZII50e72Wl5mWFJX99qjq61t9X5Ocl5gOuCRSv1t UsdRdImnmLFIbQ1PxHK0gtzV4PuI3JAtIKevp76Hfq17d4d5zJR2qb+xpMq5s1id7h7x f1AeGa2ykAn5DvS9AMmp+OL3w43Bbd7g4CYuJxoO4ju4c2YOpglBjlqy4OS7ONjL02tV sgRw== X-Gm-Message-State: AOJu0Yw40fM2nCViOw0DfGxaq3sfyC+A6+H31lGJn9/IGFdlZHdriu4l L7gRva7p+tzsuD1yJ530NQtAXBbVkYsojrjD9WtK3A== X-Google-Smtp-Source: AGHT+IHC+1xE9nXQCA0MH9oeoprxCLiGDMpuTwuDRyjEnnIqcGktT+SwUzGR9B2JNkFFFOxmLBhg+w== X-Received: by 2002:a5d:6b92:0:b0:31f:e02b:18ae with SMTP id n18-20020a5d6b92000000b0031fe02b18aemr4330483wrx.24.1696598412976; Fri, 06 Oct 2023 06:20:12 -0700 (PDT) Received: from localhost.localdomain ([93.93.133.154]) by smtp.gmail.com with ESMTPSA id m8-20020a056000180800b00321773bb933sm1639478wrh.77.2023.10.06.06.20.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 06:20:12 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Fri, 6 Oct 2023 14:19:53 +0100 Message-Id: <20231006132000.23504-14-naush@raspberrypi.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231006132000.23504-1-naush@raspberrypi.com> References: <20231006132000.23504-1-naush@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 13/20] build: ipa: Fix bug in building multiple IPA interfaces with the same mojom file 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: Naushir Patuck via libcamera-devel From: Naushir Patuck Reply-To: Naushir Patuck Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" In the existing meson scripts, an IPA mojom interface file may not be built if: - There are duplicate entries for the mojom file shared by different pipeline handlers in pipeline_ipa_mojom_mapping, and - The IPA is not listed first in pipeline_ipa_mojom_mapping, and - The first listed IPA for the given mojom file is not selected in the build. Fix this by using a separate list of already built mojom files (mojoms_built) instead of overloading use of the existing ipa_mojom_files list. Now, ipa_mojom_files gets filled in outside of the IPA list enumeration loop. Fixes: 312e9910ba2e ("meson: ipa: Add mapping for pipeline handler to mojom interface file") Signed-off-by: Naushir Patuck Reviewed-by: David Plowman --- include/libcamera/ipa/meson.build | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/include/libcamera/ipa/meson.build b/include/libcamera/ipa/meson.build index e72803b4e243..f3b4881c9c91 100644 --- a/include/libcamera/ipa/meson.build +++ b/include/libcamera/ipa/meson.build @@ -68,29 +68,28 @@ pipeline_ipa_mojom_mapping = { 'vimc': 'vimc.mojom', } -ipa_mojom_files = [] -ipa_mojoms = [] - # # Generate headers from templates. # # TODO Define per-pipeline ControlInfoMap with yaml? +ipa_mojoms = [] +mojoms_built = [] foreach pipeline, file : pipeline_ipa_mojom_mapping name = file.split('.')[0] - # Ensure we do not build duplicate mojom modules - if file in ipa_mojom_files + # Avoid building duplicate mojom interfaces with the same interface file + if name in mojoms_built continue endif - ipa_mojom_files += file - if pipeline not in pipelines continue endif + mojoms_built += name + # {interface}.mojom-module mojom = custom_target(name + '_mojom_module', input : file, @@ -155,6 +154,12 @@ foreach pipeline, file : pipeline_ipa_mojom_mapping libcamera_generated_ipa_headers += [header, serializer, proxy_header] endforeach +ipa_mojom_files = [] +foreach pipeline, file : pipeline_ipa_mojom_mapping + if file not in ipa_mojom_files + ipa_mojom_files += file + endif +endforeach ipa_mojom_files = files(ipa_mojom_files) # Pass this to the documentation generator in src/libcamera/ipa