From patchwork Mon May 1 15:55:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 18578 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 9F906C327D for ; Mon, 1 May 2023 15:55:15 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 62ACD633B5; Mon, 1 May 2023 17:55:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1682956514; bh=5bIdp2VL87GMBjCEWZrG2smdw7KJWc/bHMvFZjQYvQQ=; 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=DqR/vH0Ra+4JqsFqAkMufQSvsv/HsXeSIwptFym8uA+uWBmhyleWbdekkQyYWTUkX yUiCsh8Qy7WmKagST8vy1HWIiD3JEF0ohUyUriSNZDJ+rQRm6UVkuJO6x4pZXXqeaR wb3MtoYTZXNI5LvxJ4tRHCy4XNYh3rlsplMZhPeVKQLzAeMO6ermxDnNaOti/f4jJW 1XGFh24fDFAOrC7lkhJnBHS7DEOMu8PkjVmfRe4bLyd7Z7O1HyXdM876Xz0T0c+Lhu QRyanNRIosSSBixlew/x9JfCF7KxkoFBnxMrRHrVwP+FHlBtHduH3mnHkJEXZEsSIy 5dfrWVUfFfltA== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 6E16E633AC for ; Mon, 1 May 2023 17:55:12 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="K+OeNp23"; dkim-atps=neutral Received: from Monstersaurus.local (aztw-30-b2-v4wan-166917-cust845.vm26.cable.virginm.net [82.37.23.78]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id DB2B6A06; Mon, 1 May 2023 17:55:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1682956511; bh=5bIdp2VL87GMBjCEWZrG2smdw7KJWc/bHMvFZjQYvQQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K+OeNp23jVSv+1z7RaulXnpjTudmzhtBUSnd+YQ0/W4g9H6bcGsDbb0V4UR0b2J+D oQLPGzp+Q4Esxoxq53uJwGbXjQKL00JkIJdyHLYseFr+CV6t5uhEzZgKH9/XRCdHie 4zLXpUNwjEeBx87gRKIffqEQhST0vregFz8bgIoM= To: libcamera devel Date: Mon, 1 May 2023 16:55:06 +0100 Message-Id: <20230501155507.116039-2-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230501155507.116039-1-kieran.bingham@ideasonboard.com> References: <20230501155507.116039-1-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 1/2] libcamera: ipa_manager: Only parse IPA modules 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: Kieran Bingham via libcamera-devel From: Kieran Bingham Reply-To: Kieran Bingham Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Ensure that when we iterate the libcamera libdir we only select shared objects which are expected to be IPA modules, with an ipa_ prefix. Any shared object not matching this filter is ignored and not processed by the IPA Manager. Signed-off-by: Kieran Bingham Reviewed-by: Javier Martinez Canillas --- src/libcamera/ipa_manager.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libcamera/ipa_manager.cpp b/src/libcamera/ipa_manager.cpp index 030ef43fb994..c0c2f027e902 100644 --- a/src/libcamera/ipa_manager.cpp +++ b/src/libcamera/ipa_manager.cpp @@ -206,6 +206,10 @@ void IPAManager::parseDir(const char *libDir, unsigned int maxDepth, if (strcmp(&ent->d_name[offset], ".so")) continue; + /* Ignore any modules which are not IPAs. */ + if (strncmp(ent->d_name, "ipa_", 4) != 0) + continue; + files.push_back(std::string(libDir) + "/" + ent->d_name); } From patchwork Mon May 1 15:55:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 18579 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 5BDD9BDCBD for ; Mon, 1 May 2023 15:55:16 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C9C88633BB; Mon, 1 May 2023 17:55:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1682956514; bh=SMLndzRoIbU1vl+54Oig7aRQT0Y1O+JSgFNI0tdtK3c=; 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=PE0wK9rNZp4QA+s3J5yZ20yzAU2i11ZVYwQ1BiQqoHqaJFTRhqBKi+dVjr2oRhoQ4 tPEz97Bxl2TcXMJo9RadhNv0tWyBI/v1HA7b9Qo1nUWR/UVSE8Kz/DwWlFlf0HEkHg 6W5meR+wF6n2Mf5tNmC5TtkHdwhdp96E50mAUad8kSIwslCr6rxjI4rsaWLbp8tIds CL0kwiJP5Gg9e7JO15n5prBZ8YVkqNHbhevbUSn3elPTbspx+29d+bx7YDP8RMQ3lx dIM9+c7kSzHc6GZOmeuTM0rF6i6hLo2CqmVF8nsPc5RhtElMusOQkdZKjKJWccLPS8 awxrdO2ZA40Ig== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id A0651633A8 for ; Mon, 1 May 2023 17:55:12 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="ve1A+sW2"; dkim-atps=neutral Received: from Monstersaurus.local (aztw-30-b2-v4wan-166917-cust845.vm26.cable.virginm.net [82.37.23.78]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 2F0AAA1A; Mon, 1 May 2023 17:55:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1682956511; bh=SMLndzRoIbU1vl+54Oig7aRQT0Y1O+JSgFNI0tdtK3c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ve1A+sW2JE5jhYMmOcwPtQ6ppj5CN8orQm4EK6F7RjVbLWUnRZnASxtsGkynw3DI3 tXVoeJ9LIdKDVLPT9obhCnG2Yymz1cklvY25r6NP3XKdm5y1fNXPsq2/3gBwW4dSqR ruzZ8U3Rmoo4KV49TtRBGa8DVz9Vk+3coLdqppos= To: libcamera devel Date: Mon, 1 May 2023 16:55:07 +0100 Message-Id: <20230501155507.116039-3-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230501155507.116039-1-kieran.bingham@ideasonboard.com> References: <20230501155507.116039-1-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 2/2] v4l2: Move the v4l2-compat to libcamera/ 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: Kieran Bingham via libcamera-devel From: Kieran Bingham Reply-To: Kieran Bingham Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Move the v4l2-compat.so shared library installation to the libcamera library directory. This is the same location that IPA modules live and will allow the 'generically sounding' v4l2-compat.so to be more clearly identified as a libcamera compatibility layer. Signed-off-by: Kieran Bingham Reviewed-by: Javier Martinez Canillas --- We could also rename this to libcamera-v4l2-compat.so, and/or we could also re-consider whether the libcamera-hal.so file should also live under the libcamera/ libdir by default. src/v4l2/meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/v4l2/meson.build b/src/v4l2/meson.build index f132103cb503..114fddf7302a 100644 --- a/src/v4l2/meson.build +++ b/src/v4l2/meson.build @@ -31,6 +31,7 @@ v4l2_compat = shared_library('v4l2-compat', v4l2_compat_sources, name_prefix : '', install : true, + install_dir : libcamera_libdir, dependencies : [libcamera_private, libdl], cpp_args : v4l2_compat_cpp_args) @@ -38,7 +39,7 @@ v4l2_compat = shared_library('v4l2-compat', # adaptation layer. cdata = configuration_data() -cdata.set('LIBCAMERA_V4L2_SO', get_option('prefix') / get_option('libdir') / 'v4l2-compat.so') +cdata.set('LIBCAMERA_V4L2_SO', get_option('prefix') / libcamera_libdir / 'v4l2-compat.so') configure_file(input : 'libcamerify.in', output : 'libcamerify',