{"id":15598,"url":"https://patchwork.libcamera.org/api/1.1/patches/15598/?format=json","web_url":"https://patchwork.libcamera.org/patch/15598/","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":"<20220331163058.171418-6-umang.jain@ideasonboard.com>","date":"2022-03-31T16:30:57","name":"[libcamera-devel,IPAIPU3,v4,5/6] ipu3: Inlink fillParams() in fillParamsBuffer()","commit_ref":null,"pull_url":null,"state":"superseded","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":{"id":12,"url":"https://patchwork.libcamera.org/api/1.1/users/12/?format=json","username":"uajain","first_name":"Umang","last_name":"Jain","email":"umang.jain@ideasonboard.com"},"mbox":"https://patchwork.libcamera.org/patch/15598/mbox/","series":[{"id":3020,"url":"https://patchwork.libcamera.org/api/1.1/series/3020/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3020","date":"2022-03-31T16:30:52","name":"ipa: ipu3: Replace event-based ops with dedicated functions​","version":4,"mbox":"https://patchwork.libcamera.org/series/3020/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/15598/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/15598/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 014B0C3256\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 31 Mar 2022 16:31:32 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9F57765635;\n\tThu, 31 Mar 2022 18:31:32 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C63BA65637\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 31 Mar 2022 18:31:30 +0200 (CEST)","from perceval.ideasonboard.com (unknown [103.74.73.150])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id EAC86486;\n\tThu, 31 Mar 2022 18:31:28 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1648744292;\n\tbh=318j58jnW0FN0U3MPLLoDqOwjks2juifiTrB65Chbg4=;\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=Gd7Qt024iplmelwpp1xxTtg0feCJT8+jCQ0wUCm1csAyGcHsOCO760nfTmCKSeQKi\n\ttD/QSjdorOfFtbi81tOazT9zhejm+Pr+nXFaRa2qJZumWtQc2J2r8JvF1lQr+ZajUM\n\tynPr+FwsIsn8+72ejT4sWPH1IG+MqKH+4qoYZeLve+TFIApVpOvj4Y4bW48SC6DYUB\n\tG4IMUgIo7Es6oImhDQ/cKU4j4RTbORvX0b4lbqduSCkhYzYWan2s1b7/fOkLrsXBgp\n\teX00apxGPvTy0xGpXh0zhig9Zj645QIcUOIknAJmD3USgIoDzStgWQmN7zP0tngSeP\n\tGOqtk5zcZUAWw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1648744290;\n\tbh=318j58jnW0FN0U3MPLLoDqOwjks2juifiTrB65Chbg4=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=bpGXidsUyotORzYwkkkSDSWAY/e2L2GPWphpwUyaA1K8qIkxE/4ky3fZEBo3hCVSk\n\tc+u8myERQr1/LZzO/fJd2TmcK7NE9dF94UIiVp2Bw4rTVq4C7BFxvbO2OrKu4Nq0Zv\n\tHdriUBda9w9v9OUt/DLoFh/1nehFeFJwUGm74pyM="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"bpGXidsU\"; dkim-atps=neutral","To":"libcamera-devel@lists.libcamera.org","Date":"Thu, 31 Mar 2022 22:00:57 +0530","Message-Id":"<20220331163058.171418-6-umang.jain@ideasonboard.com>","X-Mailer":"git-send-email 2.31.1","In-Reply-To":"<20220331163058.171418-1-umang.jain@ideasonboard.com>","References":"<20220331163058.171418-1-umang.jain@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [IPAIPU3 PATCH v4 5/6] ipu3: Inlink 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>\n---\n ipu3.cpp | 52 +++++++++++++++++++++++-----------------------------\n 1 file changed, 23 insertions(+), 29 deletions(-)","diff":"diff --git a/ipu3.cpp b/ipu3.cpp\nindex 289cc77..a435005 100644\n--- a/ipu3.cpp\n+++ b/ipu3.cpp\n@@ -61,7 +61,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@@ -343,7 +342,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@@ -391,33 +412,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","v4","5/6"]}