Patch Detail
Show a patch.
GET /api/patches/13811/?format=api
{ "id": 13811, "url": "https://patchwork.libcamera.org/api/patches/13811/?format=api", "web_url": "https://patchwork.libcamera.org/patch/13811/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/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": "<20210910154924.117857-1-kieran.bingham@ideasonboard.com>", "date": "2021-09-10T15:49:24", "name": "[libcamera-devel,RFC] ipa: ipu3: Clear incoming parameter use flags", "commit_ref": "3bcb7a90c1b1404e51015bda9add4d2ba467c052", "pull_url": null, "state": "accepted", "archived": false, "hash": "972401f5800d75a4b907b14dc907afdfd1e9fac4", "submitter": { "id": 4, "url": "https://patchwork.libcamera.org/api/people/4/?format=api", "name": "Kieran Bingham", "email": "kieran.bingham@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/13811/mbox/", "series": [ { "id": 2515, "url": "https://patchwork.libcamera.org/api/series/2515/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2515", "date": "2021-09-10T15:49:24", "name": "[libcamera-devel,RFC] ipa: ipu3: Clear incoming parameter use flags", "version": 1, "mbox": "https://patchwork.libcamera.org/series/2515/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/13811/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/13811/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 022BABDC71\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 10 Sep 2021 15:49:30 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6A31A69170;\n\tFri, 10 Sep 2021 17:49:29 +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 E936269169\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 10 Sep 2021 17:49:27 +0200 (CEST)", "from Monstersaurus.local\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 6ACAD883;\n\tFri, 10 Sep 2021 17:49:27 +0200 (CEST)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"O2K0VoQA\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1631288967;\n\tbh=08yWEDDq24zqLw/gRWvA2gWpAzaZ2w6b3bcRT5ogu+I=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=O2K0VoQAPyV1lByk7HgqCjRQuWSZEcrORrC5saW5sZSGYCT2KdTSxQd1Ie+OIEwlh\n\tOid9QZZw6f8rKJOnYRfykQbalVDLSatF5gjPxf5Ygqfvrv0+yoLu6TuleXJnT5gR/g\n\tV99BJDuR87rVlHSpgZXrhObJZvs7PSWGWC2TNS/w=", "From": "Kieran Bingham <kieran.bingham@ideasonboard.com>", "To": "libcamera devel <libcamera-devel@lists.libcamera.org>,\n\tJean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>", "Date": "Fri, 10 Sep 2021 16:49:24 +0100", "Message-Id": "<20210910154924.117857-1-kieran.bingham@ideasonboard.com>", "X-Mailer": "git-send-email 2.30.2", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [RFC PATCH] ipa: ipu3: Clear incoming parameter\n\tuse flags", "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>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "The incoming params buffer may contain uninitialised data, or the\nparameters of previously queued frames. Clearing the entire buffer\nmay be an expensive operation, and the kernel will only read from\nstructures which have their associated use-flag set.\n\nIt is the responsibility of the algorithms to set the use flags\naccordingly for any data structure they update during prepare().\n\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n---\n\nYes, the commit message is the same as the comment before the line.\nI felt the text was worthy of documenting the clearing of the flags, and\nensuring that it's documented in the code that the algorithms are\nresponsible for setting their use flag of any structure they modify.\n\nNote that this is sent compile tested only, as it's something I noticed,\nwhile writing documentation and wanted to check.\n\n src/ipa/ipu3/ipu3.cpp | 11 +++++++++++\n 1 file changed, 11 insertions(+)", "diff": "diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp\nindex c925cf642611..30d2a53903ec 100644\n--- a/src/ipa/ipu3/ipu3.cpp\n+++ b/src/ipa/ipu3/ipu3.cpp\n@@ -457,6 +457,17 @@ void IPAIPU3::processControls([[maybe_unused]] unsigned int frame,\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", "prefixes": [ "libcamera-devel", "RFC" ] }