From patchwork Thu Mar 31 16:57:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 15601 X-Patchwork-Delegate: umang.jain@ideasonboard.com 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 95CA6C0F1B for ; Thu, 31 Mar 2022 16:57:50 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 5E59965632; Thu, 31 Mar 2022 18:57:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1648745870; bh=L7xHZmTfDdpJRrWwW0+r1bNt9u+KMb8rF+ZeFiIrg5w=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=vwbSaJ3Mv3j/UTWpsCUBqAI9P6OwOuFXN17dj551ZQtUHNv+zt2oD7ORhFo3uqnoM sYo1Pfb4fo7tcyjFU7+uSK0dAPfCofnevSow/wfInuaTGkWmroR4tzJR4JnQAAo672 NzphHUfiAFMFPuHmnpvtkWCTJrjxrUS5HY7t9wHJsDIQdGVp56apUFCYx1FOKpcmfl sSZz/dY8kRJevp1tAMhvo4RwcQ2sEqzw4pyisAjAAqAKgrYiBVZ+plX7jDV8g/x4Su g16EEyeBrvEuc41PTKNqyCOQy1mXZ5aETCD93SLNMY4VnAk4LgXqN/XmpwIg+ggE/h 9Tqz68oBwaTvw== 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 364CD65634 for ; Thu, 31 Mar 2022 18:57:48 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="qwCkW/qf"; dkim-atps=neutral Received: from perceval.ideasonboard.com (unknown [103.74.73.150]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 595708E6; Thu, 31 Mar 2022 18:57:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1648745867; bh=L7xHZmTfDdpJRrWwW0+r1bNt9u+KMb8rF+ZeFiIrg5w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qwCkW/qfFH1eiu/URvtYiAaIPxxis5M77UEaqAgCNGgbQqM12Zqo+a2/agb4SYtE6 rwJ3Pkb4IfS4fEKJEmg56yV/TmIuxnRzIjqUUHYC1o33+7fB2Rl8ay6Y0yn9nKh2G8 gGEnolwN6y0PMqBeaLg6OVcHkCbs7jeZkIs4xqR4= To: libcamera-devel@lists.libcamera.org Date: Thu, 31 Mar 2022 22:27:24 +0530 Message-Id: <20220331165725.188364-2-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220331165725.188364-1-umang.jain@ideasonboard.com> References: <20220331165725.188364-1-umang.jain@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 1/2] ipa: rkisp1: Split queuing of request and parameter filling 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-Patchwork-Original-From: Umang Jain via libcamera-devel From: Umang Jain Reply-To: Umang Jain Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Queuing of request (i.e. passing of controls to the IPA) and filling of the parameters buffer are two separate operations. Treat them as such by splitting them into two functions in the rkisp1 IPA interface. Signed-off-by: Umang Jain Reviewed-by: Paul Elder Reviewed-by: Laurent Pinchart --- include/libcamera/ipa/rkisp1.mojom | 4 ++-- src/ipa/rkisp1/rkisp1.cpp | 11 ++++++++--- src/libcamera/pipeline/rkisp1/rkisp1.cpp | 5 +++-- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/include/libcamera/ipa/rkisp1.mojom b/include/libcamera/ipa/rkisp1.mojom index f50f1e11..e3537385 100644 --- a/include/libcamera/ipa/rkisp1.mojom +++ b/include/libcamera/ipa/rkisp1.mojom @@ -23,8 +23,8 @@ interface IPARkISP1Interface { mapBuffers(array buffers); unmapBuffers(array ids); - [async] queueRequest(uint32 frame, uint32 bufferId, - libcamera.ControlList reqControls); + [async] queueRequest(uint32 frame, libcamera.ControlList reqControls); + [async] fillParamsBuffer(uint32 frame, uint32 bufferId); [async] processStatsBuffer(uint32 frame, uint32 bufferId, libcamera.ControlList sensorControls); }; diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp index 13ab1cdc..ef1f0d56 100644 --- a/src/ipa/rkisp1/rkisp1.cpp +++ b/src/ipa/rkisp1/rkisp1.cpp @@ -54,8 +54,8 @@ public: void mapBuffers(const std::vector &buffers) override; void unmapBuffers(const std::vector &ids) override; - void queueRequest(const uint32_t frame, const uint32_t bufferId, - const ControlList &controls) override; + void queueRequest(const uint32_t frame, const ControlList &controls) override; + void fillParamsBuffer(const uint32_t frame, const uint32_t bufferId) override; void processStatsBuffer(const uint32_t frame, const uint32_t bufferId, const ControlList &sensorControls) override; private: @@ -235,8 +235,13 @@ void IPARkISP1::unmapBuffers(const std::vector &ids) } } -void IPARkISP1::queueRequest(const uint32_t frame, const uint32_t bufferId, +void IPARkISP1::queueRequest([[maybe_unused]] const uint32_t frame, [[maybe_unused]] const ControlList &controls) +{ + /* \todo Start processing for 'frame' based on 'controls'. */ +} + +void IPARkISP1::fillParamsBuffer(const uint32_t frame, const uint32_t bufferId) { rkisp1_params_cfg *params = reinterpret_cast( diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp index e6fc582b..1624e2ec 100644 --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp @@ -855,8 +855,9 @@ int PipelineHandlerRkISP1::queueRequestDevice(Camera *camera, Request *request) if (!info) return -ENOENT; - data->ipa_->queueRequest(data->frame_, info->paramBuffer->cookie(), - request->controls()); + data->ipa_->queueRequest(data->frame_, request->controls()); + data->ipa_->fillParamsBuffer(data->frame_, info->paramBuffer->cookie()); + data->frame_++; return 0; From patchwork Thu Mar 31 16:57:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 15602 X-Patchwork-Delegate: umang.jain@ideasonboard.com 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 3418AC0F1B for ; Thu, 31 Mar 2022 16:57:53 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id DD51C65635; Thu, 31 Mar 2022 18:57:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1648745872; bh=RRnhBGMlC1/FXvWNWEXLMl8JrgFzNMMVdYU6hpzuCmA=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=fhtUx2VJ0IuN4fndrCBk3e3YHQY4imSEPArjNgGy/XSYXfHljTMl/7UA2Jkf+StOH pCGNysTumVh37GW3LF4kk3Tu8FvGkK2WhtI+/ZhLkBANg52TXRmY4a4LTS9yz4lpVR uprvoDRZH6LV7bLXyJIAKL3dYi8okmwEl9WnSgKapl1evfNFi2XTKXB6dVRqiZx70U 7OAnMgYUyTDzGFoI+NQ0z/Wz5k3lhgjB6mSskoT9TFguBLmoB297zY+2izegIlwOnd EtOgFeRhlaE7suaqqD3FY9TQHKuXK7TVXvAEkktwm4YVwaUKaFyHLfsoHHy5ySRcWE U+FDQ3bPs9fJA== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id BDBEB6559A for ; Thu, 31 Mar 2022 18:57:51 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="e81BYq9X"; dkim-atps=neutral Received: from perceval.ideasonboard.com (unknown [103.74.73.150]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id CB18359D; Thu, 31 Mar 2022 18:57:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1648745871; bh=RRnhBGMlC1/FXvWNWEXLMl8JrgFzNMMVdYU6hpzuCmA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e81BYq9XjYMXitR5bGyWdUYFIGRo5G3/P9RbbOCsS7/dcN6Rz+ewR3iRVGdZ5YT7o ZQAuDITGx+KjlmE2FBB7r22XmY0dPknLmatg4jqZnzDpSpsKkmH6mJ+QM6tWnYjqZ5 nnWSnoY1R0DDx4xfC0RxPYk30KwMrC13gSxstRNQ= To: libcamera-devel@lists.libcamera.org Date: Thu, 31 Mar 2022 22:27:25 +0530 Message-Id: <20220331165725.188364-3-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220331165725.188364-1-umang.jain@ideasonboard.com> References: <20220331165725.188364-1-umang.jain@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 2/2] ipa: vimc: Rename processControls() to queueRequest() 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-Patchwork-Original-From: Umang Jain via libcamera-devel From: Umang Jain Reply-To: Umang Jain Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Synchronise with other IPA intefaces (for e.g. IPU3, RkISP1) that uses queueRequest() to pass in the request controls to IPA. Signed-off-by: Umang Jain Reviewed-by: Paul Elder Reviewed-by: Laurent Pinchart --- include/libcamera/ipa/vimc.mojom | 2 +- src/ipa/vimc/vimc.cpp | 6 +++--- src/libcamera/pipeline/vimc/vimc.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/libcamera/ipa/vimc.mojom b/include/libcamera/ipa/vimc.mojom index e3b14e38..e5ac3609 100644 --- a/include/libcamera/ipa/vimc.mojom +++ b/include/libcamera/ipa/vimc.mojom @@ -37,7 +37,7 @@ interface IPAVimcInterface { * handle parameters at runtime. */ [async] fillParams(uint32 frame, uint32 bufferId); - [async] processControls(uint32 frame, libcamera.ControlList controls); + [async] queueRequest(uint32 frame, libcamera.ControlList controls); }; interface IPAVimcEventInterface { diff --git a/src/ipa/vimc/vimc.cpp b/src/ipa/vimc/vimc.cpp index 8481b82b..315302c6 100644 --- a/src/ipa/vimc/vimc.cpp +++ b/src/ipa/vimc/vimc.cpp @@ -44,7 +44,7 @@ public: void unmapBuffers(const std::vector &ids) override; void fillParams(uint32_t frame, uint32_t bufferId) override; - void processControls(uint32_t frame, const ControlList &controls) override; + void queueRequest(uint32_t frame, const ControlList &controls) override; private: void initTrace(); @@ -140,8 +140,8 @@ void IPAVimc::fillParams([[maybe_unused]] uint32_t frame, uint32_t bufferId) paramsFilled.emit(bufferId); } -void IPAVimc::processControls([[maybe_unused]] uint32_t frame, - [[maybe_unused]] const ControlList &controls) +void IPAVimc::queueRequest([[maybe_unused]] uint32_t frame, + [[maybe_unused]] const ControlList &controls) { } diff --git a/src/libcamera/pipeline/vimc/vimc.cpp b/src/libcamera/pipeline/vimc/vimc.cpp index 29960fe3..69b83d07 100644 --- a/src/libcamera/pipeline/vimc/vimc.cpp +++ b/src/libcamera/pipeline/vimc/vimc.cpp @@ -432,7 +432,7 @@ int PipelineHandlerVimc::queueRequestDevice(Camera *camera, Request *request) if (ret < 0) return ret; - data->ipa_->processControls(request->sequence(), request->controls()); + data->ipa_->queueRequest(request->sequence(), request->controls()); return 0; }