Message ID | 20231002120617.119602-42-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 in14csp1579725vqb; Mon, 2 Oct 2023 10:29:32 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEC2TZNK+1DD/rvQXD29jXFTtF3tFhnK+q/kt2I8qhK8SSH7LOHLnRkEAe6vcJh7F4ECVhL X-Received: by 2002:a05:6808:2029:b0:3a9:e85d:b689 with SMTP id q41-20020a056808202900b003a9e85db689mr14250518oiw.0.1696267772669; Mon, 02 Oct 2023 10:29:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696267772; cv=none; d=google.com; s=arc-20160816; b=HYlB2XkA2iVBkkupnw8ehg2d1ENk1aZ7HdNkTmrhCN2CQ4lbgYyRyiCU0E+9yPyXHD /U8IKgT3P9fQ5q29PBN+xyRunymEBpViE9kYARNt/KhmFDfXHrHMsY0ne4dvJNvjMp54 rNLdtDS4axdMXY313F2Q1mXiX1edCZ1rK7wbMxCy7lvt9CoZsa4hHCjc7ewsKbYCbkLP 08rT8QyMrneoiU8/SA9IHvY54DGB91fIrxuiDqQho+s48Z1HNgV364mVA22uR78QQP7U ZOIpRmmAGbsgJtnzQUts8Wu2NHns3dbElpIpBDXQvtlnV98zyPOqC2+4XvbqxoxqQvW7 he1Q== 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=qTuPHPU4Io44nAdkQT6nBOAqUL8jchiAXtKAUc5aY3c=; fh=ceA81l8d2hZW6pWH7VE5TwJxtgXUzAubfWIMcikPA1M=; b=WhQkKcqgDNIfgYP24a76Ym0w33BXPmZUcSYwgyX/coBO3FtULFp7Ggoglfcmwnw2qb IAyyD1pSVVJW5cyghj1yj2n+3ixRCvGuRNVmea1tAiC1Wb5fbAPNaTa53D4tqgsF2X/I vmsxTO6A26OheKHhHvlmyCZPqv+IUM0Y7Ug4GtfzK/4u9Ibvo6wolL5Z2zJU7ZNTqLXr 5+TxDXj53zhyb6wOQ6/pjksUUOCouTh73IOvErHTZZUlbbaAhhRAKJ0uBSk2prVqXQlq Z3F7kil/I+Auyy+l+nVYk9iauxWe/VPeSsVWlCMfDtKYe8xB1Z7t2c83WTWiEyDmK4VA lcyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=XWIVFqhW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id b6-20020a17090a6e0600b002597ed3cc4fsi7444263pjk.189.2023.10.02.10.29.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 10:29:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=XWIVFqhW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (Postfix) with ESMTP id 43AE7804C4A4; Mon, 2 Oct 2023 05:11:12 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237430AbjJBMIj (ORCPT <rfc822;pusanteemu@gmail.com> + 18 others); Mon, 2 Oct 2023 08:08:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237121AbjJBMHA (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 2 Oct 2023 08:07:00 -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 3D7BF11F; Mon, 2 Oct 2023 05:06:48 -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 724486607359; Mon, 2 Oct 2023 13:06:46 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1696248406; bh=nwepyznt8z6pxABzkpFHR6clGV59kYVToyX8aj6cN+w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XWIVFqhWOpa4B7VDWOVRJGz3fA17ClvB9LjIPQwm/0c8Kl9uyMI0ppriwDG9c22MR FOI5dyNd7BekgAMf8F0Q4+jbg0QEodgR3S96WKOLELLdWNlrf2EdSjVfqLGWlWWETw og7iUoEvuPrma5iT45XjpFobPF1YQPlx2710pE0Ho5SDD09tEYnW3JvI7cnVCIDbI+ y0gPcM4UR/uN3rwrDM928sxDIl++K9qR5tOnESOFRg7sT7E8AA1XqOuPZ3JymIb9hg skTIYPbhzLEas0808uc5H0Pc5vCTZWZyMxUxvj6ZOZsA/Zneo/ko3gD5fBMvnmPQL+ uhQlrYixtszvQ== 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 41/53] media: usb: usbtv: Set min_buffers_needed to 2 Date: Mon, 2 Oct 2023 14:06:05 +0200 Message-Id: <20231002120617.119602-42-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 agentk.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 (agentk.vger.email [0.0.0.0]); Mon, 02 Oct 2023 05:11:12 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778665676078259876 X-GMAIL-MSGID: 1778665676078259876 |
Series |
Add DELETE_BUF ioctl
|
|
Commit Message
Benjamin Gaignard
Oct. 2, 2023, 12:06 p.m. UTC
vb2 queue_setup checks for a minimum number of buffers so set
min_buffers_needed to 2 and remove the useless check in
usbtv_queue_setup().
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
---
drivers/media/usb/usbtv/usbtv-video.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/media/usb/usbtv/usbtv-video.c b/drivers/media/usb/usbtv/usbtv-video.c index 1e30e05953dc..0e9e860be47f 100644 --- a/drivers/media/usb/usbtv/usbtv-video.c +++ b/drivers/media/usb/usbtv/usbtv-video.c @@ -727,8 +727,6 @@ static int usbtv_queue_setup(struct vb2_queue *vq, struct usbtv *usbtv = vb2_get_drv_priv(vq); unsigned size = USBTV_CHUNK * usbtv->n_chunks * 2 * sizeof(u32); - if (vq->num_buffers + *nbuffers < 2) - *nbuffers = 2 - vq->num_buffers; if (*nplanes) return sizes[0] < size ? -EINVAL : 0; *nplanes = 1; @@ -892,6 +890,7 @@ int usbtv_video_init(struct usbtv *usbtv) /* videobuf2 structure */ usbtv->vb2q.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; usbtv->vb2q.io_modes = VB2_MMAP | VB2_USERPTR | VB2_READ; + usbtv->vb2q.min_buffers_needed = 2; usbtv->vb2q.drv_priv = usbtv; usbtv->vb2q.buf_struct_size = sizeof(struct usbtv_buf); usbtv->vb2q.ops = &usbtv_vb2_ops;