Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp2403632rdg; Mon, 16 Oct 2023 03:32:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEr98s/2VbO0OxQjMzSsFxJLOEjKxIr9oOgAxG+Tut8EUtlaUjiJUBJuX8y8Ethuz2BOzfZ X-Received: by 2002:a17:90b:84:b0:27c:fa10:fc82 with SMTP id bb4-20020a17090b008400b0027cfa10fc82mr14828716pjb.28.1697452353217; Mon, 16 Oct 2023 03:32:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697452353; cv=none; d=google.com; s=arc-20160816; b=D25v4MHFPL3iOO0MNtGxBqlGoJM7qsbnPHieCOzfkKl3wNXEH3pHuWwgxg/NotqNS0 PqWtZqSPnC5sUQJCIvgpqar/TzU1VC+/Bo+eyM+rORCljLYXbqwF/lQtPrvn60ksKN4B tSmYCGfPQOa9BzldaPpwUzPumRPE56RadxCU0QTJl52zaQNOfyqi//2RnVMpgQJSMYgO xmS06/uvxIygkdl2NpIW0rwIAD29Vq/LgZuBbchKO2qwWv41aGk18PImu8Ivy3C7FvWf eLWysH4bgpafc7ig+xlP02A9c+i7lwMVoeQY0pqiuh4JZfW9UtPP6tcc+zCEf1b7ScUw PB/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=dpGv7jI9Z6ISp3ZBckr6syUlleUJEs1l5qXUWYMdnlY=; fh=rvfjkWKWQ7H3dxwU/Mrzlf1SBsZ3Tuo/EBElQFetDNM=; b=ygd9lo9Zv0FD3DLjK1JJ7IrzD+3DwB6PYo9Mao7yqlVfi+LZYit64PH4nA6uU8WdPA 90VD15Aku9CWOtaGKj2fp7kvpWvqcHVhjmpwUP4uW977FcMMtLV+rOCGC4CFwVIBwbN0 ck7MAYvAr4UTO8Q71MQDGPyuH+MjylsYGsSUQ3RgTXzaYRe/nX7hom3rLM1gkEYEryvP sh0mor6ZVXk0lwGCOunNooNihVbCmfbXg74hi7QxZmmHNamm53EYCPPWOPAP3KBlqbQH LUo37nFw/pK2XMEHqmN2XOcwXd6qSv6/Dx0fWksb6w29sqMZ3L4bQPxbgGCjBFfvl3ze 1QfA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xs4all.nl Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id 10-20020a17090a194a00b0025960d035c6si5809500pjh.138.2023.10.16.03.32.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 03:32:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=xs4all.nl Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id E9B6C80D2930; Mon, 16 Oct 2023 03:32:30 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231180AbjJPKcL (ORCPT + 99 others); Mon, 16 Oct 2023 06:32:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229666AbjJPKcJ (ORCPT ); Mon, 16 Oct 2023 06:32:09 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 743ADB4; Mon, 16 Oct 2023 03:32:08 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 29066C433C7; Mon, 16 Oct 2023 10:32:04 +0000 (UTC) Message-ID: <0ca82921-b71a-4d87-a1f1-6a6158f07c8c@xs4all.nl> Date: Mon, 16 Oct 2023 12:32:03 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v11 45/56] media: test-drivers: vivid: Increase max supported buffers for capture queues Content-Language: en-US, nl To: Benjamin Gaignard , 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, 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 References: <20231012114642.19040-1-benjamin.gaignard@collabora.com> <20231012114642.19040-46-benjamin.gaignard@collabora.com> From: Hans Verkuil In-Reply-To: <20231012114642.19040-46-benjamin.gaignard@collabora.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=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 morse.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 (morse.vger.email [0.0.0.0]); Mon, 16 Oct 2023 03:32:31 -0700 (PDT) On 12/10/2023 13:46, Benjamin Gaignard wrote: > 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; This should use the same calculation as MAX_BUFFER_INDEX. I wonder if those defines should move to videobuf2-core.h instead. Regards, Hans > + > if (allocators[dev->inst] != 1) > q->io_modes |= VB2_USERPTR; > q->drv_priv = dev;