From patchwork Wed Jul 3 22:52:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 20565 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 C6773BEFBE for ; Wed, 3 Jul 2024 22:53:05 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 440A863362; Thu, 4 Jul 2024 00:53:05 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="MNOtnjEk"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id AEDB7632EA for ; Thu, 4 Jul 2024 00:52:55 +0200 (CEST) Received: from pendragon.ideasonboard.com (117.145-247-81.adsl-dyn.isp.belgacom.be [81.247.145.117]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id BC4D44CC; Thu, 4 Jul 2024 00:52:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1720047146; bh=Wb58a06KTOryQVsNnvf23JjlUAIzDdGrRs0jp2Jl46c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MNOtnjEkN9Cp/ep74RhxGAEIJYwf64w0/2Hi4bBqu1eOCyzPzxjG3mWxniwZH//Vb IUHb7o1XUxHBHHaaOPeGT0s/C40SdG36f6MBY5M8Ysk4GZLBumc0qIHNJiAV8M0FQs EK1UqB6yMAQVngjxF2UzkDNYbsVJElVijlCU3CBc= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Cc: Jacopo Mondi , Paul Elder Subject: [PATCH v1 03/11] ipa: rkisp1: Pass parameters buffer format to IPA module Date: Thu, 4 Jul 2024 01:52:22 +0300 Message-ID: <20240703225230.3530-4-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.44.2 In-Reply-To: <20240703225230.3530-1-laurent.pinchart@ideasonboard.com> References: <20240703225230.3530-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 rkisp1 driver supports two formats for the ISP parameters buffer, the legacy fixed format and the new extensible format. In preparation of support for the new format, pass the parameters buffer format from the pipeline handler to the IPA module and store it. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi --- include/libcamera/ipa/rkisp1.mojom | 1 + src/ipa/rkisp1/rkisp1.cpp | 2 ++ src/libcamera/pipeline/rkisp1/rkisp1.cpp | 1 + 3 files changed, 4 insertions(+) diff --git a/include/libcamera/ipa/rkisp1.mojom b/include/libcamera/ipa/rkisp1.mojom index 1009e970a1b5..585d38572aa2 100644 --- a/include/libcamera/ipa/rkisp1.mojom +++ b/include/libcamera/ipa/rkisp1.mojom @@ -11,6 +11,7 @@ import "include/libcamera/ipa/core.mojom"; struct IPAConfigInfo { libcamera.IPACameraSensorInfo sensorInfo; libcamera.ControlInfoMap sensorControls; + uint32 paramFormat; }; interface IPARkISP1Interface { diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp index 23e0826cc335..71698bc47391 100644 --- a/src/ipa/rkisp1/rkisp1.cpp +++ b/src/ipa/rkisp1/rkisp1.cpp @@ -79,6 +79,7 @@ private: std::map mappedBuffers_; ControlInfoMap sensorControls_; + uint32_t paramFormat_; /* Local parameter storage */ struct IPAContext context_; @@ -208,6 +209,7 @@ int IPARkISP1::configure(const IPAConfigInfo &ipaConfig, ControlInfoMap *ipaControls) { sensorControls_ = ipaConfig.sensorControls; + paramFormat_ = ipaConfig.paramFormat; const auto itExp = sensorControls_.find(V4L2_CID_EXPOSURE); int32_t minExposure = itExp->second.min().get(); diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp index 4cbf105dbdcd..73e56b8fbf13 100644 --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp @@ -819,6 +819,7 @@ int PipelineHandlerRkISP1::configure(Camera *camera, CameraConfiguration *c) return ret; ipaConfig.sensorControls = data->sensor_->controls(); + ipaConfig.paramFormat = paramFormat.fourcc; ret = data->ipa_->configure(ipaConfig, streamConfig, &data->controlInfo_); if (ret) {