{"id":21392,"url":"https://patchwork.libcamera.org/api/1.1/patches/21392/?format=json","web_url":"https://patchwork.libcamera.org/patch/21392/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20240926210739.27480-1-robert.mader@collabora.com>","date":"2024-09-26T21:07:39","name":"pipeline: simple: Increase buffer count to four","commit_ref":"abe2ec64f9e4e97bbdfe3a50372611bd7b5315c2","pull_url":null,"state":"accepted","archived":false,"hash":"8806ead49a8bf4b3c6fa2f3f5a1b3d8e6ecd53d2","submitter":{"id":140,"url":"https://patchwork.libcamera.org/api/1.1/people/140/?format=json","name":"Robert Mader","email":"robert.mader@collabora.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/21392/mbox/","series":[{"id":4633,"url":"https://patchwork.libcamera.org/api/1.1/series/4633/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=4633","date":"2024-09-26T21:07:39","name":"pipeline: simple: Increase buffer count to four","version":1,"mbox":"https://patchwork.libcamera.org/series/4633/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/21392/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/21392/checks/","tags":{},"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 6EA37C0F1B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 26 Sep 2024 21:08:17 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9B1EB6350F;\n\tThu, 26 Sep 2024 23:08:16 +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 6CE80618DA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 26 Sep 2024 23:08:14 +0200 (CEST)","by mx.zohomail.com with SMTPS id 17273848905881017.566238008793;\n\tThu, 26 Sep 2024 14:08:10 -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=\"U2Amn3FO\"; \n\tdkim-atps=neutral","ARC-Seal":"i=1; a=rsa-sha256; t=1727384891; cv=none; \n\td=zohomail.com; s=zohoarc; \n\tb=UzV9cXt4KPe9oOxVqJdhu+ydkoaO5u6JBHvkOjU+Oj4Id8z0DRwhv0SZsMkkbLFQTTCfUBoQVgVKUiFc1LgpEo6u+c0EcUGh63O1DgRK0t4S1RaOcMq1cpR6nmtwwSu1fkbQJ+86DkhSSOCHZCWfNs1nwTcbf6Cun4kJZlyIVVQ=","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; \n\ts=zohoarc; t=1727384891;\n\th=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To;\n\tbh=Xcrj9yt0awYj4NytEbp96oMa+ELg9DIiDQxb2JnccJE=; \n\tb=BjNBssfvq3glNVblW/1p01kJuxhbnYTQJEFCfQACfmr0TrwC4cmm5e35F9dKP18KgX+vDvxxQfPprmxrQ6iBzu2baFF/geVNruQkLAYobnqgFrVSaI+RVKL9p82vLmk3ips4Zal9IOvtXa8bM+8OA8CStp087Wfn132kszjm6pQ=","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=1727384891;\n\ts=zohomail; d=collabora.com; i=robert.mader@collabora.com;\n\th=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-ID:MIME-Version:Content-Transfer-Encoding:Message-Id:Reply-To;\n\tbh=Xcrj9yt0awYj4NytEbp96oMa+ELg9DIiDQxb2JnccJE=;\n\tb=U2Amn3FOIrrOH5+X6Q2ZzYa9ELWf2lAYt4ZGhrGdepzrWhibb91WnvdUvboY2JId\n\tgI+DtRdi7pFVw8jf9lfxfEO2rqEOSnPILIsvjADnMnrgivF6blYXmWeZ8FQY9tYmCwS\n\tENAkcySRieGRwfGKyPa1W2nQ5ZM4zDFDvZBKv6FQ=","From":"Robert Mader <robert.mader@collabora.com>","To":"libcamera-devel@lists.libcamera.org","Cc":"Robert Mader <robert.mader@collabora.com>","Subject":"[PATCH] pipeline: simple: Increase buffer count to four","Date":"Thu, 26 Sep 2024 23:07:39 +0200","Message-ID":"<20240926210739.27480-1-robert.mader@collabora.com>","X-Mailer":"git-send-email 2.46.2","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","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>"},"content":"Which is not only what many other pipeline handlers use, but also a good\nlower limit when dealing with DRM and similar APIs. Even Mesas EGL and\nVulkan WSI implementations use for the reason outlined in mesa commit\n992a2dbba80aba35efe83202e1013bd6143f0dba:\n> When the compositor is directly scanning out from the application's buffer it\n> may end up holding on to three buffers. These are the one that is is currently\n> scanning out from, one that has been given to DRM as the next buffer to flip\n> to, and one that has been attached and will be given to DRM as soon as the\n> previous flip completes. When we attach a fourth buffer to the compositor it\n> should replace that third buffer so we should get a release event immediately\n> after that. This patch therefore also changes the number of buffer slots to 4\n> so that we can accomodate that situation.\n\nGiven the popularity of this buffer number the bump should be unlikely\nto cause problems. At the same time it may help with performance or\neven work around glitches.\n\nThe previous number was introduced in commit\na8964c28c80fb520ee3c7b10143371081d41405a without mentioning a specific\nreason against the change at hand.\n\nSigned-off-by: Robert Mader <robert.mader@collabora.com>\n---\n src/libcamera/pipeline/simple/simple.cpp | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)","diff":"diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp\nindex 81915573..78ce9232 100644\n--- a/src/libcamera/pipeline/simple/simple.cpp\n+++ b/src/libcamera/pipeline/simple/simple.cpp\n@@ -1135,7 +1135,7 @@ CameraConfiguration::Status SimpleCameraConfiguration::validate()\n \t\t\tcfg.frameSize = format.planes[0].size;\n \t\t}\n \n-\t\tcfg.bufferCount = 3;\n+\t\tcfg.bufferCount = 4;\n \t}\n \n \treturn status;\n","prefixes":[]}