Patch Detail
Show a patch.
GET /api/patches/15587/?format=api
{ "id": 15587, "url": "https://patchwork.libcamera.org/api/patches/15587/?format=api", "web_url": "https://patchwork.libcamera.org/patch/15587/", "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": "<20220331121032.2150025-1-kieran.bingham@ideasonboard.com>", "date": "2022-03-31T12:10:32", "name": "[libcamera-devel] ipa: ipu3: af: enforce grid size restrictions", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "502a4c1f2c01f3c0d6c0d999b0228ff1ce8d9b08", "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/15587/mbox/", "series": [ { "id": 3016, "url": "https://patchwork.libcamera.org/api/series/3016/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3016", "date": "2022-03-31T12:10:32", "name": "[libcamera-devel] ipa: ipu3: af: enforce grid size restrictions", "version": 1, "mbox": "https://patchwork.libcamera.org/series/3016/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/15587/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/15587/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 20F01C0F1B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 31 Mar 2022 12:10:38 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5D6D365633;\n\tThu, 31 Mar 2022 14:10:37 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9150C6559A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 31 Mar 2022 14:10:35 +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 27C2F59D;\n\tThu, 31 Mar 2022 14:10:35 +0200 (CEST)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1648728637;\n\tbh=dQbyEU8Tg//Vd5MSvuB+KFOCDPU0vQinXy7nXX+LugU=;\n\th=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:\n\tList-Help:List-Subscribe:From:Reply-To:From;\n\tb=pQj5KbuHHByB/v/oaMADDvJMeg99dQQu7N7F9QqvvxALmkRAin657Zj66e6tv7BPy\n\ty2BZ8AFsqyK76ksOpihE4HPBLVIbiOEnaoWEbjF+v4kG3PcmIA/w7VZypyu3Sakjic\n\tJTjBo0lLm80Slv08+oEwxKTmX+tZj6tG5zZ96slhSRq9IgnVf0A5R40AxEBIq0FQF+\n\twkHHwh8nWweVM4XiKYsImupb1UuT7A1TGvnKSCVWTevjQiCdAk7KmJCTc9OZemFrVd\n\tFg8Q+oBECA0LXszwBRTmuLVjVk1aotpLOZqp0LwrIfAD0t/AuzdpQjcsH1js/nJ5tw\n\tv0BfwXIkyQDiQ==", "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1648728635;\n\tbh=dQbyEU8Tg//Vd5MSvuB+KFOCDPU0vQinXy7nXX+LugU=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=DFzyrnJicf0RntxHUAok6SoW1vrpqp3QKQY04EQL811TwnoKzaphC3fv4BavjRAnm\n\tYW0WevONkLGxjSckSkwS2Ek+9rEqGAjs208Ic1t6SzjkClFREr/OAY4K2yyK40Kz8t\n\tkzWsvLOwUHwzqOEkwv/RWerYovyEJw7OEQGqPbeI=" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"DFzyrnJi\"; dkim-atps=neutral", "To": "libcamera devel <libcamera-devel@lists.libcamera.org>", "Date": "Thu, 31 Mar 2022 13:10:32 +0100", "Message-Id": "<20220331121032.2150025-1-kieran.bingham@ideasonboard.com>", "X-Mailer": "git-send-email 2.32.0", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH] ipa: ipu3: af: enforce grid size\n\trestrictions", "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": "Kieran Bingham via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>", "Reply-To": "Kieran Bingham <kieran.bingham@ideasonboard.com>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Provide enforcement of the selection of the block_{width,height}_log2\nparameters to the capabilities of the hardware.\n\nWhile this selection is currently hardcoded to the minimum, providing\nthe restriction now allows for further dynamic sizing in the future and\ndocuments the restrictions directly in code, making use of the already\nexisting constants.\n\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n\nNote, this is kept separate from my other AF improvement series, as it\ncan be applied independantly - but due to a compilation failure if\nkAfMinGridBlockWidth, kAfMaxGridBlockWidth kAfMinGridBlockHeight, and\nkAfMaxGridBlockHeight are not used, this patch must be applied before\nthat series can be integrated.\n\n src/ipa/ipu3/algorithms/af.cpp | 16 ++++++++++++++++\n 1 file changed, 16 insertions(+)", "diff": "diff --git a/src/ipa/ipu3/algorithms/af.cpp b/src/ipa/ipu3/algorithms/af.cpp\nindex 6c25d02ec7f0..abfaad6164f1 100644\n--- a/src/ipa/ipu3/algorithms/af.cpp\n+++ b/src/ipa/ipu3/algorithms/af.cpp\n@@ -139,6 +139,22 @@ int Af::configure(IPAContext &context, const IPAConfigInfo &configInfo)\n \tgrid.height = kAfMinGridHeight;\n \tgrid.block_width_log2 = kAfMinGridBlockWidth;\n \tgrid.block_height_log2 = kAfMinGridBlockHeight;\n+\n+\t/*\n+\t * \\todo - while this clamping code is effectively a no-op, it satisfies\n+\t * the compiler that the definitions regarding the hardware restrictions\n+\t * are used, and paves the way to support dynamic grid sizing in the\n+\t * future. While the block_{width,height}_log2 remain assigned to the\n+\t * minimum, this code should be optimized out by the compiler.\n+\t */\n+\tgrid.block_width_log2 = std::clamp(grid.block_width_log2,\n+\t\t\t\t\t kAfMinGridBlockWidth,\n+\t\t\t\t\t kAfMaxGridBlockWidth);\n+\n+\tgrid.block_height_log2 = std::clamp(grid.block_height_log2,\n+\t\t\t\t\t kAfMinGridBlockHeight,\n+\t\t\t\t\t kAfMaxGridBlockHeight);\n+\n \tgrid.height_per_slice = kAfDefaultHeightPerSlice;\n \n \t/* Position the AF grid in the center of the BDS output. */\n", "prefixes": [ "libcamera-devel" ] }