From patchwork Mon Jul 7 07:53:37 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Klug X-Patchwork-Id: 23746 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 755CCC3237 for ; Mon, 7 Jul 2025 07:54:28 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 1E69E68E8C; Mon, 7 Jul 2025 09:54:28 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="GPnrQ+0O"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 5447068E81 for ; Mon, 7 Jul 2025 09:54:21 +0200 (CEST) Received: from ideasonboard.com (unknown [IPv6:2a00:6020:448c:6c00:c79f:85df:e7f5:4c31]) by perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id B08BD526; Mon, 7 Jul 2025 09:53:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1751874834; bh=+uVycowaiQOfCa898u9FWdwTkf07+tJWQlC/ayNmqOY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GPnrQ+0OucW+GrHkcOR1d2KpOZmhjbqbuJ4qfzlBL4Syq9exXClDiLtuneLsoAu5o LAtAcXezT9dfQB7WxS4b07FOHJttZzrQhwCAGRjdPv7q9bkR872LxxoZWdbJ8uGYic l7SZGZvZtFV0cCEJ8yemW+F2zyxZ1jNlZJVyBaVo= From: Stefan Klug To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug Subject: [PATCH v2 3/5] pipeline: rkisp1: Limit the maximum number of buffers queued in Date: Mon, 7 Jul 2025 09:53:37 +0200 Message-ID: <20250707075400.9079-4-stefan.klug@ideasonboard.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250707075400.9079-1-stefan.klug@ideasonboard.com> References: <20250707075400.9079-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 Reviewed-by: Kieran Bingham --- 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..fff42359cbff 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; + +} // namespace + 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) { }