Patch Detail
Show a patch.
GET /api/1.1/patches/23843/?format=api
{ "id": 23843, "url": "https://patchwork.libcamera.org/api/1.1/patches/23843/?format=api", "web_url": "https://patchwork.libcamera.org/patch/23843/", "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": "<20250717125931.2848300-6-stefan.klug@ideasonboard.com>", "date": "2025-07-17T12:59:25", "name": "[v3,5/5] libcamera: pipeline: rkisp1: Don't rely on bufferCount", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "c4b5a2cff976c7c837c6cf38a84a1181634fe109", "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/23843/mbox/", "series": [ { "id": 5294, "url": "https://patchwork.libcamera.org/api/1.1/series/5294/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5294", "date": "2025-07-17T12:59:20", "name": "rkisp1: Allow usage of more than 4 buffers", "version": 3, "mbox": "https://patchwork.libcamera.org/series/5294/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/23843/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/23843/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 0E06DC3237\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 17 Jul 2025 12:59:52 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C926768F83;\n\tThu, 17 Jul 2025 14:59:51 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 53FEB68F93\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 17 Jul 2025 14:59:50 +0200 (CEST)", "from ideasonboard.com (unknown\n\t[IPv6:2a00:6020:448c:6c00:7b93:8acd:d82d:248d])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 4D8AE1AE2; \n\tThu, 17 Jul 2025 14:59:16 +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=\"vMZONg5i\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1752757156;\n\tbh=32FzGRPrD4vv/UWqGVTPoI/Y6AtCsuXpNcBj2K7hHvw=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=vMZONg5iZCuK2eJJ58TO7i/col6Y2ODEzgkhdzjFNjBrxKf1fxMS+uAmHb/91sHNn\n\ticqmLQzJPaf+aNGhO3pbzVQ0M7vM0EAaPJo/6ARCaAx2/HjJIvMfgIoIBiArrmPNPS\n\tXxWW/+mJvRW7miNsY/PZfEuL0o18HVSnxuNavk2U=", "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>, Kieran Bingham\n\t<kieran.bingham@ideasonboard.com>, Umang Jain <uajain@igalia.com>", "Subject": "[PATCH v3 5/5] libcamera: pipeline: rkisp1: Don't rely on\n\tbufferCount", "Date": "Thu, 17 Jul 2025 14:59:25 +0200", "Message-ID": "<20250717125931.2848300-6-stefan.klug@ideasonboard.com>", "X-Mailer": "git-send-email 2.48.1", "In-Reply-To": "<20250717125931.2848300-1-stefan.klug@ideasonboard.com>", "References": "<20250717125931.2848300-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\nkRkISP1MinBufferCount.\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>\nSigned-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\nReviewed-by: Umang Jain <uajain@igalia.com>\n\n---\n\nChanges in v3:\n- Collected tags\n- Updated cmmit message\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 aee267a90f4b..3d92b50c7d27 100644\n--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n@@ -164,6 +164,10 @@ namespace {\n */\n static constexpr unsigned int kRkISP1MaxQueuedRequests = 4;\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 static constexpr unsigned int kRkISP1MinBufferCount = 4;\n \n } // namespace\n@@ -1004,24 +1008,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(kRkISP1MinBufferCount, ¶mBuffers_);\n \t\tif (ret < 0)\n \t\t\tgoto error;\n \n-\t\tret = stat_->allocateBuffers(maxCount, &statBuffers_);\n+\t\tret = stat_->allocateBuffers(kRkISP1MinBufferCount, &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(kRkISP1MinBufferCount, &mainPathBuffers_);\n \t\tif (ret < 0)\n \t\t\tgoto error;\n \n", "prefixes": [ "v3", "5/5" ] }