From patchwork Thu Jul 4 16:20:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 20580 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 96DA5BD87C for ; Thu, 4 Jul 2024 16:21:09 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 4650B62E17; Thu, 4 Jul 2024 18:21:07 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="enFmETDk"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 32176619C8 for ; Thu, 4 Jul 2024 18:21:00 +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 47B11502; Thu, 4 Jul 2024 18:20:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1720110031; bh=YoznlcxupTYZ5iyulpBcZEyeUeNdA51jworqUcC++j8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=enFmETDkZxvUC2TyFcka+b14Q0bd2CmHg3yGOedeSg5BQifufeLwSH8v9y/ggpATR /Izx1siACyk4if94180zGoxS5Sn6RrdAyMnN+z0/mbGTtppKh3F01O9ATTyoFENGq0 DfD4fANyc8qF+9o2JsMc/D3xBcLedFpbNeRF/Y+Y= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Cc: Jacopo Mondi , Paul Elder Subject: [PATCH v2 03/11] ipa: rkisp1: Pass parameters buffer format to IPA module Date: Thu, 4 Jul 2024 19:20:27 +0300 Message-ID: <20240704162035.15074-4-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.44.2 In-Reply-To: <20240704162035.15074-1-laurent.pinchart@ideasonboard.com> References: <20240704162035.15074-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 Reviewed-by: Paul Elder --- 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) {