[{"id":36184,"web_url":"https://patchwork.libcamera.org/comment/36184/","msgid":"<176009208574.935713.3139804274886015968@ping.linuxembedded.co.uk>","date":"2025-10-10T10:28:05","subject":"Re: [PATCH v4 2/3] pipeline: simple: Increase internal buffers for\n\tsoftware ISP to 4","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Robert Mader (2025-10-10 10:22:25)\n> This has been shipped downstream in postmarketOS for a while and, in\n\n\"This has been shipped downstream\" is really a comment for after the\n'---' That's not relational to the commit.\n\n> some cases, seems to improve stability on not-so-great drivers. It also\n> brings the software ISP in line with the default used otherwise.\n\n\nThis should justify the patch at a technical level - not just because\nit's applied somewhere else. Perhaps:\n\n\"\"\"\npipeline: simple: Increase internal buffers for software ISP to 4\n\nThe Simple Pipeline handler supports a variety of hardware with\ndifferent capabilities and performances.\n\nTo improve performance and reliability of the cameras across the\nsupported range, increase the number of internal buffers to 4.\n\nThis allows lower performance devices more opportunity to process the\nframes and increases stability.\n\nAlign the Simple Pipeline handler and Soft ISP buffering with the other\nhardware based platforms and use 4 internal buffers.\n\n---\n\nThis has been applied in postmarketOS since Xxxx and has fixed issues\nreported by users.\n\n\"\"\"\n\n> \n> Signed-off-by: Robert Mader <robert.mader@collabora.com>\n> Reviewed-by: Milan Zamazal <mzamazal@redhat.com>\n> ---\n>  src/libcamera/pipeline/simple/simple.cpp | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp\n> index 2dcba04ec..c4cb7c391 100644\n> --- a/src/libcamera/pipeline/simple/simple.cpp\n> +++ b/src/libcamera/pipeline/simple/simple.cpp\n> @@ -420,7 +420,7 @@ protected:\n>         int queueRequestDevice(Camera *camera, Request *request) override;\n>  \n>  private:\n> -       static constexpr unsigned int kNumInternalBuffers = 3;\n> +       static constexpr unsigned int kNumInternalBuffers = 4;\n>  \n>         struct EntityData {\n>                 std::unique_ptr<V4L2VideoDevice> video;\n> -- \n> 2.51.0\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 BB1C5BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 10 Oct 2025 10:28:10 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E63F46B611;\n\tFri, 10 Oct 2025 12:28:09 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DA9886B599\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 10 Oct 2025 12:28:08 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 521BE2D8;\n\tFri, 10 Oct 2025 12:26:33 +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=\"Gz3s2xqg\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1760091993;\n\tbh=ATYEwcA3bYcjC3Td+Icbu7v0EBUKDWX+Z7z6H0g4iP4=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=Gz3s2xqggIq7gQVKokfCEpcxrpx59PV198QsOyBiScO4m4ZdGPEXlRntVJIPvxy5F\n\t/FLnNzaRi/7nKXLOy8oF+njKuIRfTDm/4o/u8FfKMu0GYpVhNv0QKaQbJa1p494q+i\n\t/Ge88JsVrMJqUHzXawh/Tznr5WqpTNgV/YymMgEY=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20251010092226.41228-2-robert.mader@collabora.com>","References":"<20251010092226.41228-1-robert.mader@collabora.com>\n\t<20251010092226.41228-2-robert.mader@collabora.com>","Subject":"Re: [PATCH v4 2/3] pipeline: simple: Increase internal buffers for\n\tsoftware ISP to 4","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Robert Mader <robert.mader@collabora.com>,\n\tMilan Zamazal <mzamazal@redhat.com>","To":"Robert Mader <robert.mader@collabora.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Fri, 10 Oct 2025 11:28:05 +0100","Message-ID":"<176009208574.935713.3139804274886015968@ping.linuxembedded.co.uk>","User-Agent":"alot/0.9.1","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>"}},{"id":36225,"web_url":"https://patchwork.libcamera.org/comment/36225/","msgid":"<20251013123639.GA10904@pendragon.ideasonboard.com>","date":"2025-10-13T12:36:39","subject":"Re: [PATCH v4 2/3] pipeline: simple: Increase internal buffers for\n\tsoftware ISP to 4","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Fri, Oct 10, 2025 at 11:28:05AM +0100, Kieran Bingham wrote:\n> Quoting Robert Mader (2025-10-10 10:22:25)\n> > This has been shipped downstream in postmarketOS for a while and, in\n> \n> \"This has been shipped downstream\" is really a comment for after the\n> '---' That's not relational to the commit.\n> \n> > some cases, seems to improve stability on not-so-great drivers. It also\n> > brings the software ISP in line with the default used otherwise.\n> \n> \n> This should justify the patch at a technical level - not just because\n> it's applied somewhere else. Perhaps:\n> \n> \"\"\"\n> pipeline: simple: Increase internal buffers for software ISP to 4\n> \n> The Simple Pipeline handler supports a variety of hardware with\n> different capabilities and performances.\n> \n> To improve performance and reliability of the cameras across the\n> supported range, increase the number of internal buffers to 4.\n> \n> This allows lower performance devices more opportunity to process the\n> frames and increases stability.\n\nIt's better but still quite vague. A description of the actual issue\nwould have been best. As the simple pipeline handler supports low-end\ndevices, lowering memory usage is important. I would have liked to\nunderstand which devices perform better with this patch, and why.\nOtherwise, later reworks may undo this change one way or another, and\nwe'll have no way to know from the git history why this was important.\n\n> Align the Simple Pipeline handler and Soft ISP buffering with the other\n> hardware based platforms and use 4 internal buffers.\n> \n> ---\n> \n> This has been applied in postmarketOS since Xxxx and has fixed issues\n> reported by users.\n> \n> \"\"\"\n> \n> > Signed-off-by: Robert Mader <robert.mader@collabora.com>\n> > Reviewed-by: Milan Zamazal <mzamazal@redhat.com>\n> > ---\n> >  src/libcamera/pipeline/simple/simple.cpp | 2 +-\n> >  1 file changed, 1 insertion(+), 1 deletion(-)\n> > \n> > diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp\n> > index 2dcba04ec..c4cb7c391 100644\n> > --- a/src/libcamera/pipeline/simple/simple.cpp\n> > +++ b/src/libcamera/pipeline/simple/simple.cpp\n> > @@ -420,7 +420,7 @@ protected:\n> >         int queueRequestDevice(Camera *camera, Request *request) override;\n> >  \n> >  private:\n> > -       static constexpr unsigned int kNumInternalBuffers = 3;\n> > +       static constexpr unsigned int kNumInternalBuffers = 4;\n> >  \n> >         struct EntityData {\n> >                 std::unique_ptr<V4L2VideoDevice> video;","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 C733BBF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 13 Oct 2025 12:36:48 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id F1C80604E7;\n\tMon, 13 Oct 2025 14:36:47 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0D78B6031A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 13 Oct 2025 14:36:46 +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 3A439FE;\n\tMon, 13 Oct 2025 14:35:08 +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=\"QMUaf2QK\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1760358908;\n\tbh=0sCeaM+rUeTvYKnaBun2cW/GGcc8BseSB0NR26e2XBM=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=QMUaf2QKcynokDEDu8CEkKn7njT9tlNbQHq/tjznl4QXsqdPt0p468lb6kxttwHuf\n\tEEw53XMxlVUx7BD338AONkxoRv8N+XMFB+P577VwIjfxjIbKoSGW4NlQLOJTMvGg83\n\tFtRgrdXR7bQawodwSuY32PHJmVKrw8Lf45CTeahA=","Date":"Mon, 13 Oct 2025 15:36:39 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Robert Mader <robert.mader@collabora.com>,\n\tlibcamera-devel@lists.libcamera.org, Milan Zamazal <mzamazal@redhat.com>","Subject":"Re: [PATCH v4 2/3] pipeline: simple: Increase internal buffers for\n\tsoftware ISP to 4","Message-ID":"<20251013123639.GA10904@pendragon.ideasonboard.com>","References":"<20251010092226.41228-1-robert.mader@collabora.com>\n\t<20251010092226.41228-2-robert.mader@collabora.com>\n\t<176009208574.935713.3139804274886015968@ping.linuxembedded.co.uk>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<176009208574.935713.3139804274886015968@ping.linuxembedded.co.uk>","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>"}},{"id":36227,"web_url":"https://patchwork.libcamera.org/comment/36227/","msgid":"<4f58bc04-d38f-48dc-a1c6-6b972c84e6f6@collabora.com>","date":"2025-10-13T13:25:35","subject":"Re: [PATCH v4 2/3] pipeline: simple: Increase internal buffers for\n\tsoftware ISP to 4","submitter":{"id":140,"url":"https://patchwork.libcamera.org/api/people/140/","name":"Robert Mader","email":"robert.mader@collabora.com"},"content":"On 10/13/25 14:36, Laurent Pinchart wrote:\n> On Fri, Oct 10, 2025 at 11:28:05AM +0100, Kieran Bingham wrote:\n>> ...\n>>\n>> This should justify the patch at a technical level - not just because\n>> it's applied somewhere else. Perhaps:\n>>\n>> \"\"\"\n>> pipeline: simple: Increase internal buffers for software ISP to 4\n>>\n>> The Simple Pipeline handler supports a variety of hardware with\n>> different capabilities and performances.\n>>\n>> To improve performance and reliability of the cameras across the\n>> supported range, increase the number of internal buffers to 4.\n>>\n>> This allows lower performance devices more opportunity to process the\n>> frames and increases stability.\n> It's better but still quite vague. A description of the actual issue\n> would have been best. As the simple pipeline handler supports low-end\n> devices, lowering memory usage is important. I would have liked to\n> understand which devices perform better with this patch, and why.\n> Otherwise, later reworks may undo this change one way or another, and\n> we'll have no way to know from the git history why this was important.\n\nI'm afraid I can't provide a proper analysis in the short term :/ The \nevidence wast pretty anecdotal - IIUC I myself saw (unfortunately not \nproperly measured / documented) improvements on devices like the Pixel \n3a (qcom-camss), the Librem5 (imx7-csi) and the original PinePhone \n(sun6i-csi) in the form of less hangs / frame-skips. That being said, I \ncompletely assume that the extra buffer shouldn't be necessary under \noptimal conditions.\n\nIt should be noted that I'm not aware of any case where this patch was \nstrictly necessary to get some camera to work - which also means that, \nshould the code be modified in the future, any fallout wouldn't be critical.\n\nAs for memory consumption: my personal test devices don't include any \nthat needs the sw-ISP while also being so memory limited that the \nextra-buffer is really noticeable. If it is a concern, though, we could \nmake it configurable in the GlobalConfiguration. At the current state I \npersonally would consider that over-engineered though.\n\nOverall I personally find the anecdotal evidence combined with the fact \nthat most other pipelines use 4 buffers by default convincing enough to \njustify the change. If you don't agree, we can drop again for now and I \ncan try to have another look for 0.7.\n\nBest regards","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 4C46FBF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 13 Oct 2025 13:25:49 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5471160524;\n\tMon, 13 Oct 2025 15:25:48 +0200 (CEST)","from sender4-pp-f112.zoho.com (sender4-pp-f112.zoho.com\n\t[136.143.188.112])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 333516031A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 13 Oct 2025 15:25:46 +0200 (CEST)","by mx.zohomail.com with SMTPS id 1760361940448132.65543438394002; \n\tMon, 13 Oct 2025 06:25:40 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=collabora.com\n\theader.i=robert.mader@collabora.com header.b=\"eL2DWljy\"; \n\tdkim-atps=neutral","ARC-Seal":"i=1; a=rsa-sha256; t=1760361942; cv=none; \n\td=zohomail.com; s=zohoarc; \n\tb=j8CEqmEEv4VDrLuf+ev81TZaul2UH00nPA5QlbZFTqlIaXJC9rpmUpkLUIU2L1RjoqGIMTeUdGX8CHQYADmdBVSWFx+7IALtTiAzeyMyM48GmF40hGrLXCYLXgdNQW1+OY1JrSkYQXhbcYlx9gTqC1zwFupFLP8Tlb8AJnFOGCQ=","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; \n\ts=zohoarc; t=1760361942;\n\th=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To;\n\tbh=dXKlNKhlS2mlULf/DPMKNhLHlMtUIWTtQLQdbgkY/gM=; \n\tb=Da7onzCwmdZKrysPfbgURMqzNs8/62FQf4CnJqZDmTifocEiLok0/ogLR+d18mTMA25glGjYyfj4nazaWtMBA/rYYLbdt0yEcfBiEUmkyHODA6zlgnsi0qbZdoWdzWZtWDsTYwTjOm1uSGKWmfbIDITnwWxhmgLNjh8Zwo99b9Y=","ARC-Authentication-Results":"i=1; mx.zohomail.com;\n\tdkim=pass  header.i=collabora.com;\n\tspf=pass  smtp.mailfrom=robert.mader@collabora.com;\n\tdmarc=pass header.from=<robert.mader@collabora.com>","DKIM-Signature":"v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1760361942;\n\ts=zohomail; d=collabora.com; i=robert.mader@collabora.com;\n\th=Message-ID:Date:Date:MIME-Version:Subject:Subject:To:To:Cc:Cc:References:From:From:In-Reply-To:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To;\n\tbh=dXKlNKhlS2mlULf/DPMKNhLHlMtUIWTtQLQdbgkY/gM=;\n\tb=eL2DWljyGJEgA/0zrz6id1VayJSu+qWYN4wszvs9eZ72Ke+VyE4y4KAPpV3BmMXL\n\tNclq/+ccjndtfqshbBTnAJklHXSu3TLjRfMnyZK4Mj/XEQfhckksUyIFwkyPBX6HM5m\n\tj/sbsEYQQ3g3NPR7a8K9mVP8hhQGj4gCTes0pkDQ=","Message-ID":"<4f58bc04-d38f-48dc-a1c6-6b972c84e6f6@collabora.com>","Date":"Mon, 13 Oct 2025 15:25:35 +0200","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v4 2/3] pipeline: simple: Increase internal buffers for\n\tsoftware ISP to 4","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org, Milan Zamazal <mzamazal@redhat.com>","References":"<20251010092226.41228-1-robert.mader@collabora.com>\n\t<20251010092226.41228-2-robert.mader@collabora.com>\n\t<176009208574.935713.3139804274886015968@ping.linuxembedded.co.uk>\n\t<20251013123639.GA10904@pendragon.ideasonboard.com>","Content-Language":"en-US, de-DE","From":"Robert Mader <robert.mader@collabora.com>","In-Reply-To":"<20251013123639.GA10904@pendragon.ideasonboard.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","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>"}},{"id":36228,"web_url":"https://patchwork.libcamera.org/comment/36228/","msgid":"<20251013134405.GA21410@pendragon.ideasonboard.com>","date":"2025-10-13T13:44:05","subject":"Re: [PATCH v4 2/3] pipeline: simple: Increase internal buffers for\n\tsoftware ISP to 4","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Mon, Oct 13, 2025 at 03:25:35PM +0200, Robert Mader wrote:\n> On 10/13/25 14:36, Laurent Pinchart wrote:\n> > On Fri, Oct 10, 2025 at 11:28:05AM +0100, Kieran Bingham wrote:\n> >> ...\n> >>\n> >> This should justify the patch at a technical level - not just because\n> >> it's applied somewhere else. Perhaps:\n> >>\n> >> \"\"\"\n> >> pipeline: simple: Increase internal buffers for software ISP to 4\n> >>\n> >> The Simple Pipeline handler supports a variety of hardware with\n> >> different capabilities and performances.\n> >>\n> >> To improve performance and reliability of the cameras across the\n> >> supported range, increase the number of internal buffers to 4.\n> >>\n> >> This allows lower performance devices more opportunity to process the\n> >> frames and increases stability.\n> > It's better but still quite vague. A description of the actual issue\n> > would have been best. As the simple pipeline handler supports low-end\n> > devices, lowering memory usage is important. I would have liked to\n> > understand which devices perform better with this patch, and why.\n> > Otherwise, later reworks may undo this change one way or another, and\n> > we'll have no way to know from the git history why this was important.\n> \n> I'm afraid I can't provide a proper analysis in the short term :/ The \n> evidence wast pretty anecdotal - IIUC I myself saw (unfortunately not \n> properly measured / documented) improvements on devices like the Pixel \n> 3a (qcom-camss), the Librem5 (imx7-csi) and the original PinePhone \n> (sun6i-csi) in the form of less hangs / frame-skips. That being said, I \n> completely assume that the extra buffer shouldn't be necessary under \n> optimal conditions.\n> \n> It should be noted that I'm not aware of any case where this patch was \n> strictly necessary to get some camera to work - which also means that, \n> should the code be modified in the future, any fallout wouldn't be critical.\n> \n> As for memory consumption: my personal test devices don't include any \n> that needs the sw-ISP while also being so memory limited that the \n> extra-buffer is really noticeable. If it is a concern, though, we could \n> make it configurable in the GlobalConfiguration. At the current state I \n> personally would consider that over-engineered though.\n> \n> Overall I personally find the anecdotal evidence combined with the fact \n> that most other pipelines use 4 buffers by default convincing enough to \n> justify the change. If you don't agree, we can drop again for now and I \n> can try to have another look for 0.7.\n\nThe patch has been merged and there's no need to revert it. Even if it\nhasn't been merged yet I think it could go in as-is :-) My concern is\nthat future rework will likely change all this logic, and without a\ndetailed explanation somewhere in the git history or mailing list\narchives, we may end up going back to 3 buffers by accident.","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 5FF64BE080\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 13 Oct 2025 13:44:14 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6C500604F4;\n\tMon, 13 Oct 2025 15:44:13 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 30FA46031A\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 13 Oct 2025 15:44:12 +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 26CF1591;\n\tMon, 13 Oct 2025 15:42:34 +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=\"DmhMY4Od\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1760362954;\n\tbh=Pa9C4/JYYF7YIGVPRMtxr7LovEbIsC+BwcqbJY1fGIw=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=DmhMY4OdnPui+YXZ5Yak8bN7DxiKFTNdJK+/pP3YeKMsSDod1mKsWTnpuo9VwkxZd\n\ts7H3dFwczxXr7uZaLkeX8D4NwXI0689hnGz9OekCXF2F8fM+9LefjFnVaBFDYTG1pV\n\tkElNbOk2pZjdtUR2srCPukCIUKhXhnq9E3usplJg=","Date":"Mon, 13 Oct 2025 16:44:05 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Robert Mader <robert.mader@collabora.com>","Cc":"Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org, Milan Zamazal <mzamazal@redhat.com>","Subject":"Re: [PATCH v4 2/3] pipeline: simple: Increase internal buffers for\n\tsoftware ISP to 4","Message-ID":"<20251013134405.GA21410@pendragon.ideasonboard.com>","References":"<20251010092226.41228-1-robert.mader@collabora.com>\n\t<20251010092226.41228-2-robert.mader@collabora.com>\n\t<176009208574.935713.3139804274886015968@ping.linuxembedded.co.uk>\n\t<20251013123639.GA10904@pendragon.ideasonboard.com>\n\t<4f58bc04-d38f-48dc-a1c6-6b972c84e6f6@collabora.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<4f58bc04-d38f-48dc-a1c6-6b972c84e6f6@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>"}}]