Message ID | 20231003080704.43911-35-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 in14csp1930358vqb; Tue, 3 Oct 2023 01:12:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHHjvIpthrHmBscR0g/AxiWbu8VpVw0zNRBx6FxKeoX0mbH3haScTed24FIDX6KpggPWojV X-Received: by 2002:a05:6a20:f397:b0:15e:dc75:66af with SMTP id qr23-20020a056a20f39700b0015edc7566afmr11095998pzb.59.1696320757684; Tue, 03 Oct 2023 01:12:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696320757; cv=none; d=google.com; s=arc-20160816; b=rTqhO94ny2GWB7M/c4sxYIpcHfu4ybPONfQDdeudvaZVi+6Ae3Vo3g5v1i7mA2FTAH UnbjZXZE+9uAkKQWVU1YAsZOCLrBAnainffEey/RI7RBXIPLM8mKgN5H1x40wvdziCIF oihw9Meug1HMivlYCwys1ljKV79mZVcDE3ST3yvh6pueve+3wYBNx0dFPW1rPFzsjc7d zEojP44eiI0jOSXCCLI5QOuDZ7jEgkaOq0OvpIumsin0jVbHExoKmHvFodBXxCsjkOBC EGqYkRcEThaNgrJ5bkEBF8WYif38VfE8gbxkuInDLoKZcKsynK7d/5VgiZU+eVM64rBk MYpA== 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=tBIVbW4WLQCv5IssZ+dxuNiWdgjFxHzgD99kxkSCzJg=; fh=ceA81l8d2hZW6pWH7VE5TwJxtgXUzAubfWIMcikPA1M=; b=FtaKGDbczaR+jA6WKCBP2BkwYOwfdTDWoWdEoylmezFrvk8XCCfIVJyN58LI351891 3V3DvYWDdeCZZrj2Kum/8hmSxxdWkeO3YIIVCW8FZnbdzGV8WqqBMqlo20+slV8JVhmw W4h8AsW6AiBmV1c91zzYZGqktLiCRjZZpq0b7ZyC4O4brFPKMBJRaLX+Byf0vWFNm1SY Gi6LrOE88Q8YYmM/nRqXpA0xGFZVB76Ekeh6tviBPDqYeq+UO7j2NjK0osG5afk8zY9r jVIMNoBydGAUr0GEiEFhK9D8LkieV1QZo5rwr2bc1eg8IBW8+2LNGqA5MZ5a6qKpOLNe PA1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=XlWAfaST; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id g14-20020a056a001a0e00b006934390d0casi967552pfv.36.2023.10.03.01.12.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 01:12:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=XlWAfaST; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (Postfix) with ESMTP id 177EF802A2A5; Tue, 3 Oct 2023 01:12:16 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239546AbjJCIJN (ORCPT <rfc822;pusanteemu@gmail.com> + 18 others); Tue, 3 Oct 2023 04:09:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239479AbjJCIHi (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 3 Oct 2023 04:07:38 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63500197; Tue, 3 Oct 2023 01:07:32 -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 8998D6607370; Tue, 3 Oct 2023 09:07:30 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1696320450; bh=H1GfOB6mMJ44+7OCOGMjuo+dWjaU6UnQ+DdGWJmRb1Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XlWAfaSTXg87NJNtSL7sLxzjqJul6QYunE6ahi5vV4Uwkf8VdGmA6gNwUHl4ixPNc 64TU1XdVJe/F/b9nWagYg5XjyPn8TM+ZxvU83snjR6s8wHawbsVbGsb+F/2NBWlBd7 VcLlJP92mf3JlSsS/7D6NBjoyMppFVRewnSWN8r7sFGQed4yJlfoQSBRNCiqYuE948 0Idvq+NpO8ypyvXkhZ6YYkFKQKKjiw8iDg5mk/mProNOEeyCl/3kqg4gSjYcPuYQXx YI1swEP1ce5FqXJJPH06LBBS2LOrOqnOZiI57yfHm7iGK9dXgsCM1Lj8Za4iaHCpD8 PiCRmsiXDx5Pg== 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 34/54] media: renesas: Set min_buffers_needed to 16 Date: Tue, 3 Oct 2023 10:06:43 +0200 Message-Id: <20231003080704.43911-35-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=-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 pete.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 (pete.vger.email [0.0.0.0]); Tue, 03 Oct 2023 01:12:16 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778721234523120129 X-GMAIL-MSGID: 1778721234523120129 |
Series |
Add DELETE_BUF ioctl
|
|
Commit Message
Benjamin Gaignard
Oct. 3, 2023, 8:06 a.m. UTC
vb2 queue_setup checks for a minimum number of buffers so set
min_buffers_needed to 16 and remove the useless check in
rcar_drif_queue_setup().
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
---
drivers/media/platform/renesas/rcar_drif.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/media/platform/renesas/rcar_drif.c b/drivers/media/platform/renesas/rcar_drif.c index 292c5bf9e50c..bb84fc089d5d 100644 --- a/drivers/media/platform/renesas/rcar_drif.c +++ b/drivers/media/platform/renesas/rcar_drif.c @@ -425,13 +425,9 @@ static int rcar_drif_queue_setup(struct vb2_queue *vq, { struct rcar_drif_sdr *sdr = vb2_get_drv_priv(vq); - /* Need at least 16 buffers */ - if (vq->num_buffers + *num_buffers < 16) - *num_buffers = 16 - vq->num_buffers; - *num_planes = 1; sizes[0] = PAGE_ALIGN(sdr->fmt->buffersize); - rdrif_dbg(sdr, "num_bufs %d sizes[0] %d\n", *num_buffers, sizes[0]); + rdrif_dbg(sdr, "num_bufs %u sizes[0] %d\n", vb2_get_num_buffers(vq), sizes[0]); return 0; } @@ -1310,6 +1306,8 @@ static int rcar_drif_sdr_probe(struct rcar_drif_sdr *sdr) /* Init videobuf2 queue structure */ sdr->vb_queue.type = V4L2_BUF_TYPE_SDR_CAPTURE; sdr->vb_queue.io_modes = VB2_READ | VB2_MMAP | VB2_DMABUF; + /* Need at least 16 buffers */ + sdr->vb_queue.min_buffers_needed = 16; sdr->vb_queue.drv_priv = sdr; sdr->vb_queue.buf_struct_size = sizeof(struct rcar_drif_frame_buf); sdr->vb_queue.ops = &rcar_drif_vb2_ops;