[v9,14/53] media: test-drivers: vivid: Increase max supported buffers for capture queues
Message ID | 20231002120617.119602-15-benjamin.gaignard@collabora.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp1421401vqb; Mon, 2 Oct 2023 06:19:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFcsqDGhWWupfNSb147du9KIXV5+vs/GAcfwRWv2yqMi4NZO344j64WNtxwMPl9WlBwhEt2 X-Received: by 2002:a17:903:2687:b0:1c1:f5a6:bdfa with SMTP id jf7-20020a170903268700b001c1f5a6bdfamr8924500plb.7.1696252771456; Mon, 02 Oct 2023 06:19:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696252771; cv=none; d=google.com; s=arc-20160816; b=YeEPlP0GO7zndgnU8vHC4qLX0HU+Q3aw10JUN21zpzc5DnDdVodRtK1Ta/5UHFIZZr Oq4drI+NBn5FwEJWSlIQhUMFdN00RISnt+UtyXBRHvAvzFPWq98uK4E606xveOEfV/Je YYmXAxv4I4GAf8muzvcjPgDE/2cfnHAwEH3BoV1Earruq2R3xQHeS2gX54uS+mwSNdJK 3xDvOZozWlveHzvad08ozhe/akIlzDfMlJiqpzH4LIEHt9LQNILs+ZXB+znvWbuHDFJp eD+SZ7YEt4ls3GEUSX4rQMM8VArnXe3jaKIlg0zcos7klFIsMAX3v+KLqiVmnFPP9a76 JRpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=iXYnemfnzDVdodhbC8Ai2BxKPfBs805dVaCpLeSvb5w=; fh=ceA81l8d2hZW6pWH7VE5TwJxtgXUzAubfWIMcikPA1M=; b=D2Ak5uHFTei/DAwrBwkp4hodVnj1RNTbEuFfWvBjz+cABncKPqH1WfAPcwuWWw3/fx YLmw81VFX3Lgx+jHSMcPEvKwBObxC0oGNhna+iLoChLvsYYgXkODSdQTNbquyQ6cldnT biMzIkF+hp4xnOFUY2UTnSuw06BYrzjV41He2SHl1VAZbXMhj5qn/ZbUPbPedOsUAWbJ 1tF8eTTVWQeXc/mGXOiH9gVk5rMDM71+zgpx0EmYzWrD7Hk+5MVEhkcU3lI1UzTgayyj H4kXZllnes1AM0TXU8RSZEsCL2+GgD2Zht2SedYw8hxyouOfo/wC3ahEnLP+iqljxgQt 7bkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=LZc66mgH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id p1-20020a170902e74100b001bf559a7bc6si5557471plf.465.2023.10.02.06.19.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 06:19:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=LZc66mgH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 2E94F8072A14; Mon, 2 Oct 2023 05:28:41 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237010AbjJBM22 (ORCPT <rfc822;pusanteemu@gmail.com> + 18 others); Mon, 2 Oct 2023 08:28:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237034AbjJBMGg (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 2 Oct 2023 08:06:36 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A0FC9D; Mon, 2 Oct 2023 05:06:33 -0700 (PDT) Received: from benjamin-XPS-13-9310.. (unknown [IPv6:2a01:e0a:120:3210:9537:67ca:c85e:d0ae]) (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 DF2FD6607335; Mon, 2 Oct 2023 13:06:31 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1696248392; bh=vXuJIhvUaCiRCOnUer8AX7BKf/0It7kvtpm2er6AYGM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LZc66mgHW0FJDalluTOy98rsHeo6kEMqLFH51flQQyPtO1u9642qnkTUBTKIP3383 LYtUnVIWWkpQu434O9934OZ0bxj1DzwhQ1d7JBQwwvO/H1jozKhYWygeFKFF61D/tx CUXAbklUoJlsGzRYUURKP8T+m9diTUpBWcUMBqL3MwehqBUriU7tqOwovAa6lui9eh RCmm9p7lfoVK27GLxcT5WBPLJ9o6mMc1kOWC2CkG93LRiY4vcgiorOa+SNPPvnHyLK ySXrHhK2Bw3jYTnsYKfkbZa4XPor5BQYv3l+wU5998xbs+k49Jy5fBwMtW+KID4j1p mLcSNBhuwfUNQ== From: Benjamin Gaignard <benjamin.gaignard@collabora.com> To: mchehab@kernel.org, tfiga@chromium.org, m.szyprowski@samsung.com, ming.qian@nxp.com, ezequiel@vanguardiasur.com.ar, p.zabel@pengutronix.de, gregkh@linuxfoundation.org, hverkuil-cisco@xs4all.nl, nicolas.dufresne@collabora.com Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-staging@lists.linux.dev, kernel@collabora.com, Benjamin Gaignard <benjamin.gaignard@collabora.com> Subject: [PATCH v9 14/53] media: test-drivers: vivid: Increase max supported buffers for capture queues Date: Mon, 2 Oct 2023 14:05:38 +0200 Message-Id: <20231002120617.119602-15-benjamin.gaignard@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231002120617.119602-1-benjamin.gaignard@collabora.com> References: <20231002120617.119602-1-benjamin.gaignard@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 02 Oct 2023 05:28:41 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778649946015105982 X-GMAIL-MSGID: 1778649946015105982 |
Series |
Add DELETE_BUF ioctl
|
|
Commit Message
Benjamin Gaignard
Oct. 2, 2023, 12:05 p.m. UTC
Change the maximum number of buffers of some capture queues in order
to test max_num_buffers field.
Allow to allocate up to:
- 64 buffers for video capture queue.
- 1024 buffers for sdr capture queue.
- 32768 buffers for vbi capture queue.
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
---
drivers/media/test-drivers/vivid/vivid-core.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/media/test-drivers/vivid/vivid-core.c b/drivers/media/test-drivers/vivid/vivid-core.c index e95bdccfc18e..58a059140365 100644 --- a/drivers/media/test-drivers/vivid/vivid-core.c +++ b/drivers/media/test-drivers/vivid/vivid-core.c @@ -876,6 +876,13 @@ static int vivid_create_queue(struct vivid_dev *dev, q->type = buf_type; q->io_modes = VB2_MMAP | VB2_DMABUF; q->io_modes |= V4L2_TYPE_IS_OUTPUT(buf_type) ? VB2_WRITE : VB2_READ; + if (buf_type == V4L2_BUF_TYPE_VIDEO_CAPTURE) + q->max_num_buffers = 64; + if (buf_type == V4L2_BUF_TYPE_SDR_CAPTURE) + q->max_num_buffers = 1024; + if (buf_type == V4L2_BUF_TYPE_VBI_CAPTURE) + q->max_num_buffers = 32768; + if (allocators[dev->inst] != 1) q->io_modes |= VB2_USERPTR; q->drv_priv = dev;