From patchwork Mon Apr 27 03:17:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 3561 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 3853860AF8 for ; Mon, 27 Apr 2020 05:17:36 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="AdWkkMyM"; dkim-atps=neutral Received: from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id C972272C for ; Mon, 27 Apr 2020 05:17:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1587957455; bh=XxIr00FoNnsz5gVRWHpiQJEwQ6zWN3rNCXKODoLdKME=; h=From:To:Subject:Date:In-Reply-To:References:From; b=AdWkkMyMU9zJin7vEIb4DkbR8Sby04GYATvS10Eb1GTzBaAFvrp6gFjmwcB3huP5/ 1OxD4ejHkRk09Al8Q/z0AXIIAi6K+rU1CEaJHttmwC8vVLiRr93aROrjTtQmRMRxLb YUlszIs89gvgddor0zBuYqThSRjVPkc9iFFNwEeI= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Mon, 27 Apr 2020 06:17:11 +0300 Message-Id: <20200427031713.14013-10-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.25.3 In-Reply-To: <20200427031713.14013-1-laurent.pinchart@ideasonboard.com> References: <20200427031713.14013-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 09/11] libcamera: pipeline: vimc: Pass configuration file to IPA init() 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-List-Received-Date: Mon, 27 Apr 2020 03:17:39 -0000 Pass the vimc IPA dummy configuration file to the IPA init() function. This will be used by the IPA to validate the init() call. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Reviewed-by: Kieran Bingham --- src/libcamera/pipeline/vimc/vimc.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/libcamera/pipeline/vimc/vimc.cpp b/src/libcamera/pipeline/vimc/vimc.cpp index 699f788aa1b8..ec3ee7241cdf 100644 --- a/src/libcamera/pipeline/vimc/vimc.cpp +++ b/src/libcamera/pipeline/vimc/vimc.cpp @@ -371,10 +371,12 @@ bool PipelineHandlerVimc::match(DeviceEnumerator *enumerator) std::unique_ptr data = std::make_unique(this); data->ipa_ = IPAManager::instance()->createIPA(this, 0, 0); - if (data->ipa_ == nullptr) + if (data->ipa_ != nullptr) { + std::string conf = data->ipa_->configurationFile("vimc.conf"); + data->ipa_->init(IPASettings{ conf }); + } else { LOG(VIMC, Warning) << "no matching IPA found"; - else - data->ipa_->init(IPASettings{}); + } /* Locate and open the capture video node. */ if (data->init(media))