Show a patch.

GET /api/1.1/patches/25452/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 25452,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/25452/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/25452/",
    "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": "<20251210131302.81887-2-naush@raspberrypi.com>",
    "date": "2025-12-10T13:09:13",
    "name": "[v1,1/2] pipeline: rpi: Rename Stream::prepareBuffers to Stream::allocateBuffers",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "31466686a200a1b9dda7da002e19dc3325ed63b1",
    "submitter": {
        "id": 34,
        "url": "https://patchwork.libcamera.org/api/1.1/people/34/?format=api",
        "name": "Naushir Patuck",
        "email": "naush@raspberrypi.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/25452/mbox/",
    "series": [
        {
            "id": 5647,
            "url": "https://patchwork.libcamera.org/api/1.1/series/5647/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5647",
            "date": "2025-12-10T13:09:12",
            "name": "RPi: Internal buffer alloaction rework",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/5647/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/25452/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/25452/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 D4BCABD1F1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 10 Dec 2025 13:13:11 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 965466144F;\n\tWed, 10 Dec 2025 14:13:09 +0100 (CET)",
            "from mail-wr1-x435.google.com (mail-wr1-x435.google.com\n\t[IPv6:2a00:1450:4864:20::435])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D2547613F9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 10 Dec 2025 14:13:06 +0100 (CET)",
            "by mail-wr1-x435.google.com with SMTP id\n\tffacd0b85a97d-42fa41ab783so77761f8f.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 10 Dec 2025 05:13:06 -0800 (PST)",
            "from naush-dell.pitowers.org\n\t([2a00:1098:3142:1f:2883:e222:5478:b981])\n\tby smtp.gmail.com with ESMTPSA id\n\tffacd0b85a97d-42f7cbfee71sm37871852f8f.15.2025.12.10.05.13.05\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tWed, 10 Dec 2025 05:13:05 -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=\"hOtQ1whE\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1765372386; x=1765977186;\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=+HKOsXbeFnDaXB5V33Ov1KE5juYlsep1OB8dvM1Xc7A=;\n\tb=hOtQ1whEfvAsHGxTq60gWyDYMD3pyfdQysH+AAjJHS3zTTJbTSuG8TMYhq3CEkuLGn\n\t/QzB2oR2N4dNz1UELu4MS8VWarcDLBxcDgg3UA4U6Ba8pE3uePQG4tSHYGg0YcWbf6XM\n\t1cHJwavdTgmgdVz7qU/iN09GgDOYylCJiCrZ9DzX1i2uT+TnZme5Hj13yszE63OCvg80\n\tNvIZ1Jma41IqMtjTUDjiJwU3CYs18u426vdT1J+DiCoZw/hNqEGx/aFE0pB9Zs1Lu6ls\n\tJJXJJYHEySXqRHvNVNvtgWd3czt/i8rOAfJ9zA/Q3Io28Aki6+R3Jp2sVI3Xzi6y92nz\n\t6icA==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1765372386; x=1765977186;\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=+HKOsXbeFnDaXB5V33Ov1KE5juYlsep1OB8dvM1Xc7A=;\n\tb=ooldQP/p8kG/8IDFMMU6TYWErXGy/BIk23ULxkWkGnbaR/6OT9ARyO1yh/Nno5hWUa\n\tX57r++bFVpxYxCJGQBmGZm1BpiMwX68yyzUv6+AM/j24hYLKEdcb8jPyVAbAc8e3hF+e\n\t33echO/ctH7do8LnCzaWMjK/lS8kWJ9Il0TUv/fNMwu7L8S+Djg+URapQmSemRDIxd+q\n\tTXsJ+bRicKK2fl6e4V6xIavlXRu0QcXdN/nT9xwyUZDNjMICJBVsgkWQiYPMuvEMqJUX\n\tvl+H0cJzXedR4pJkRGnLd+XXfDd9ABTJW9g7qy6wS5MM+n3wDtypj9LfREXLe8BBeFdG\n\tePTg==",
        "X-Gm-Message-State": "AOJu0YwEi8+1Zten47ovI3nLpHIjPRZfjAJ0nkvexUS4qWRwvg3/Ux2j\n\tO/OgRC89nvRTyEI/V3P3ZKWhUT0Sy33OAa5jgQC5ESGFUl8m3iqV82G2sb5aERviGPvrQl2BRZj\n\tYf76Id9k=",
        "X-Gm-Gg": "ASbGnct/Atdut3jLAkgHemSoBEyqVC697FPbjabJVhBui+PC5Qyy8THbDHBsjFlMcy1\n\tTKyTODcxc0Mg69+7XT7H0ulkpFz3lUsZ7T2qmDcymCfZcmfFSAN+TXu8LyWL0+C/1L0G0QTIeUI\n\teyPyQ1CMPbswZQ6D3lhD3Lq43KcZ+vn/vSCuaYOOUpvrTS3480yGiiVilw53PvJV6EgLWOnP88z\n\t6uZG/pyrwFBRAZ0eU9lx5EwK76kTuwF2FnbVq6jVd4R3UCx1zrjQvDMHvUdnuZ1xRQ/x91gfyES\n\txCkLPqjWXeP9IxFGwhTJfw88len0QTXohjXAZoOj9z2q3fkWBNNzW4cp5/9R8QHWplfNcrVgGDL\n\t3YIoyj1W03lpj6EuqX7EvD3VRTVFJaTzoZoFQpgFm1MxRd3mzrNutmM/XuSA8+BSqWn/CYb2hJK\n\trzObNrJlEpBw1dd8r/ahHf0easGZaV0R4=",
        "X-Google-Smtp-Source": "AGHT+IGZaio1Q8FcYSStHBwmTscIIMF0Crc0aBK/dzxwyEbZFKdnmyBTRHNepZtxN2zHzWPyDG+7+Q==",
        "X-Received": "by 2002:a05:600c:1f89:b0:477:563a:fc9c with SMTP id\n\t5b1f17b1804b1-47a837946eemr15091155e9.1.1765372386056; \n\tWed, 10 Dec 2025 05:13:06 -0800 (PST)",
        "From": "Naushir Patuck <naush@raspberrypi.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Cc": "Naushir Patuck <naush@raspberrypi.com>",
        "Subject": "[PATCH v1 1/2] pipeline: rpi: Rename Stream::prepareBuffers to\n\tStream::allocateBuffers",
        "Date": "Wed, 10 Dec 2025 13:09:13 +0000",
        "Message-ID": "<20251210131302.81887-2-naush@raspberrypi.com>",
        "X-Mailer": "git-send-email 2.51.0",
        "In-Reply-To": "<20251210131302.81887-1-naush@raspberrypi.com>",
        "References": "<20251210131302.81887-1-naush@raspberrypi.com>",
        "MIME-Version": "1.0",
        "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>\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": [
        "v1",
        "1/2"
    ]
}