Patch Detail
Show a patch.
GET /api/1.1/patches/23748/?format=api
{ "id": 23748, "url": "https://patchwork.libcamera.org/api/1.1/patches/23748/?format=api", "web_url": "https://patchwork.libcamera.org/patch/23748/", "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": "<20250707075400.9079-6-stefan.klug@ideasonboard.com>", "date": "2025-07-07T07:53:39", "name": "[v2,5/5] libcamera: pipeline: rkisp1: Don't rely on bufferCount", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "7133798cc52bf178eec86b01c3091f6aee64216e", "submitter": { "id": 184, "url": "https://patchwork.libcamera.org/api/1.1/people/184/?format=api", "name": "Stefan Klug", "email": "stefan.klug@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/23748/mbox/", "series": [ { "id": 5272, "url": "https://patchwork.libcamera.org/api/1.1/series/5272/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5272", "date": "2025-07-07T07:53:34", "name": "rkisp1: Allow usage of more than 4 buffers", "version": 2, "mbox": "https://patchwork.libcamera.org/series/5272/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/23748/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/23748/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 AB15FC3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 7 Jul 2025 07:54:32 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id EEC5968E8C;\n\tMon, 7 Jul 2025 09:54:30 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0FA6968E7F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 7 Jul 2025 09:54:27 +0200 (CEST)", "from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:c79f:85df:e7f5:4c31])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 6FEF6526;\n\tMon, 7 Jul 2025 09:54:00 +0200 (CEST)" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"OmF3gamY\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1751874840;\n\tbh=cBLlwMkHnt0QokXhGoBIX4pd2dZBqswCjcQIZw5Nq2Q=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=OmF3gamYA5ph9AGiWh4BKXccqgHnd8LKl3C9y+Hu7EpR5u/Sy6oVb5d8x+0f8mNR8\n\t0AEW1te3g3KYrqabmonWEWc6YjxUesjupMepVCYHwmtnbSOP5Qii7h8FKXRMl0AZ+A\n\tAY8muOfo99uaIwIZcet23wT6RCWnVYmfdCvfvUj4=", "From": "Stefan Klug <stefan.klug@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Stefan Klug <stefan.klug@ideasonboard.com>, =?utf-8?b?TsOtY29sYXMgRi4g?=\n\t=?utf-8?q?R=2E_A=2E_Prado?= <nfraprado@collabora.com>,\n\tPaul Elder <paul.elder@ideasonboard.com>, =?utf-8?q?Sven_P=C3=BCschel?=\n\t<s.pueschel@pengutronix.de>", "Subject": "[PATCH v2 5/5] libcamera: pipeline: rkisp1: Don't rely on\n\tbufferCount", "Date": "Mon, 7 Jul 2025 09:53:39 +0200", "Message-ID": "<20250707075400.9079-6-stefan.klug@ideasonboard.com>", "X-Mailer": "git-send-email 2.48.1", "In-Reply-To": "<20250707075400.9079-1-stefan.klug@ideasonboard.com>", "References": "<20250707075400.9079-1-stefan.klug@ideasonboard.com>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "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": "From: Nícolas F. R. A. Prado <nfraprado@collabora.com>\n\nCurrently the rkisp1 pipeline handler relies on bufferCount to decide on\nthe number of parameter and statistics buffers to allocate internally.\nInstead, the number of internal buffers should be the minimum required\nby the pipeline to keep the requests flowing, in order to avoid wasting\nmemory.\n\nStop relying on bufferCount for these numbers and instead set them to\nkPipelineDepth, as this already limits the number of buffers queued\nto the driver.\n\nSigned-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\nSigned-off-by: Sven Püschel <s.pueschel@pengutronix.de>\n---\n src/libcamera/pipeline/rkisp1/rkisp1.cpp | 15 +++++++--------\n 1 file changed, 7 insertions(+), 8 deletions(-)", "diff": "diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\nindex bdaeb935ee06..8591e4868e6f 100644\n--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n@@ -157,6 +157,10 @@ private:\n \n namespace {\n \n+/*\n+ * This many internal buffers (or rather parameter and statistics buffer\n+ * pairs) ensures that the pipeline runs smoothly, without frame drops.\n+ */\n const unsigned int kPipelineDepth = 4;\n \n } // namespace\n@@ -990,24 +994,19 @@ int PipelineHandlerRkISP1::allocateBuffers(Camera *camera)\n \tunsigned int ipaBufferId = 1;\n \tint ret;\n \n-\tunsigned int maxCount = std::max({\n-\t\tdata->mainPathStream_.configuration().bufferCount,\n-\t\tdata->selfPathStream_.configuration().bufferCount,\n-\t});\n-\n \tif (!isRaw_) {\n-\t\tret = param_->allocateBuffers(maxCount, ¶mBuffers_);\n+\t\tret = param_->allocateBuffers(kPipelineDepth, ¶mBuffers_);\n \t\tif (ret < 0)\n \t\t\tgoto error;\n \n-\t\tret = stat_->allocateBuffers(maxCount, &statBuffers_);\n+\t\tret = stat_->allocateBuffers(kPipelineDepth, &statBuffers_);\n \t\tif (ret < 0)\n \t\t\tgoto error;\n \t}\n \n \t/* If the dewarper is being used, allocate internal buffers for ISP. */\n \tif (useDewarper_) {\n-\t\tret = mainPath_.exportBuffers(maxCount, &mainPathBuffers_);\n+\t\tret = mainPath_.exportBuffers(kPipelineDepth, &mainPathBuffers_);\n \t\tif (ret < 0)\n \t\t\tgoto error;\n \n", "prefixes": [ "v2", "5/5" ] }