{"id":11882,"url":"https://patchwork.libcamera.org/api/1.1/covers/11882/?format=json","web_url":"https://patchwork.libcamera.org/cover/11882/","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":"<20210409213815.356837-1-nfraprado@collabora.com>","date":"2021-04-09T21:38:12","name":"[libcamera-devel,RFC,0/3] Add lc-compliance test for overflowing requests","submitter":{"id":84,"url":"https://patchwork.libcamera.org/api/1.1/people/84/?format=json","name":"Nícolas F. R. A. Prado","email":"nfraprado@collabora.com"},"mbox":"https://patchwork.libcamera.org/cover/11882/mbox/","series":[{"id":1908,"url":"https://patchwork.libcamera.org/api/1.1/series/1908/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=1908","date":"2021-04-09T21:38:12","name":"Add lc-compliance test for overflowing requests","version":1,"mbox":"https://patchwork.libcamera.org/series/1908/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/11882/comments/","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 7497FBD16B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  9 Apr 2021 21:38:48 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BA649687F8;\n\tFri,  9 Apr 2021 23:38:47 +0200 (CEST)","from bhuna.collabora.co.uk (bhuna.collabora.co.uk\n\t[IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DC8AC687EF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  9 Apr 2021 23:38:45 +0200 (CEST)","from localhost.localdomain (unknown\n\t[IPv6:2804:14c:1a9:2978:fcbb:7aa5:bea8:667e])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits))\n\t(No client certificate requested) (Authenticated sender: nfraprado)\n\tby bhuna.collabora.co.uk (Postfix) with ESMTPSA id C7C391F46A97;\n\tFri,  9 Apr 2021 22:38:43 +0100 (BST)"],"From":"=?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= <nfraprado@collabora.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Fri,  9 Apr 2021 18:38:12 -0300","Message-Id":"<20210409213815.356837-1-nfraprado@collabora.com>","X-Mailer":"git-send-email 2.31.1","MIME-Version":"1.0","Subject":"[libcamera-devel] [RFC PATCH 0/3] Add lc-compliance test for\n\toverflowing requests","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>","Cc":"Collabora Kernel ML <kernel@collabora.com>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"This series aims to add a test to lc-compliance that checks if the pipeline\nhandler is able to handle more requests than it has internal buffers for [1].\nThis is specially concerning when buffers for the requests are allocated\nelsewhere and imported for use, since the only a fixed amount of internal\nbuffers are allocated.\n\nOnly patch 1 adds the test. Patch 2 and 3 are specific to rkisp1 (which is what\nI was testing on), but equivalents should be done for other pipelines.\n\nThe lc-compliance test relies on allocating buffers using the built-in\nFrameBufferAllocator, which allocates based on the value of the\nStreamConfiguration's bufferCount.\n\nThat's why patch 2 is about allowing bufferCount to be increased. So a larger\namount of buffers can be allocated.\n\nPatch 3 makes the internal buffer allocation quantity be fixed on the minimum\namount instead of scaling along bufferCount, otherwise there would be more\ninternal buffers as well and the issue would be hidden. Instead, the issue\nshould be solved by queuing the requests until an internal buffer is available.\n\n[1] https://bugs.libcamera.org/show_bug.cgi?id=24\n\nNícolas F. R. A. Prado (3):\n  lc-compliance: Test queuing more requests than hardware depth\n  libcamera: pipeline: rkisp1: Allow bufferCount to be user-configurable\n  libcamera: pipeline: rkisp1: Make fixed amount of internal buffer\n    allocation more explicit\n\n src/lc-compliance/simple_capture.cpp          | 25 ++++++++++-----\n src/lc-compliance/simple_capture.h            |  2 +-\n src/lc-compliance/single_stream.cpp           | 31 +++++++++++--------\n src/libcamera/pipeline/rkisp1/rkisp1.cpp      | 13 +++-----\n src/libcamera/pipeline/rkisp1/rkisp1_path.cpp | 12 ++++---\n src/libcamera/pipeline/rkisp1/rkisp1_path.h   |  6 ++--\n 6 files changed, 51 insertions(+), 38 deletions(-)"}