From patchwork Tue Apr 7 15:33:50 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 26445 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 E2DD1C32F6 for ; Tue, 7 Apr 2026 15:34:41 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 6E18D62DB5; Tue, 7 Apr 2026 17:34:40 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="RTNNa+9A"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 562A262D9D for ; Tue, 7 Apr 2026 17:34:35 +0200 (CEST) Received: from killaraus.ideasonboard.com (2001-14ba-703d-e500--2a1.rev.dnainternet.fi [IPv6:2001:14ba:703d:e500::2a1]) by perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id CC8836A6 for ; Tue, 7 Apr 2026 17:33:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1775575987; bh=hBpMyS0YxcY9DSFeNBS4rsFhthcjbfeuWaM0OnFgi3I=; h=From:To:Subject:Date:In-Reply-To:References:From; b=RTNNa+9AwzKIjiZtzIAP08LDosojbGQlVx7W2d+I7PpXfu/OjygofIPTFnwvreo5e VkXIJx2j1apXpB7tJWtV2oUdz3QekzvpGqWYoMgsOWVmS4QWNdYdpqYch7c4xGLi7c q06dbV2cj2fWpQTlQZRpDe2ANkDUpApUHgcwIo3A= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [PATCH v2 05/42] test: ipa: ipa_interface: Use IPAManager::createIPA() Date: Tue, 7 Apr 2026 18:33:50 +0300 Message-ID: <20260407153427.1825999-6-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260407153427.1825999-1-laurent.pinchart@ideasonboard.com> References: <20260407153427.1825999-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 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: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The goal of ipa_interface is to unit test the IPA interface. It currently creates the IPA proxy through the higher level PipelineHandler class. Use the IPAManager::createIPA() function instead to keep the focus on the components that were meant to be tested. Signed-off-by: Laurent Pinchart Reviewed-by: Barnabás Pőcze --- test/ipa/ipa_interface_test.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/test/ipa/ipa_interface_test.cpp b/test/ipa/ipa_interface_test.cpp index ccff6ac106c8..41ef81721bfa 100644 --- a/test/ipa/ipa_interface_test.cpp +++ b/test/ipa/ipa_interface_test.cpp @@ -22,6 +22,8 @@ #include "libcamera/internal/camera_manager.h" #include "libcamera/internal/device_enumerator.h" +#include "libcamera/internal/global_configuration.h" +#include "libcamera/internal/ipa_manager.h" #include "libcamera/internal/ipa_module.h" #include "libcamera/internal/pipeline_handler.h" @@ -43,6 +45,8 @@ public: { delete notifier_; ipa_.reset(); + ipaManager_.reset(); + config_.reset(); cameraManager_.reset(); } @@ -90,6 +94,10 @@ protected: notifier_ = new EventNotifier(fd_, EventNotifier::Read, this); notifier_->activated.connect(this, &IPAInterfaceTest::readTrace); + /* Create the IPA manager. */ + config_ = std::make_unique(); + ipaManager_ = std::make_unique(*config_); + return TestPass; } @@ -98,7 +106,7 @@ protected: EventDispatcher *dispatcher = thread()->eventDispatcher(); Timer timer; - ipa_ = pipe_->createIPA(0, 0); + ipa_ = ipaManager_->createIPA(pipe_.get(), 0, 0); if (!ipa_) { cerr << "Failed to create VIMC IPA interface" << endl; return TestFail; @@ -173,6 +181,8 @@ private: std::shared_ptr pipe_; std::unique_ptr ipa_; std::unique_ptr cameraManager_; + std::unique_ptr config_; + std::unique_ptr ipaManager_; enum ipa::vimc::IPAOperationCode trace_; EventNotifier *notifier_; int fd_;