From patchwork Thu Dec 18 12:31:23 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 25602 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 5395BC326C for ; Thu, 18 Dec 2025 12:35:37 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id CDE0B61AA8; Thu, 18 Dec 2025 13:35:36 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="Vk0sgr8f"; dkim-atps=neutral Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 14BF561A61 for ; Thu, 18 Dec 2025 13:35:34 +0100 (CET) Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-430f38c7d4eso27945f8f.3 for ; Thu, 18 Dec 2025 04:35:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1766061333; x=1766666133; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YJ+F3mOgAHj9/6mDr8cNT7N9zqrSNuf3WOT2ofJXRf8=; b=Vk0sgr8f8rERtgl9bsJLlbGxxFvt0FmzKWBYJW3pflE1ZpsRW1gfuu8aQn0JvLTI+7 04nRLz5CyrVU0nHgfPdRq3w+99xgTQQXzHwjDKGwxP4wP10fJyFtZPMEIIsWpLdAo0nm gmD0zrfcpPXhrRkKFOOCyK6IPkrqMkCfatAsM0lvuo14AmGpVeLe63NuYKng88SluV8f HTuaFwMVBm77D322gZSpMwCB+u09sOYZwwpvgwXcSpQdKekqSq64DNfvv890US/Z8b5i NiHmjSTOGdaX2xRILoADVtrjBDSwkCxqyQd4BrbZMsaX5/q5TXOb+09zu6CdIBF+OkR2 DJcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766061333; x=1766666133; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=YJ+F3mOgAHj9/6mDr8cNT7N9zqrSNuf3WOT2ofJXRf8=; b=aQV4Tx96KNmoVv4r9LxxQbJQ/iT4tmvXRjOJ7SDzvzlpAy+KWDqCHjcN4ylVqrz5P8 g2XlAzGs/PoqUvTk4kl8L7vJGNeCvLgJ6XjDTKuyT5Lf93fhIvhA07BnlgKLVWQGGabG tQE8TldgAWV3CD5bwQyLRP6TdSamfP86gt76L0+tmoYgLXzw8738B0yeYHQ2HfRLlh4W X/z01Zbxo8039u/j7q5jPvNsv4gXRvfOwjL5HCjVBrGV+NIHiRtYbTJf3gFvbeEgCOYP rNg1NwYBXidGyELfcgQmrvwqMuT+2calTmf5z0wWvt0fOfro4geuXIyYcCHxD0BgZ/oz lNKQ== X-Gm-Message-State: AOJu0YwRqfLEN0772AH3uPc4y7cvPjeqwhGGu6b8gRv7uGsKQm/g3l26 A5Uw0qKaSB+sudO7cwEcmO9uFOlfkAnefX37IpznwPUdScPCioIqDRgSYmXY1k+BSR8RXQsMBYu ruCK3 X-Gm-Gg: AY/fxX5ctQbepcGUHokIpMs5BrDL2wlrhnXBXisxq9dJVC4KGrfKe7vGY4SRbMEAfwl vHVHWfEduR1pfLm6PNBEslNUMUsRZatRFRAnxGYeNDKGDeyIZmdAxIGObCmGoqh4I2HOpOwBmdR zymOeN3rs2ufjBkbg9dZLfo/7wFPs6Zs9GWisrr3o5USNika2t4t4ljxvz9lZ9o6rxqPU1o5kLn kk0NLz8VcREKYN06YTb0pTZZVxNj4BXZQQg1Ibt8I4Gx8tNSqb8Nyr78q4ynl58fyMM21L8umgN jAyvynQtwQ6LTIFqhyHI8h6yLeRDeA4ry93QBLqLBSHL41CW4/cQpkXRuK+GjrNK7pufWnjGjXS dnrdsJL+aW9RqapsKoTcWnCScQIrUpgx7OF69PxCoHVWDbCLyj8Bgsas1jGk4HepbwnMdV99BUz aaYRyl1zhiJ7CSF0vvRFBhjdKNboj7DVM= X-Google-Smtp-Source: AGHT+IH8fchTrazZlCNx6QkSiQEuKydxAofFcvnzWLstMGs2FUtNtqSUu9pa1X779LQ4WoLTU1kT+A== X-Received: by 2002:a5d:5f51:0:b0:431:6ba:38c4 with SMTP id ffacd0b85a97d-4324686f55fmr1530032f8f.8.1766061333262; Thu, 18 Dec 2025 04:35:33 -0800 (PST) Received: from naush-dell.pitowers.org ([2a00:1098:3142:1f:1670:643a:b830:51f7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4324493fd73sm4769434f8f.13.2025.12.18.04.35.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Dec 2025 04:35:33 -0800 (PST) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Cc: Jacopo Mondi , Naushir Patuck , =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= Subject: [PATCH v2 1/2] pipeline: rpi: Rename Stream::prepareBuffers to Stream::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 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" This rename is in preparation for a subsequent change where only buffer allocations happen in this function. Signed-off-by: Naushir Patuck Reviewed-by: Barnabás Pőcze --- src/libcamera/pipeline/rpi/common/pipeline_base.cpp | 2 +- src/libcamera/pipeline/rpi/common/pipeline_base.h | 2 +- src/libcamera/pipeline/rpi/common/rpi_stream.cpp | 2 +- src/libcamera/pipeline/rpi/common/rpi_stream.h | 2 +- src/libcamera/pipeline/rpi/pisp/pisp.cpp | 6 +++--- src/libcamera/pipeline/rpi/vc4/vc4.cpp | 6 +++--- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp index 9d65dc83573b..2b61b5d241c5 100644 --- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp +++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp @@ -668,7 +668,7 @@ int PipelineHandlerBase::start(Camera *camera, const ControlList *controls) if (!data->buffersAllocated_) { /* Allocate buffers for internal pipeline usage. */ - ret = prepareBuffers(camera); + ret = allocateBuffers(camera); if (ret) { LOG(RPI, Error) << "Failed to allocate buffers"; data->freeBuffers(); diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.h b/src/libcamera/pipeline/rpi/common/pipeline_base.h index 15628259afc6..0c6354493548 100644 --- a/src/libcamera/pipeline/rpi/common/pipeline_base.h +++ b/src/libcamera/pipeline/rpi/common/pipeline_base.h @@ -242,7 +242,7 @@ private: } int queueAllBuffers(Camera *camera); - virtual int prepareBuffers(Camera *camera) = 0; + virtual int allocateBuffers(Camera *camera) = 0; }; class RPiCameraConfiguration final : public CameraConfiguration diff --git a/src/libcamera/pipeline/rpi/common/rpi_stream.cpp b/src/libcamera/pipeline/rpi/common/rpi_stream.cpp index accf59eb424e..e73f4b7d31af 100644 --- a/src/libcamera/pipeline/rpi/common/rpi_stream.cpp +++ b/src/libcamera/pipeline/rpi/common/rpi_stream.cpp @@ -106,7 +106,7 @@ void Stream::setExportedBuffer(FrameBuffer *buffer) bufferEmplace(++id_, buffer); } -int Stream::prepareBuffers(unsigned int count) +int Stream::allocateBuffers(unsigned int count) { int ret; diff --git a/src/libcamera/pipeline/rpi/common/rpi_stream.h b/src/libcamera/pipeline/rpi/common/rpi_stream.h index 0dba12961743..c267447e5ab5 100644 --- a/src/libcamera/pipeline/rpi/common/rpi_stream.h +++ b/src/libcamera/pipeline/rpi/common/rpi_stream.h @@ -125,7 +125,7 @@ public: void setExportedBuffer(FrameBuffer *buffer); - int prepareBuffers(unsigned int count); + int allocateBuffers(unsigned int count); int queueBuffer(FrameBuffer *buffer); void returnBuffer(FrameBuffer *buffer); diff --git a/src/libcamera/pipeline/rpi/pisp/pisp.cpp b/src/libcamera/pipeline/rpi/pisp/pisp.cpp index 77acd2f64092..7bcba32b9b58 100644 --- a/src/libcamera/pipeline/rpi/pisp/pisp.cpp +++ b/src/libcamera/pipeline/rpi/pisp/pisp.cpp @@ -864,7 +864,7 @@ private: return static_cast(camera->_d()); } - int prepareBuffers(Camera *camera) override; + int allocateBuffers(Camera *camera) override; int platformRegister(std::unique_ptr &cameraData, std::shared_ptr cfe, std::shared_ptr isp) override; @@ -958,7 +958,7 @@ bool PipelineHandlerPiSP::match(DeviceEnumerator *enumerator) return false; } -int PipelineHandlerPiSP::prepareBuffers(Camera *camera) +int PipelineHandlerPiSP::allocateBuffers(Camera *camera) { PiSPCameraData *data = cameraData(camera); unsigned int numRawBuffers = 0; @@ -1021,7 +1021,7 @@ int PipelineHandlerPiSP::prepareBuffers(Camera *camera) LOG(RPI, Debug) << "Preparing " << numBuffers << " buffers for stream " << stream->name(); - ret = stream->prepareBuffers(numBuffers); + ret = stream->allocateBuffers(numBuffers); if (ret < 0) return ret; } diff --git a/src/libcamera/pipeline/rpi/vc4/vc4.cpp b/src/libcamera/pipeline/rpi/vc4/vc4.cpp index f0cb99d59e74..8a80439e9082 100644 --- a/src/libcamera/pipeline/rpi/vc4/vc4.cpp +++ b/src/libcamera/pipeline/rpi/vc4/vc4.cpp @@ -158,7 +158,7 @@ private: return static_cast(camera->_d()); } - int prepareBuffers(Camera *camera) override; + int allocateBuffers(Camera *camera) override; int platformRegister(std::unique_ptr &cameraData, std::shared_ptr unicam, std::shared_ptr isp) override; @@ -219,7 +219,7 @@ bool PipelineHandlerVc4::match(DeviceEnumerator *enumerator) return false; } -int PipelineHandlerVc4::prepareBuffers(Camera *camera) +int PipelineHandlerVc4::allocateBuffers(Camera *camera) { Vc4CameraData *data = cameraData(camera); unsigned int numRawBuffers = 0; @@ -289,7 +289,7 @@ int PipelineHandlerVc4::prepareBuffers(Camera *camera) LOG(RPI, Debug) << "Preparing " << numBuffers << " buffers for stream " << stream->name(); - ret = stream->prepareBuffers(numBuffers); + ret = stream->allocateBuffers(numBuffers); if (ret < 0) return ret; }