From patchwork Fri Apr 9 21:38:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= X-Patchwork-Id: 11882 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 7497FBD16B for ; Fri, 9 Apr 2021 21:38:48 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id BA649687F8; Fri, 9 Apr 2021 23:38:47 +0200 (CEST) Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id DC8AC687EF for ; Fri, 9 Apr 2021 23:38:45 +0200 (CEST) Received: from localhost.localdomain (unknown [IPv6:2804:14c:1a9:2978:fcbb:7aa5:bea8:667e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: nfraprado) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id C7C391F46A97; Fri, 9 Apr 2021 22:38:43 +0100 (BST) From: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= 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 overflowing requests 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: , Cc: Collabora Kernel ML Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" This series aims to add a test to lc-compliance that checks if the pipeline handler is able to handle more requests than it has internal buffers for [1]. This is specially concerning when buffers for the requests are allocated elsewhere and imported for use, since the only a fixed amount of internal buffers are allocated. Only patch 1 adds the test. Patch 2 and 3 are specific to rkisp1 (which is what I was testing on), but equivalents should be done for other pipelines. The lc-compliance test relies on allocating buffers using the built-in FrameBufferAllocator, which allocates based on the value of the StreamConfiguration's bufferCount. That's why patch 2 is about allowing bufferCount to be increased. So a larger amount of buffers can be allocated. Patch 3 makes the internal buffer allocation quantity be fixed on the minimum amount instead of scaling along bufferCount, otherwise there would be more internal buffers as well and the issue would be hidden. Instead, the issue should be solved by queuing the requests until an internal buffer is available. [1] https://bugs.libcamera.org/show_bug.cgi?id=24 NĂ­colas F. R. A. Prado (3): lc-compliance: Test queuing more requests than hardware depth libcamera: pipeline: rkisp1: Allow bufferCount to be user-configurable libcamera: pipeline: rkisp1: Make fixed amount of internal buffer allocation more explicit src/lc-compliance/simple_capture.cpp | 25 ++++++++++----- src/lc-compliance/simple_capture.h | 2 +- src/lc-compliance/single_stream.cpp | 31 +++++++++++-------- src/libcamera/pipeline/rkisp1/rkisp1.cpp | 13 +++----- src/libcamera/pipeline/rkisp1/rkisp1_path.cpp | 12 ++++--- src/libcamera/pipeline/rkisp1/rkisp1_path.h | 6 ++-- 6 files changed, 51 insertions(+), 38 deletions(-)