From patchwork Fri Apr 23 06:39:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Michel Hautbois X-Patchwork-Id: 12093 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 ED6ADBDB1A for ; Fri, 23 Apr 2021 06:39:23 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 312D868873; Fri, 23 Apr 2021 08:39:23 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="FKCtpMTI"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id F1CFD68861 for ; Fri, 23 Apr 2021 08:39:21 +0200 (CEST) Received: from localhost.localdomain (unknown [IPv6:2a01:e0a:169:7140:f55f:87fa:7523:c557]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 9C3A1332; Fri, 23 Apr 2021 08:39:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1619159961; bh=sLyDX7RTwC/YtsGjTq7NiDQn57Vo3tsj6x9KYiuciWk=; h=From:To:Cc:Subject:Date:From; b=FKCtpMTIavKIGidofeeKqSkkIZ/GgwNk+JnFliUyeidFJl7L4/cdgCQ9N/S9PV+y9 SbSMmz3qYKzNIHXV6txG4vp8LCIgGtYtuwqyUZpDdX5UnVAX5FohQVfpXdzJw8ndPr 7TTl5U4aW2ze4cMmh5yeusyyWrpwneUAaYKr0aBg= From: Jean-Michel Hautbois To: libcamera-devel@lists.libcamera.org Date: Fri, 23 Apr 2021 08:39:19 +0200 Message-Id: <20210423063919.26273-1-jeanmichel.hautbois@ideasonboard.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] ipa: rkisp1: Move the IPA to the ipa::rkisp1 namespace 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" Simplify name-spacing of the RKISP1 components by placing it in the ipa::rkisp1 namespace directly. Signed-off-by: Jean-Michel Hautbois Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- src/ipa/rkisp1/rkisp1.cpp | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp index 8a57b080..6d45673c 100644 --- a/src/ipa/rkisp1/rkisp1.cpp +++ b/src/ipa/rkisp1/rkisp1.cpp @@ -28,7 +28,9 @@ namespace libcamera { LOG_DEFINE_CATEGORY(IPARkISP1) -class IPARkISP1 : public ipa::rkisp1::IPARkISP1Interface +namespace ipa::rkisp1 { + +class IPARkISP1 : public IPARkISP1Interface { public: int init(unsigned int hwRevision) override; @@ -40,7 +42,7 @@ public: const std::map &entityControls) override; void mapBuffers(const std::vector &buffers) override; void unmapBuffers(const std::vector &ids) override; - void processEvent(const ipa::rkisp1::RkISP1Event &event) override; + void processEvent(const RkISP1Event &event) override; private: void queueRequest(unsigned int frame, rkisp1_params_cfg *params, @@ -171,10 +173,10 @@ void IPARkISP1::unmapBuffers(const std::vector &ids) } } -void IPARkISP1::processEvent(const ipa::rkisp1::RkISP1Event &event) +void IPARkISP1::processEvent(const RkISP1Event &event) { switch (event.op) { - case ipa::rkisp1::EventSignalStatBuffer: { + case EventSignalStatBuffer: { unsigned int frame = event.frame; unsigned int bufferId = event.bufferId; @@ -184,7 +186,7 @@ void IPARkISP1::processEvent(const ipa::rkisp1::RkISP1Event &event) updateStatistics(frame, stats); break; } - case ipa::rkisp1::EventQueueRequest: { + case EventQueueRequest: { unsigned int frame = event.frame; unsigned int bufferId = event.bufferId; @@ -215,8 +217,8 @@ void IPARkISP1::queueRequest(unsigned int frame, rkisp1_params_cfg *params, params->module_en_update = RKISP1_CIF_ISP_MODULE_AEC; } - ipa::rkisp1::RkISP1Action op; - op.op = ipa::rkisp1::ActionParamFilled; + RkISP1Action op; + op.op = ActionParamFilled; queueFrameAction.emit(frame, op); } @@ -268,8 +270,8 @@ void IPARkISP1::updateStatistics(unsigned int frame, void IPARkISP1::setControls(unsigned int frame) { - ipa::rkisp1::RkISP1Action op; - op.op = ipa::rkisp1::ActionV4L2Set; + RkISP1Action op; + op.op = ActionV4L2Set; ControlList ctrls(ctrls_); ctrls.set(V4L2_CID_EXPOSURE, static_cast(exposure_)); @@ -286,13 +288,15 @@ void IPARkISP1::metadataReady(unsigned int frame, unsigned int aeState) if (aeState) ctrls.set(controls::AeLocked, aeState == 2); - ipa::rkisp1::RkISP1Action op; - op.op = ipa::rkisp1::ActionMetadata; + RkISP1Action op; + op.op = ActionMetadata; op.controls = ctrls; queueFrameAction.emit(frame, op); } +} /* namespace ipa::rkisp1 */ + /* * External IPA module interface */ @@ -307,7 +311,7 @@ const struct IPAModuleInfo ipaModuleInfo = { IPAInterface *ipaCreate() { - return new IPARkISP1(); + return new ipa::rkisp1::IPARkISP1(); } }