From patchwork Tue Oct 31 15:27:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 13441652 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 47EEDC4332F for ; Tue, 31 Oct 2023 15:27:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344807AbjJaP1f (ORCPT ); Tue, 31 Oct 2023 11:27:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344781AbjJaP1e (ORCPT ); Tue, 31 Oct 2023 11:27:34 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B4129F for ; Tue, 31 Oct 2023 08:27:31 -0700 (PDT) Received: from benjamin-XPS-13-9310.. (unknown [IPv6:2a01:e0a:120:3210:c562:2ef4:80c0:92f]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: benjamin.gaignard) by madras.collabora.co.uk (Postfix) with ESMTPSA id 521D666073A1; Tue, 31 Oct 2023 15:27:30 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1698766050; bh=dSeDGsiR/zR2fbDacBtaYnyM7KbUYzl2Uf6RNFXumkk=; h=From:To:Cc:Subject:Date:From; b=XZZowW2+idVkPVHyubR23vSlO9owBpb4PmQAgxCCNFvf1WphF/NG4f97w1CCH1y+a FV/NiOTajTWGSINe+l9KlTzDT8Sb1yp5wzcn70f6tx0yig/VYrWSjdSFgTZ1HxkZ7R kpPHQelUaVWaz5EZ3yUawJ1OFNIc5+WGjLVndgtvmTE8RYgvgAM9OfdYdmw/WDJpZH xiS+kF4uDCbmc7+fRcRPqUXjLzEarUHDx2Xb0J4eVZzc7Odg7gmfPB8fiOJGVt03rY j+elmaqj7l9rwGpb4nG4zoxJKsm65ss52WunBCML4RyYhchsXE5fCNFOtqbNW6uRbx wAQ2P45Bvh01A== From: Benjamin Gaignard To: hverkuil-cisco@xs4all.nl, nicolas.dufresne@collabora.com, mchehab@kernel.org Cc: linux-media@vger.kernel.org, kernel@collabora.com, Benjamin Gaignard Subject: [PATCH v5 0/4] v4l2-compliance: Add tests for DELETE_BUFS Date: Tue, 31 Oct 2023 16:27:18 +0100 Message-Id: <20231031152722.84444-1-benjamin.gaignard@collabora.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Before being able to add VIDIOC_DELETE_BUFS ioctl, it was needed to change how v4l2 queues store buffers and how many of them they can store. That led to add max_num_buffers field into v4l2_create_buffers struct. This series add tests for this new field and VIDIOC_DELETE_BUFS ioctl. version 5: - change g_max_buffers() to g_max_num_buffers(). - change v4l_queue_g_max_buffers() to v4l_queue_g_max_num_buffers(). - rename struct v4l_queue max_buffers field to max_num_buffers. - fix V4L2_BUF_CAP_SUPPORTS_MAX_NUM_BUFFERS name in bufcap_def array. - add V4L2_BUF_CAP_SUPPORTS_DELETE_BUFS in bufcap_def array. - only test MMAP streaming mode. - rework test code. Benjamin Gaignard (4): v4l-utils: Add max_num_buffers field to v4l2_create_buffers struct v4l2-compliance: Test queue maximum buffers allocation v4l2-utils: Add VIDIOC_DELETE_BUFS ioctl v4l2-compliance: Add a test for DELETE_BUFS ioctl include/linux/videodev2.h | 23 +++- utils/common/cv4l-helpers.h | 5 + utils/common/v4l-helpers.h | 22 ++++ utils/common/v4l2-info.cpp | 2 + utils/v4l2-compliance/v4l2-compliance.cpp | 2 + utils/v4l2-compliance/v4l2-compliance.h | 2 + utils/v4l2-compliance/v4l2-test-buffers.cpp | 122 ++++++++++++++++++++ 7 files changed, 177 insertions(+), 1 deletion(-)