From patchwork Thu Oct 12 11:46:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 151998 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp1166984vqb; Thu, 12 Oct 2023 04:52:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFhNRpFHYNehbw0vJEbq4bsRZ0Qyunbhv4GckoOBx7rnPl+BXAYCWdczKK1OyxgFdsWU7z+ X-Received: by 2002:a05:6358:2d94:b0:163:e0a:68a4 with SMTP id m20-20020a0563582d9400b001630e0a68a4mr17081160rwn.2.1697111534784; Thu, 12 Oct 2023 04:52:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697111534; cv=none; d=google.com; s=arc-20160816; b=0X5c0GcML+7isJA87l+pdaJRA7YRo1EV3mhREIeGFDyvlxZLNg2rL3ZcfitFGfstU7 3OSQ6Xn3tnEWba3IIC7Mrs7UP9jYzkyiz+TpCXokP3i0+gTtDDJpbHcybkHT5Ef/MBwc 1HZ3XYB9Ew0GiPOpSnlM+NE5nMIBAQztHX12jDK18pDd1uj5nnj6Ly36G6JLRMe9qBQ6 TXFu2n+QCBicOLDjaBKu8oEgjdarO4FnUhza52tXqaZ8IJd/2AezQ/da1SWKiK03H0t5 RJvjt4snpasimkKmRYcwRLQVRtY9FmnBerRife4ygvsSWxgXKd9JPFUok1VxUULW763O P74w== 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=bmkWQDiNlgdYuDb+J1sav4B84VrqfEYCbpv/jslFdrc=; fh=ceA81l8d2hZW6pWH7VE5TwJxtgXUzAubfWIMcikPA1M=; b=TgDqT0U/P7qCJOhBJj//YzMGbeCETw4h1oj5utyThnVS0OG5jhsZoVPNpsTOOO6wXZ GLcUI5yb21o/Hk/ORuUPjZDi0NY/0G0RRlb1M1kdfzydhNASRiIOm6Twhl6fqRKLNMR0 kXDfh6dDfW07++YX9h/JD4L6KFySWgUdVPrLgW2iMfjp/gS1TwQufNCAlYw1U6D4rUA4 ttvVMugQ6yRo3pLAiVdZkzvtM8k0icOSO1ri8sirZuVoRCqd1L2IdQjra6jQBucMASWY 0Y64mOM280Txvvn5n2LepqKwvxOF0qCWjeveP8TZZz16RVCzlrunhitS1FKuEZQMNd8J hl4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=WAouVKN3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id d129-20020a633687000000b00588e13f4cc8si2046517pga.519.2023.10.12.04.52.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 04:52:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=WAouVKN3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (Postfix) with ESMTP id 492D18028B72; Thu, 12 Oct 2023 04:51:27 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379351AbjJLLtr (ORCPT + 19 others); Thu, 12 Oct 2023 07:49:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378700AbjJLLrl (ORCPT ); Thu, 12 Oct 2023 07:47:41 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E7EE109; Thu, 12 Oct 2023 04:47:15 -0700 (PDT) Received: from benjamin-XPS-13-9310.. (unknown [IPv6:2a01:e0a:120:3210:7ae7:b86d:c19a:877e]) (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 658226607379; Thu, 12 Oct 2023 12:47:13 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1697111233; bh=MaJc8KF/Sr+P2A1rELzeazrdtI+Dtx39Ekc9mMARKkw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WAouVKN3OAalElzf429fDxDA3/X/KhRsnUm3ukPaWmjHHSEZdBhsjtFVUSjP2l+qq 9KVnzkreD84VAAr3Y5CIxt6zyFHRUzEDzGKGlN/gp0fQMumcwtSf4zapr/lo6UeSXv JTU6Sa95+SIAdK6M5QCN2QcYp9WZRb0Zb1/KxrUCH+LJK7Bob798lW8d/G4Ws3fmyR WpB5ztYPv0DJbSY6g3L8H0iPvnA5Fx68im1FbQiqpKf4qsbSfHt/2gSwvzvOdBVR8I T1u46E1GZQikH219t2eYkO71x4a+vgjX50i2G5mhsPk3kOAwOwJLmN2+J6Gvjps//5 9RBi3mbPAHH9g== From: Benjamin Gaignard 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 Subject: [PATCH v11 45/56] media: test-drivers: vivid: Increase max supported buffers for capture queues Date: Thu, 12 Oct 2023 13:46:31 +0200 Message-Id: <20231012114642.19040-46-benjamin.gaignard@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231012114642.19040-1-benjamin.gaignard@collabora.com> References: <20231012114642.19040-1-benjamin.gaignard@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-0.8 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 lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 12 Oct 2023 04:51:27 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779550425005632738 X-GMAIL-MSGID: 1779550425005632738 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 --- 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 394c9f81ea72..b5656330578d 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;