From patchwork Tue Jan 13 00:07:37 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 25725 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 D7F66BDCBF for ; Tue, 13 Jan 2026 00:08:40 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 98A8161FC8; Tue, 13 Jan 2026 01:08:40 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="tU2gSDhA"; dkim-atps=neutral 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 737AE61FBC for ; Tue, 13 Jan 2026 01:08:37 +0100 (CET) Received: from pendragon.ideasonboard.com (81-175-209-152.bb.dnainternet.fi [81.175.209.152]) by perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id CB3BABCA for ; Tue, 13 Jan 2026 01:08:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1768262891; bh=XSnOQ+wvfNYabmcowHyySKCq4yHGxSaKkoTmkcm2RG4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=tU2gSDhAgdNRVbx0MWPMlDlgDzfoRJLOl8ODQsTlXm/nJuRsHbAH2+wErVBWm3YQE Yc5U7NJmE7ocx37hn6UncDz4tbOxd3tMSc+dWL6bAIADULXjd7k+DCv88Rtg3Yiokr fVMLSmYZDQ0RKSHWHpgOBJJmPC1pYTsDshibSZmc= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Subject: [PATCH 05/36] test: ipa: ipa_interface: Use IPAManager::createIPA() Date: Tue, 13 Jan 2026 02:07:37 +0200 Message-ID: <20260113000808.15395-6-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.51.2 In-Reply-To: <20260113000808.15395-1-laurent.pinchart@ideasonboard.com> References: <20260113000808.15395-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(-) -- Regards, Laurent Pinchart 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_;