From patchwork Mon May 26 21:42:17 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Klug X-Patchwork-Id: 23448 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 23BE6C31E9 for ; Mon, 26 May 2025 21:42:49 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id BAEF468DA7; Mon, 26 May 2025 23:42:48 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="jElVEutD"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 0172468D93 for ; Mon, 26 May 2025 23:42:46 +0200 (CEST) Received: from ideasonboard.com (tmo-070-11.customers.d1-online.com [80.187.70.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id C6477581; Mon, 26 May 2025 23:42:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1748295741; bh=cad+Sh35Ee0cV8HU6tfRJab4K/W3dgBgRbeIF0D6n3g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jElVEutDN5luF+NsN16Ox03gIZPNJAN0lkVAJ3o0bWjLQ/ZfjJzQ7qB2pu3VU/CBe ANyd2GY31UGatpJxNgyqAWOfflfmuip+0dZ32X3wwuuUjS1WPaMMTdMIV0sWvAcBIG yiC+jzqf8U0UDlkw1hcjrtVIDu+3OhGo4xy1nMNo= From: Stefan Klug To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug Subject: [RFC PATCH 3/4] pipeline: rkisp1: Limit the maximum number of buffers queued in Date: Mon, 26 May 2025 23:42:17 +0200 Message-ID: <20250526214224.13631-4-stefan.klug@ideasonboard.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250526214224.13631-1-stefan.klug@ideasonboard.com> References: <20250526214224.13631-1-stefan.klug@ideasonboard.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" To keep the regulation of the algorithms as short as possible and to allow more buffers to be created than the v4l2 device allows to be queued, limit the amount of buffers that get queued into the device to the pipeline depth. Signed-off-by: Stefan Klug --- src/libcamera/pipeline/rkisp1/rkisp1.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp index 675f0a7490a6..af9117c83630 100644 --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp @@ -155,6 +155,12 @@ private: Transform combinedTransform_; }; +namespace { + +const unsigned int kPipelineDepth = 4; + +}; + class PipelineHandlerRkISP1 : public PipelineHandler { public: @@ -171,6 +177,7 @@ public: void stopDevice(Camera *camera) override; int queueRequestDevice(Camera *camera, Request *request) override; + unsigned int maxQueuedRequestsDevice() const override { return kPipelineDepth; } bool match(DeviceEnumerator *enumerator) override;