From patchwork Mon Jun 30 08:11:18 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Klug X-Patchwork-Id: 23689 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 99963C3237 for ; Mon, 30 Jun 2025 08:11:46 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 5010268E00; Mon, 30 Jun 2025 10:11:45 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="ufCRbK8t"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 3B3E161529 for ; Mon, 30 Jun 2025 10:11:41 +0200 (CEST) Received: from ideasonboard.com (unknown [IPv6:2a00:6020:448c:6c00:883b:eaf8:7aec:d1d4]) by perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 9F16C1352; Mon, 30 Jun 2025 10:11:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1751271079; bh=0FD3dymIMrRUYE8sCRP1lb5ss/0Vt5MX7pZmwpw9qF4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ufCRbK8tNq9IZz8fu1iWGQUfi5ZyMLJHr1EZxKPwyiOHCRZoWZz3QSlVkMEUFsOij n952I7xS6XYPiBxUTFfS8xU1r0YrgtUQmtYL672tEoZefyrexQGEP9hC/HZv1U3OtE EjlOb86kFp99pCCTVaodJq9Wq7VJrLtHq1nntqgA= From: Stefan Klug To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug Subject: [PATCH v1 3/6] pipeline: rkisp1: Limit the maximum number of buffers queued in Date: Mon, 30 Jun 2025 10:11:18 +0200 Message-ID: <20250630081126.2384387-4-stefan.klug@ideasonboard.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250630081126.2384387-1-stefan.klug@ideasonboard.com> References: <20250630081126.2384387-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 --- Changes in v1: - Replaced function overload with constructor param --- src/libcamera/pipeline/rkisp1/rkisp1.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp index 675f0a7490a6..bd14ab237064 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: @@ -684,7 +690,7 @@ CameraConfiguration::Status RkISP1CameraConfiguration::validate() */ PipelineHandlerRkISP1::PipelineHandlerRkISP1(CameraManager *manager) - : PipelineHandler(manager), hasSelfPath_(true), useDewarper_(false) + : PipelineHandler(manager, kPipelineDepth), hasSelfPath_(true), useDewarper_(false) { }