Message ID | 20231003080704.43911-26-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 in14csp1928874vqb; Tue, 3 Oct 2023 01:09:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHwQQ6xHobMEJd+wC5xcRyIjVGOE+HR0LV1S2LgoF+pG4fa4PWSKfjIC9Emoe6WRzeH5ELy X-Received: by 2002:a17:902:e84a:b0:1bc:5924:2da2 with SMTP id t10-20020a170902e84a00b001bc59242da2mr15250291plg.56.1696320554340; Tue, 03 Oct 2023 01:09:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696320554; cv=none; d=google.com; s=arc-20160816; b=VTr+w4Xqt5xEyk7YywLct/psoKKSEljG7ePEwtiWgV8leWtX0owj19rxV9Y2iLJy// PSqEqZ4m+f7wSVxJTnHuvc7CAo8rmEzkv0YhmhFhg9ATUWWM723yziPgPG2EU8Ms0MxQ qiguk8nJuxO0lXLIbzYWxkxqDR0aDOesWxjc86H23yQNt70rAiJcqS4N3x2b/wPiQ0bh UM/J5MV5R0J7cW6MGK5rcc1yoZljGYzr8MKSY2GhhpOfbesr6CAeAjOM4HpziSZTWslS z4OyT+1AmNyP9tYQEB+roBtHVCEVx5gYjjKT32YdwB7r+oAvm019p+4WmpKT0Ma8wkB6 9fOA== 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=PmW7Z5NzQBNoTpp+u7NKXF/tYEVc6UqlJQkmg8Bhq70=; fh=ceA81l8d2hZW6pWH7VE5TwJxtgXUzAubfWIMcikPA1M=; b=S5sQn16umht72pqH1VYSaGy0eI7TOA585Q0b/0RvCQOPWkoZt/P0JbjriUeVs5vXEv Vi/S4fyfmiDfjukaylkx1TqHg4+yRRyCpsmguky2XEol1iNhbmLdlWd2isI0EB32bnUY bT4c34JANxvzlvsoEZWGNi0DtqTk9UhB/+KvODJ3p0T5IhNaOyJ1h6UGfco7nkH8Q4FE ipY13MyrkxMMmAKIbA2Do7BHl+cp8Ic1mzMV1h+atd4oMGxSF7T9K6ZPCocZiRXYJbf6 PDYqNZPXtuCfNmGYEW1r1Yk6qJggMCBw+VGIC3HVEaQwSxlU2QDFnhQGjGZ50qicznZ1 kXqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=c4FiWMZ2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id s18-20020a170903321200b001c4329b77bfsi849618plh.123.2023.10.03.01.09.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 01:09:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=c4FiWMZ2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (Postfix) with ESMTP id A477D824928B; Tue, 3 Oct 2023 01:09:13 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239248AbjJCII6 (ORCPT <rfc822;pusanteemu@gmail.com> + 18 others); Tue, 3 Oct 2023 04:08:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239453AbjJCIHg (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 3 Oct 2023 04:07:36 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68C8DFD; Tue, 3 Oct 2023 01:07:27 -0700 (PDT) Received: from benjamin-XPS-13-9310.. (unknown [IPv6:2a01:e0a:120:3210:b6df:b784:6a0f:8451]) (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 D2E356607355; Tue, 3 Oct 2023 09:07:25 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1696320446; bh=rFkYvrsLIxo1F3JyDJJ7M8J5xfn6Sk0yrCHC7ra2U7I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=c4FiWMZ2kFjTILE1eg1120K+BXPvF5F/v+HIpp33sF+j1YS60kO5mDxH3FlaLKGf9 rvzXHc0UDuQx4/vH5a4AkBQViE3sS5Qrpbv+4CnVvr98HtxyhHZMrhMaZxq0jdAmWh /JCKL9+vS0E4NJYHBlZz2gF4kKLSS4Bpl1ww6NMEcEC9cIixykT0hLuUtYy21yLD/W XyV1SuSLfOyoCuFBNYhTninS0fvTzjKFIA9g9cuynZlEmBMHZIYUStFBFr7f22LW6I HPed5c8iPsyG24jMEoWPbijycjJBVJeWovNq3QmLzeANFLTEZENDKwQgMz+yI8SyTY 69vhnyRLrh1uQ== 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 v10 25/54] media: pci: cx18: Set correct value to min_buffers_needed field Date: Tue, 3 Oct 2023 10:06:34 +0200 Message-Id: <20231003080704.43911-26-benjamin.gaignard@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231003080704.43911-1-benjamin.gaignard@collabora.com> References: <20231003080704.43911-1-benjamin.gaignard@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (howler.vger.email [0.0.0.0]); Tue, 03 Oct 2023 01:09:13 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778721021364204813 X-GMAIL-MSGID: 1778721021364204813 |
Series |
Add DELETE_BUF ioctl
|
|
Commit Message
Benjamin Gaignard
Oct. 3, 2023, 8:06 a.m. UTC
Set queue min_buffers_needed field to 3 and remove the useless
check.
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
---
drivers/media/pci/cx18/cx18-streams.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/drivers/media/pci/cx18/cx18-streams.c b/drivers/media/pci/cx18/cx18-streams.c index 597472754c4c..6ed2c9fb882c 100644 --- a/drivers/media/pci/cx18/cx18-streams.c +++ b/drivers/media/pci/cx18/cx18-streams.c @@ -117,13 +117,6 @@ static int cx18_queue_setup(struct vb2_queue *vq, else szimage = cx->cxhdl.height * 720 * 2; - /* - * Let's request at least three buffers: two for the - * DMA engine and one for userspace. - */ - if (vq->num_buffers + *nbuffers < 3) - *nbuffers = 3 - vq->num_buffers; - if (*nplanes) { if (*nplanes != 1 || sizes[0] < szimage) return -EINVAL; @@ -286,7 +279,11 @@ static int cx18_stream_init(struct cx18 *cx, int type) s->vidq.ops = &cx18_vb2_qops; s->vidq.mem_ops = &vb2_vmalloc_memops; s->vidq.timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; - s->vidq.min_buffers_needed = 2; + /* + * Let's request at least three buffers: two for the + * DMA engine and one for userspace. + */ + s->vidq.min_buffers_needed = 3; s->vidq.gfp_flags = GFP_DMA32; s->vidq.dev = &cx->pci_dev->dev; s->vidq.lock = &cx->serialize_lock;