[{"id":36224,"web_url":"https://patchwork.libcamera.org/comment/36224/","msgid":"<20251013123241.GB23345@pendragon.ideasonboard.com>","date":"2025-10-13T12:32:41","subject":"Re: [PATCH v5 1/3] pipeline: simple: Initialize\n\tmaxQueuedRequestsDevice to 4","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Sun, Oct 12, 2025 at 04:20:50PM +0200, Robert Mader wrote:\n> In order to prepare for the pipeline handler to support higher buffer\n> counts than 4, limit the number of queued requests to this number as\n> apps otherwise may exhaust the limit of frame contexts (see\n> ipa::soft::kMaxFrameContexts => 16).\n> \n> Suggested-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> Signed-off-by: Robert Mader <robert.mader@collabora.com>\n> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> Tested-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n> ---\n>  src/libcamera/pipeline/simple/simple.cpp | 4 +++-\n>  1 file changed, 3 insertions(+), 1 deletion(-)\n> \n> diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp\n> index c816cffc9..6e8271346 100644\n> --- a/src/libcamera/pipeline/simple/simple.cpp\n> +++ b/src/libcamera/pipeline/simple/simple.cpp\n> @@ -417,6 +417,7 @@ protected:\n>  \tint queueRequestDevice(Camera *camera, Request *request) override;\n>  \n>  private:\n> +\tstatic constexpr unsigned int kMaxQueuedRequestsDevice = 4;\n\n4 seems fairly low, given the 16 frame contexts. All this will need to\nbe revisited. Stefan is reworking the rkisp1 pipeline handler and IPA\nmodule to better handle requests, I think we can live with 4 requests\nfor the time being in the simple pipeline handler and later rework it\nthe same way as rkisp1 (and everything else really). Stefan, does that\nsound like a good strategy to you ?\n\n>  \tstatic constexpr unsigned int kNumInternalBuffers = 3;\n>  \n>  \tstruct EntityData {\n> @@ -1273,7 +1274,8 @@ CameraConfiguration::Status SimpleCameraConfiguration::validate()\n>   */\n>  \n>  SimplePipelineHandler::SimplePipelineHandler(CameraManager *manager)\n> -\t: PipelineHandler(manager), converter_(nullptr)\n> +\t: PipelineHandler(manager, kMaxQueuedRequestsDevice),\n> +\t  converter_(nullptr)\n>  {\n>  }\n>","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 E5EC1BE080\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 13 Oct 2025 12:32:49 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 19A976051E;\n\tMon, 13 Oct 2025 14:32:49 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id CA7586031A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 13 Oct 2025 14:32:47 +0200 (CEST)","from pendragon.ideasonboard.com (82-203-166-19.bb.dnainternet.fi\n\t[82.203.166.19])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 0AEB9FE;\n\tMon, 13 Oct 2025 14:31:09 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"p+0GkIZ7\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1760358670;\n\tbh=TBYWF1INffeKv+4+gCj8oXURovgiQYmbuvNYqTXhGhk=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=p+0GkIZ7Gxp+S+laseTLRKmlLBM8Yl0nN8nxPNCtjdredQtzuSGbjkxHpxFyvqHmu\n\tg4MC1gbFaeCFxC2OodiS3KHYAkMUTrssDgWacRnITafMrsjJZ4OWyMXr6b41Wv1eMF\n\tVHCoBN+t5cjNJBk9gsH8YMx4aAgJvuwtCobPY+JI=","Date":"Mon, 13 Oct 2025 15:32:41 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Robert Mader <robert.mader@collabora.com>","Cc":"libcamera-devel@lists.libcamera.org, =?utf-8?b?QmFybmFiw6FzIFDFkWN6?=\n\t=?utf-8?q?e?= <barnabas.pocze@ideasonboard.com>, Kieran Bingham\n\t<kieran.bingham@ideasonboard.com>, Stefan Klug\n\t<stefan.klug@ideasonboard.com>","Subject":"Re: [PATCH v5 1/3] pipeline: simple: Initialize\n\tmaxQueuedRequestsDevice to 4","Message-ID":"<20251013123241.GB23345@pendragon.ideasonboard.com>","References":"<20251012142052.90611-1-robert.mader@collabora.com>\n\t<20251012142052.90611-2-robert.mader@collabora.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20251012142052.90611-2-robert.mader@collabora.com>","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>"}}]