{"id":15640,"url":"https://patchwork.libcamera.org/api/1.1/patches/15640/?format=json","web_url":"https://patchwork.libcamera.org/patch/15640/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20220406141709.164794-6-umang.jain@ideasonboard.com>","date":"2022-04-06T14:17:08","name":"[libcamera-devel,IPAIPU3,v5,5/6] ipu3: Inline fillParams() in fillParamsBuffer()","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"77ba96646f67d5e600d5831463b14b16ce2fe1fa","submitter":{"id":86,"url":"https://patchwork.libcamera.org/api/1.1/people/86/?format=json","name":"Umang Jain","email":"umang.jain@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/15640/mbox/","series":[{"id":3037,"url":"https://patchwork.libcamera.org/api/1.1/series/3037/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3037","date":"2022-04-06T14:17:03","name":"ipa: ipu3: Replace event-based ops with dedicated functions","version":5,"mbox":"https://patchwork.libcamera.org/series/3037/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/15640/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/15640/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id DA9A0C3256\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  6 Apr 2022 14:17:39 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A2DE865646;\n\tWed,  6 Apr 2022 16:17:39 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E1999633A4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  6 Apr 2022 16:17:37 +0200 (CEST)","from perceval.ideasonboard.com (unknown [27.57.186.178])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 19EF2482;\n\tWed,  6 Apr 2022 16:17:35 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1649254659;\n\tbh=Rf9JkFUqZrQKSWL4TWMesOvFCqEe7TSKyBCPUM4MhwU=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=Gms3GtEwXfDTLe92atPE1Sv7jyjJdIOiGGX68LuIWZVOpj+Y6jfhUTzyUGgCsixCN\n\txcwm99l53iLjnm88XOqBxICRFQncNeKTaX4h6LGYBK8TIlOwi2N8kOSD7rWiuZ4fM9\n\tkdpD2LBs/8dMpPvFLSTapulXSC9e9Qtt9ZRO6jiKz0gBMr2UWJTvHAl95hyeKhK3TG\n\ttTki2tdP2kZTftR0IMg4emX2XLo7VojYqZI0MxLzs6uy89W5OSlkQsrdMZLSndc6dE\n\tuFJSxftEW789rUcQY08COy9fXR+qjTG2npEUytn/MBwMOcjNQbOkQcJQR6vb4AZJun\n\t+2n+oRZCE15jg==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1649254657;\n\tbh=Rf9JkFUqZrQKSWL4TWMesOvFCqEe7TSKyBCPUM4MhwU=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=SxEFZJyNb5l8J0MceVPF8vgvTO8TyT10EYib2lDIxif3r0rMLrV2VI6Xw7CDd6GdU\n\t6tCCEAhihnEOJJwBum8QBJFPkFvDjunEbLY2+STMquOQMpch9hoiIiCxEX3660ZSmI\n\tnMUt2NCRtS4NQ4sGggBUgYEtjkD70XRrAYDGkhqg="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"SxEFZJyN\"; dkim-atps=neutral","To":"libcamera-devel@lists.libcamera.org","Date":"Wed,  6 Apr 2022 19:47:08 +0530","Message-Id":"<20220406141709.164794-6-umang.jain@ideasonboard.com>","X-Mailer":"git-send-email 2.31.1","In-Reply-To":"<20220406141709.164794-1-umang.jain@ideasonboard.com>","References":"<20220406141709.164794-1-umang.jain@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [IPAIPU3 PATCH v5 5/6] ipu3: Inline fillParams()\n\tin fillParamsBuffer()","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Umang Jain via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Umang Jain <umang.jain@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Since we have moved away from switch/case on the operation ID,\nthere's little reason to split the operation in two functions.\n\nSigned-off-by: Umang Jain <umang.jain@ideasonboard.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n ipu3.cpp | 52 +++++++++++++++++++++++-----------------------------\n 1 file changed, 23 insertions(+), 29 deletions(-)","diff":"diff --git a/ipu3.cpp b/ipu3.cpp\nindex b6d2129..0543a2e 100644\n--- a/ipu3.cpp\n+++ b/ipu3.cpp\n@@ -60,7 +60,6 @@ private:\n \t\t\t    const ControlInfoMap &sensorControls,\n \t\t\t    ControlInfoMap *ipaControls);\n \tvoid runAiq(unsigned int frame);\n-\tvoid fillParams(unsigned int frame, ipu3_uapi_params *params);\n \tvoid parseStatistics(unsigned int frame,\n \t\t\t     int64_t frameTimestamp,\n \t\t\t     const ipu3_uapi_stats_3a *stats,\n@@ -342,7 +341,29 @@ void IPAIPU3::fillParamsBuffer(const uint32_t frame, const uint32_t bufferId)\n \tipu3_uapi_params *params =\n \t\treinterpret_cast<ipu3_uapi_params *>(mem.data());\n \n-\tfillParams(frame, params);\n+\t/* Prepare parameters buffer. */\n+\tmemset(params, 0, sizeof(*params));\n+\n+\t/*\n+\t * Call into the AIQ object, and set up the library with any requested\n+\t * controls or settings from the incoming request.\n+\t *\n+\t * (statistics are fed into the library as a separate event\n+\t *  when available)\n+\t *\n+\t * - Run algorithms\n+\t *\n+\t * - Fill params buffer with the results of the algorithms.\n+\t */\n+\trunAiq(frame);\n+\n+\taiq::AiqResults& latestResults = resultsHistory_.latest();\n+\taic_.updateRuntimeParams(latestResults);\n+\taic_.run(params);\n+\n+\tsetControls(frame);\n+\n+\tparamsBufferReady.emit(frame);\n }\n \n void IPAIPU3::processStatsBuffer(const uint32_t frame, const int64_t frameTimestamp,\n@@ -390,33 +411,6 @@ void IPAIPU3::runAiq([[maybe_unused]] unsigned int frame)\n \tlensPosition_ = latestResults.af()->next_lens_position;\n }\n \n-void IPAIPU3::fillParams(unsigned int frame, ipu3_uapi_params *params)\n-{\n-\t/* Prepare parameters buffer. */\n-\tmemset(params, 0, sizeof(*params));\n-\n-\t/*\n-\t * Call into the AIQ object, and set up the library with any requested\n-\t * controls or settings from the incoming request.\n-\t *\n-\t * (statistics are fed into the library as a separate event\n-\t *  when available)\n-\t *\n-\t * - Run algorithms\n-\t *\n-\t * - Fill params buffer with the results of the algorithms.\n-\t */\n-\trunAiq(frame);\n-\n-\taiq::AiqResults& latestResults = resultsHistory_.latest();\n-\taic_.updateRuntimeParams(latestResults);\n-\taic_.run(params);\n-\n-\tsetControls(frame);\n-\n-\tparamsBufferReady.emit(frame);\n-}\n-\n void IPAIPU3::parseStatistics(unsigned int frame,\n \t\t\t      int64_t frameTimestamp,\n \t\t\t      const ipu3_uapi_stats_3a *stats,\n","prefixes":["libcamera-devel","IPAIPU3","v5","5/6"]}