From patchwork Tue Mar 16 14:47:11 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: 11588 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 A68F5C32E2 for ; Tue, 16 Mar 2021 14:47:25 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 49D6968D57; Tue, 16 Mar 2021 15:47:25 +0100 (CET) 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="nUvhgFZ1"; 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 7DA8868D4F for ; Tue, 16 Mar 2021 15:47:24 +0100 (CET) Received: from localhost.localdomain (unknown [IPv6:2a01:e0a:169:7140:f840:1816:ba68:a009]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 16DC28C8; Tue, 16 Mar 2021 15:47:24 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1615906044; bh=Nx0KwrE+Le+uO0UpwsTZcT2BoR1LGMbwJXe2nAogpYg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nUvhgFZ1UkreZOW4fYG3gKp7H7gbSDoOzUNVm0blfAoObSpx1b59MlO+mC1c9119z P5aH8swxPYQtUt8AsRQWdEaYnCldwzkOTXc9JiN4qaKqNrYqu9jjaC1stxuQvKovYR PzdvuTWfwTmyekWtsxmLtFym+LoZhvJcqsVtDnVo= From: Jean-Michel Hautbois To: libcamera-devel@lists.libcamera.org Date: Tue, 16 Mar 2021 15:47:11 +0100 Message-Id: <20210316144711.40778-4-jeanmichel.hautbois@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210316144711.40778-1-jeanmichel.hautbois@ideasonboard.com> References: <20210316144711.40778-1-jeanmichel.hautbois@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 3/3] libcamera: ipu3: Pass the BDS rectangle at IPA configure call 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 IPU3 IPA will need the BDS configuration when the AWB/AGC algorithm will be integrated. In order to do that, the configure() interface needs to be modified. Signed-off-by: Jean-Michel Hautbois Reviewed-by: Jacopo Mondi Reviewed-by: Laurent Pinchart --- v3: - pass bds size to ipa->configure() v2: - rename bds => bdsOutputSize - use a libcamera::Size instead of libcamera::Rectangle --- include/libcamera/ipa/ipu3.mojom | 2 +- src/ipa/ipu3/ipu3.cpp | 7 +++++-- src/libcamera/pipeline/ipu3/ipu3.cpp | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/include/libcamera/ipa/ipu3.mojom b/include/libcamera/ipa/ipu3.mojom index 6ee11333..5d13e7ea 100644 --- a/include/libcamera/ipa/ipu3.mojom +++ b/include/libcamera/ipa/ipu3.mojom @@ -30,7 +30,7 @@ interface IPAIPU3Interface { start() => (int32 ret); stop(); - configure(map entityControls) => (); + configure(map entityControls, Size bdsOutputSize) => (); mapBuffers(array buffers); unmapBuffers(array ids); diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp index b63e58be..be73a225 100644 --- a/src/ipa/ipu3/ipu3.cpp +++ b/src/ipa/ipu3/ipu3.cpp @@ -35,7 +35,9 @@ public: int start() override { return 0; } void stop() override {} - void configure(const std::map &entityControls) override; + void configure( + const std::map &entityControls, + const Size &bdsOutputSize) override; void mapBuffers(const std::vector &buffers) override; void unmapBuffers(const std::vector &ids) override; @@ -62,7 +64,8 @@ private: uint32_t maxGain_; }; -void IPAIPU3::configure(const std::map &entityControls) +void IPAIPU3::configure(const std::map &entityControls, + [[maybe_unused]] const Size &bdsOutputSize) { if (entityControls.empty()) return; diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp index 174c1dd8..dcc6ad22 100644 --- a/src/libcamera/pipeline/ipu3/ipu3.cpp +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp @@ -633,7 +633,7 @@ int PipelineHandlerIPU3::configure(Camera *camera, CameraConfiguration *c) std::map entityControls; entityControls.emplace(0, data->cio2_.sensor()->controls()); - data->ipa_->configure(entityControls); + data->ipa_->configure(entityControls, config->pipeConfig_.bds); return 0; }