Patch Detail
Show a patch.
GET /api/1.1/patches/15637/?format=api
{ "id": 15637, "url": "https://patchwork.libcamera.org/api/1.1/patches/15637/?format=api", "web_url": "https://patchwork.libcamera.org/patch/15637/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api", "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-3-umang.jain@ideasonboard.com>", "date": "2022-04-06T14:17:05", "name": "[libcamera-devel,v5,2/6] ipa: ipu3: Inline fillParams() in fillParamsBuffer()", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "4292f2ee3dc5a2ecb9ab40366184dba0217944cb", "submitter": { "id": 86, "url": "https://patchwork.libcamera.org/api/1.1/people/86/?format=api", "name": "Umang Jain", "email": "umang.jain@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/15637/mbox/", "series": [ { "id": 3037, "url": "https://patchwork.libcamera.org/api/1.1/series/3037/?format=api", "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/15637/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/15637/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 52C99C3256\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 6 Apr 2022 14:17:31 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1C77165647;\n\tWed, 6 Apr 2022 16:17:31 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C1D72633A4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 6 Apr 2022 16:17:29 +0200 (CEST)", "from perceval.ideasonboard.com (unknown [27.57.186.178])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id C5428482;\n\tWed, 6 Apr 2022 16:17:27 +0200 (CEST)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1649254651;\n\tbh=wd10aGLKpxSp/InQAIJ4yIW1zodreFRdlgdg/HVS/EU=;\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=TGq8SaQDkfSf9CQ6bXvu43RqUhwXdxj+gY8Edq9saE+AlhMUNVx8lj+9mvPqrHSzW\n\tcj+iZlQdNwaz5j2pNXvDVtNP9nDKM6N+InRWpQcTDdE0T89caZ11XcIM33SfkeLhTL\n\tWvg31LAymPHQde2nl3HFmem+vSiPX0HKTll9D5XyLFTS3humkj3fqG4vJ897y4+dz3\n\tu/+RPbsNIMWxxqcE3SYpwNTNmcpeBPVF+QsRvIBQNJN/aMr5ZNt5pILC8jh1sX1v3c\n\tCCpVwWWJqw82AyvIHQKbNmFYmVCGoAFsvz/6/ZM8R8K7e8mLMkK/zL6M/VPr8NPOFf\n\tS9ffBR5ODDO7Q==", "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1649254649;\n\tbh=wd10aGLKpxSp/InQAIJ4yIW1zodreFRdlgdg/HVS/EU=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=HF3TxxgrEiDgZNZtLu044m7KrgIV88kgPhqOicJ+ExdrZyzuTzuY48udPGpzCJKcg\n\tex6c3Cm2vcG+B37n+0TEHFZ0mkF9Qz9yYhDOl38dSwZQzv7FPAYykdH4HeOvqruKYv\n\t9WpuHu9UadGdFcR8UZ6au1AKNMZkNLcSB+H+oZgY=" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"HF3Txxgr\"; dkim-atps=neutral", "To": "libcamera-devel@lists.libcamera.org", "Date": "Wed, 6 Apr 2022 19:47:05 +0530", "Message-Id": "<20220406141709.164794-3-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] [PATCH v5 2/6] ipa: ipu3: Inline fillParams() in\n\tfillParamsBuffer()", "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 src/ipa/ipu3/ipu3.cpp | 47 +++++++++++++++++--------------------------\n 1 file changed, 18 insertions(+), 29 deletions(-)", "diff": "diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp\nindex 9a59f80f..8c9a20f5 100644\n--- a/src/ipa/ipu3/ipu3.cpp\n+++ b/src/ipa/ipu3/ipu3.cpp\n@@ -156,7 +156,6 @@ private:\n \t\t\t ControlInfoMap *ipaControls);\n \tvoid updateSessionConfiguration(const ControlInfoMap &sensorControls);\n \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@@ -513,6 +512,9 @@ void IPAIPU3::unmapBuffers(const std::vector<unsigned int> &ids)\n * \\brief Fill and return a buffer with ISP processing parameters for a frame\n * \\param[in] frame The frame number\n * \\param[in] bufferId ID of the parameter buffer to fill\n+ *\n+ * Algorithms are expected to fill the IPU3 parameter buffer for the next\n+ * frame given their most recent processing of the ImgU statistics.\n */\n void IPAIPU3::fillParamsBuffer(const uint32_t frame, const uint32_t bufferId)\n {\n@@ -526,7 +528,21 @@ 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/*\n+\t * The incoming params buffer may contain uninitialised data, or the\n+\t * parameters of previously queued frames. Clearing the entire buffer\n+\t * may be an expensive operation, and the kernel will only read from\n+\t * structures which have their associated use-flag set.\n+\t *\n+\t * It is the responsibility of the algorithms to set the use flags\n+\t * accordingly for any data structure they update during prepare().\n+\t */\n+\tparams->use = {};\n+\n+\tfor (auto const &algo : algorithms_)\n+\t\talgo->prepare(context_, params);\n+\n+\tparamsBufferReady.emit(frame);\n }\n \n /**\n@@ -569,33 +585,6 @@ void IPAIPU3::queueRequest(const uint32_t frame,\n \t/* \\todo Start processing for 'frame' based on 'controls'. */\n }\n \n-/**\n- * \\brief Fill the ImgU parameter buffer for the next frame\n- * \\param[in] frame The number of the latest frame processed\n- * \\param[out] params The parameter buffer to fill\n- *\n- * Algorithms are expected to fill the IPU3 parameter buffer for the next\n- * frame given their most recent processing of the ImgU statistics.\n- */\n-void IPAIPU3::fillParams(unsigned int frame, ipu3_uapi_params *params)\n-{\n-\t/*\n-\t * The incoming params buffer may contain uninitialised data, or the\n-\t * parameters of previously queued frames. Clearing the entire buffer\n-\t * may be an expensive operation, and the kernel will only read from\n-\t * structures which have their associated use-flag set.\n-\t *\n-\t * It is the responsibility of the algorithms to set the use flags\n-\t * accordingly for any data structure they update during prepare().\n-\t */\n-\tparams->use = {};\n-\n-\tfor (auto const &algo : algorithms_)\n-\t\talgo->prepare(context_, params);\n-\n-\tparamsBufferReady.emit(frame);\n-}\n-\n /**\n * \\brief Process the statistics generated by the ImgU\n * \\param[in] frame The number of the latest frame processed\n", "prefixes": [ "libcamera-devel", "v5", "2/6" ] }