Patch Detail
Show a patch.
GET /api/patches/25602/?format=api
{ "id": 25602, "url": "https://patchwork.libcamera.org/api/patches/25602/?format=api", "web_url": "https://patchwork.libcamera.org/patch/25602/", "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": "<20251218123524.130886-2-naush@raspberrypi.com>", "date": "2025-12-18T12:31:23", "name": "[v2,1/2] pipeline: rpi: Rename Stream::prepareBuffers to Stream::allocateBuffers", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "31466686a200a1b9dda7da002e19dc3325ed63b1", "submitter": { "id": 34, "url": "https://patchwork.libcamera.org/api/people/34/?format=api", "name": "Naushir Patuck", "email": "naush@raspberrypi.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/25602/mbox/", "series": [ { "id": 5671, "url": "https://patchwork.libcamera.org/api/series/5671/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5671", "date": "2025-12-18T12:31:22", "name": "RPi: Internal buffer alloaction rework", "version": 2, "mbox": "https://patchwork.libcamera.org/series/5671/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/25602/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/25602/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 5395BC326C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 18 Dec 2025 12:35:37 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CDE0B61AA8;\n\tThu, 18 Dec 2025 13:35:36 +0100 (CET)", "from mail-wr1-x429.google.com (mail-wr1-x429.google.com\n\t[IPv6:2a00:1450:4864:20::429])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 14BF561A61\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 18 Dec 2025 13:35:34 +0100 (CET)", "by mail-wr1-x429.google.com with SMTP id\n\tffacd0b85a97d-430f38c7d4eso27945f8f.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 18 Dec 2025 04:35:34 -0800 (PST)", "from naush-dell.pitowers.org\n\t([2a00:1098:3142:1f:1670:643a:b830:51f7])\n\tby smtp.gmail.com with ESMTPSA id\n\tffacd0b85a97d-4324493fd73sm4769434f8f.13.2025.12.18.04.35.32\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 18 Dec 2025 04:35:33 -0800 (PST)" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"Vk0sgr8f\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1766061333; x=1766666133;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=YJ+F3mOgAHj9/6mDr8cNT7N9zqrSNuf3WOT2ofJXRf8=;\n\tb=Vk0sgr8f8rERtgl9bsJLlbGxxFvt0FmzKWBYJW3pflE1ZpsRW1gfuu8aQn0JvLTI+7\n\t04nRLz5CyrVU0nHgfPdRq3w+99xgTQQXzHwjDKGwxP4wP10fJyFtZPMEIIsWpLdAo0nm\n\tgmD0zrfcpPXhrRkKFOOCyK6IPkrqMkCfatAsM0lvuo14AmGpVeLe63NuYKng88SluV8f\n\tHTuaFwMVBm77D322gZSpMwCB+u09sOYZwwpvgwXcSpQdKekqSq64DNfvv890US/Z8b5i\n\tNiHmjSTOGdaX2xRILoADVtrjBDSwkCxqyQd4BrbZMsaX5/q5TXOb+09zu6CdIBF+OkR2\n\tDJcA==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1766061333; x=1766666133;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n\t:to:cc:subject:date:message-id:reply-to;\n\tbh=YJ+F3mOgAHj9/6mDr8cNT7N9zqrSNuf3WOT2ofJXRf8=;\n\tb=aQV4Tx96KNmoVv4r9LxxQbJQ/iT4tmvXRjOJ7SDzvzlpAy+KWDqCHjcN4ylVqrz5P8\n\tg2XlAzGs/PoqUvTk4kl8L7vJGNeCvLgJ6XjDTKuyT5Lf93fhIvhA07BnlgKLVWQGGabG\n\ttQE8TldgAWV3CD5bwQyLRP6TdSamfP86gt76L0+tmoYgLXzw8738B0yeYHQ2HfRLlh4W\n\tX/z01Zbxo8039u/j7q5jPvNsv4gXRvfOwjL5HCjVBrGV+NIHiRtYbTJf3gFvbeEgCOYP\n\trNg1NwYBXidGyELfcgQmrvwqMuT+2calTmf5z0wWvt0fOfro4geuXIyYcCHxD0BgZ/oz\n\tlNKQ==", "X-Gm-Message-State": "AOJu0YwRqfLEN0772AH3uPc4y7cvPjeqwhGGu6b8gRv7uGsKQm/g3l26\n\tA5Uw0qKaSB+sudO7cwEcmO9uFOlfkAnefX37IpznwPUdScPCioIqDRgSYmXY1k+BSR8RXQsMBYu\n\truCK3", "X-Gm-Gg": "AY/fxX5ctQbepcGUHokIpMs5BrDL2wlrhnXBXisxq9dJVC4KGrfKe7vGY4SRbMEAfwl\n\tvHVHWfEduR1pfLm6PNBEslNUMUsRZatRFRAnxGYeNDKGDeyIZmdAxIGObCmGoqh4I2HOpOwBmdR\n\tzymOeN3rs2ufjBkbg9dZLfo/7wFPs6Zs9GWisrr3o5USNika2t4t4ljxvz9lZ9o6rxqPU1o5kLn\n\tkk0NLz8VcREKYN06YTb0pTZZVxNj4BXZQQg1Ibt8I4Gx8tNSqb8Nyr78q4ynl58fyMM21L8umgN\n\tjAyvynQtwQ6LTIFqhyHI8h6yLeRDeA4ry93QBLqLBSHL41CW4/cQpkXRuK+GjrNK7pufWnjGjXS\n\tdnrdsJL+aW9RqapsKoTcWnCScQIrUpgx7OF69PxCoHVWDbCLyj8Bgsas1jGk4HepbwnMdV99BUz\n\taaYRyl1zhiJ7CSF0vvRFBhjdKNboj7DVM=", "X-Google-Smtp-Source": "AGHT+IH8fchTrazZlCNx6QkSiQEuKydxAofFcvnzWLstMGs2FUtNtqSUu9pa1X779LQ4WoLTU1kT+A==", "X-Received": "by 2002:a5d:5f51:0:b0:431:6ba:38c4 with SMTP id\n\tffacd0b85a97d-4324686f55fmr1530032f8f.8.1766061333262; \n\tThu, 18 Dec 2025 04:35:33 -0800 (PST)", "From": "Naushir Patuck <naush@raspberrypi.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Jacopo Mondi <jacopo.mondi@ideasonboard.com>, Naushir Patuck\n\t<naush@raspberrypi.com>, =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?=\n\t<barnabas.pocze@ideasonboard.com>", "Subject": "[PATCH v2 1/2] pipeline: rpi: Rename Stream::prepareBuffers to\n\tStream::allocateBuffers", "Date": "Thu, 18 Dec 2025 12:31:23 +0000", "Message-ID": "<20251218123524.130886-2-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.51.0", "In-Reply-To": "<20251218123524.130886-1-naush@raspberrypi.com>", "References": "<20251218123524.130886-1-naush@raspberrypi.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": "This rename is in preparation for a subsequent change where only\nbuffer allocations happen in this function.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\nReviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n---\n src/libcamera/pipeline/rpi/common/pipeline_base.cpp | 2 +-\n src/libcamera/pipeline/rpi/common/pipeline_base.h | 2 +-\n src/libcamera/pipeline/rpi/common/rpi_stream.cpp | 2 +-\n src/libcamera/pipeline/rpi/common/rpi_stream.h | 2 +-\n src/libcamera/pipeline/rpi/pisp/pisp.cpp | 6 +++---\n src/libcamera/pipeline/rpi/vc4/vc4.cpp | 6 +++---\n 6 files changed, 10 insertions(+), 10 deletions(-)", "diff": "diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\nindex 9d65dc83573b..2b61b5d241c5 100644\n--- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n+++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n@@ -668,7 +668,7 @@ int PipelineHandlerBase::start(Camera *camera, const ControlList *controls)\n \n \tif (!data->buffersAllocated_) {\n \t\t/* Allocate buffers for internal pipeline usage. */\n-\t\tret = prepareBuffers(camera);\n+\t\tret = allocateBuffers(camera);\n \t\tif (ret) {\n \t\t\tLOG(RPI, Error) << \"Failed to allocate buffers\";\n \t\t\tdata->freeBuffers();\ndiff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.h b/src/libcamera/pipeline/rpi/common/pipeline_base.h\nindex 15628259afc6..0c6354493548 100644\n--- a/src/libcamera/pipeline/rpi/common/pipeline_base.h\n+++ b/src/libcamera/pipeline/rpi/common/pipeline_base.h\n@@ -242,7 +242,7 @@ private:\n \t}\n \n \tint queueAllBuffers(Camera *camera);\n-\tvirtual int prepareBuffers(Camera *camera) = 0;\n+\tvirtual int allocateBuffers(Camera *camera) = 0;\n };\n \n class RPiCameraConfiguration final : public CameraConfiguration\ndiff --git a/src/libcamera/pipeline/rpi/common/rpi_stream.cpp b/src/libcamera/pipeline/rpi/common/rpi_stream.cpp\nindex accf59eb424e..e73f4b7d31af 100644\n--- a/src/libcamera/pipeline/rpi/common/rpi_stream.cpp\n+++ b/src/libcamera/pipeline/rpi/common/rpi_stream.cpp\n@@ -106,7 +106,7 @@ void Stream::setExportedBuffer(FrameBuffer *buffer)\n \tbufferEmplace(++id_, buffer);\n }\n \n-int Stream::prepareBuffers(unsigned int count)\n+int Stream::allocateBuffers(unsigned int count)\n {\n \tint ret;\n \ndiff --git a/src/libcamera/pipeline/rpi/common/rpi_stream.h b/src/libcamera/pipeline/rpi/common/rpi_stream.h\nindex 0dba12961743..c267447e5ab5 100644\n--- a/src/libcamera/pipeline/rpi/common/rpi_stream.h\n+++ b/src/libcamera/pipeline/rpi/common/rpi_stream.h\n@@ -125,7 +125,7 @@ public:\n \n \tvoid setExportedBuffer(FrameBuffer *buffer);\n \n-\tint prepareBuffers(unsigned int count);\n+\tint allocateBuffers(unsigned int count);\n \tint queueBuffer(FrameBuffer *buffer);\n \tvoid returnBuffer(FrameBuffer *buffer);\n \ndiff --git a/src/libcamera/pipeline/rpi/pisp/pisp.cpp b/src/libcamera/pipeline/rpi/pisp/pisp.cpp\nindex 77acd2f64092..7bcba32b9b58 100644\n--- a/src/libcamera/pipeline/rpi/pisp/pisp.cpp\n+++ b/src/libcamera/pipeline/rpi/pisp/pisp.cpp\n@@ -864,7 +864,7 @@ private:\n \t\treturn static_cast<PiSPCameraData *>(camera->_d());\n \t}\n \n-\tint prepareBuffers(Camera *camera) override;\n+\tint allocateBuffers(Camera *camera) override;\n \tint platformRegister(std::unique_ptr<RPi::CameraData> &cameraData,\n \t\t\t std::shared_ptr<MediaDevice> cfe,\n \t\t\t std::shared_ptr<MediaDevice> isp) override;\n@@ -958,7 +958,7 @@ bool PipelineHandlerPiSP::match(DeviceEnumerator *enumerator)\n \treturn false;\n }\n \n-int PipelineHandlerPiSP::prepareBuffers(Camera *camera)\n+int PipelineHandlerPiSP::allocateBuffers(Camera *camera)\n {\n \tPiSPCameraData *data = cameraData(camera);\n \tunsigned int numRawBuffers = 0;\n@@ -1021,7 +1021,7 @@ int PipelineHandlerPiSP::prepareBuffers(Camera *camera)\n \t\tLOG(RPI, Debug) << \"Preparing \" << numBuffers\n \t\t\t\t<< \" buffers for stream \" << stream->name();\n \n-\t\tret = stream->prepareBuffers(numBuffers);\n+\t\tret = stream->allocateBuffers(numBuffers);\n \t\tif (ret < 0)\n \t\t\treturn ret;\n \t}\ndiff --git a/src/libcamera/pipeline/rpi/vc4/vc4.cpp b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\nindex f0cb99d59e74..8a80439e9082 100644\n--- a/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n+++ b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n@@ -158,7 +158,7 @@ private:\n \t\treturn static_cast<Vc4CameraData *>(camera->_d());\n \t}\n \n-\tint prepareBuffers(Camera *camera) override;\n+\tint allocateBuffers(Camera *camera) override;\n \tint platformRegister(std::unique_ptr<RPi::CameraData> &cameraData,\n \t\t\t std::shared_ptr<MediaDevice> unicam,\n \t\t\t std::shared_ptr<MediaDevice> isp) override;\n@@ -219,7 +219,7 @@ bool PipelineHandlerVc4::match(DeviceEnumerator *enumerator)\n \treturn false;\n }\n \n-int PipelineHandlerVc4::prepareBuffers(Camera *camera)\n+int PipelineHandlerVc4::allocateBuffers(Camera *camera)\n {\n \tVc4CameraData *data = cameraData(camera);\n \tunsigned int numRawBuffers = 0;\n@@ -289,7 +289,7 @@ int PipelineHandlerVc4::prepareBuffers(Camera *camera)\n \t\tLOG(RPI, Debug) << \"Preparing \" << numBuffers\n \t\t\t\t<< \" buffers for stream \" << stream->name();\n \n-\t\tret = stream->prepareBuffers(numBuffers);\n+\t\tret = stream->allocateBuffers(numBuffers);\n \t\tif (ret < 0)\n \t\t\treturn ret;\n \t}\n", "prefixes": [ "v2", "1/2" ] }