From patchwork Wed Jun 5 00:53:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 1348 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 6B4F464713 for ; Wed, 5 Jun 2019 02:53:27 +0200 (CEST) Received: from localhost.localdomain (unknown [96.44.9.117]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id B033A2D1; Wed, 5 Jun 2019 02:53:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1559696007; bh=CK1dEeHk1LpxqTIs4C2hF+nejxOBjUMWpHss40sStic=; h=From:To:Cc:Subject:Date:From; b=QmtS/Eh+CvlZHZ5siUiZqSePtENKBCLF8x+ts9BhSa+evK05uQ+KzAwWPj5ZU2zTT Y4YaQlfxA6hDT6z5Xko9XOPu62+waWcHxaHx1KuqtUFi+QVT/0G6KbseWE3dQ4akzx rcN4kg5CxTRqMDgNYWVpwgRqstrp67D8vH23uDWg= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Tue, 4 Jun 2019 20:53:06 -0400 Message-Id: <20190605005316.4835-1-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 00/10] Add IPAManager and IPAInterface X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jun 2019 00:53:27 -0000 Pipeline handlers need a way to acquire an IPA module. To achieve this, we use an IPA manager, that loads many IPA modules, after which a pipeline handler can ask the IPA manager for an IPA module that matches it. Each IPA can only be used with one pipeline handler, but a pipeline handler may work with many IPAs (not simultaneously). The pipeline handlers also need names and versions (previously only the factory had a name) to be matched with an IPA module. Each IPA module, in a shared object, implements an IPAInterface class, which defines the interface between a pipeline hander and an IPA implementation, hence the name. Changes in v3: - remove major and minor pipeline version and replace with a single number - when finding an IPA for a pipeline, the pipeline handler supplies a version range, and the pipeline handler no longer has its own version - pipeline handlers are not 1-to-1 with IPAs, so the generic PipelineHandler class no longer has an IPA member variable Changes in v2: - add PIPELINE_VERSION macro to convert a major minor version pair to a single version number - make the IPA module directory hardcoded to the insallation directory, and read additional paths from an environment variable - pipeline handlers save the IPA that they load Paul Elder (10): libcamera: ipa_interface: add header libcamera: pipeline: add name libcamera: ipa_module_info: update struct to allow IPA matching libcamera: ipa_module: verify IPA module API version upon loading libcamera: ipa_module: allow instantiation of IPAInterface libcamera: ipa_module: match IPA module with pipeline handler libcamera: ipa_manager: implement class for managing IPA modules libcamera: ipa: add dummy IPA implementation libcamera: test: remove test IPA and use dummy IPA instead libcamera: pipeline: vimc: add dummy IPA Documentation/Doxyfile.in | 7 +- include/libcamera/ipa/ipa_interface.h | 22 ++++ include/libcamera/ipa/ipa_module_info.h | 10 +- include/libcamera/meson.build | 1 + src/ipa/ipa_dummy.cpp | 45 +++++++ src/ipa/meson.build | 15 +++ src/libcamera/include/ipa_manager.h | 40 ++++++ src/libcamera/include/ipa_module.h | 17 +++ src/libcamera/include/pipeline_handler.h | 14 ++- src/libcamera/ipa_interface.cpp | 27 ++++ src/libcamera/ipa_manager.cpp | 149 +++++++++++++++++++++++ src/libcamera/ipa_module.cpp | 138 +++++++++++++++++++-- src/libcamera/meson.build | 6 +- src/libcamera/pipeline/vimc.cpp | 11 ++ src/libcamera/pipeline_handler.cpp | 17 +++ src/meson.build | 1 + test/ipa/ipa_test.cpp | 33 +++-- test/ipa/meson.build | 11 -- test/ipa/shared_test.c | 6 - test/ipa/shared_test.cpp | 12 -- test/libtest/test.cpp | 6 + 21 files changed, 526 insertions(+), 62 deletions(-) create mode 100644 include/libcamera/ipa/ipa_interface.h create mode 100644 src/ipa/ipa_dummy.cpp create mode 100644 src/ipa/meson.build create mode 100644 src/libcamera/include/ipa_manager.h create mode 100644 src/libcamera/ipa_interface.cpp create mode 100644 src/libcamera/ipa_manager.cpp delete mode 100644 test/ipa/shared_test.c delete mode 100644 test/ipa/shared_test.cpp