From nobody Thu Nov 14 05:12:47 2024 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 28433E7849A for ; Mon, 2 Oct 2023 12:28:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237033AbjJBM23 (ORCPT ); Mon, 2 Oct 2023 08:28:29 -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 ); 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 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 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: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 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 =3D buf_type; q->io_modes =3D VB2_MMAP | VB2_DMABUF; q->io_modes |=3D V4L2_TYPE_IS_OUTPUT(buf_type) ? VB2_WRITE : VB2_READ; + if (buf_type =3D=3D V4L2_BUF_TYPE_VIDEO_CAPTURE) + q->max_num_buffers =3D 64; + if (buf_type =3D=3D V4L2_BUF_TYPE_SDR_CAPTURE) + q->max_num_buffers =3D 1024; + if (buf_type =3D=3D V4L2_BUF_TYPE_VBI_CAPTURE) + q->max_num_buffers =3D 32768; + if (allocators[dev->inst] !=3D 1) q->io_modes |=3D VB2_USERPTR; q->drv_priv =3D dev; --=20 2.39.2