Message ID | 20231012114642.19040-30-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:2908:b0:403:3b70:6f57 with SMTP id ib8csp1166475vqb; Thu, 12 Oct 2023 04:51:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH88KS4ipkKZ6J6yz+56z5K3lSdTQRAEI64MlmE1zdJtKIrCNDpKGmkmndR1VwuJm3BxFiD X-Received: by 2002:a17:902:e5d2:b0:1c4:1cd3:8062 with SMTP id u18-20020a170902e5d200b001c41cd38062mr26861724plf.2.1697111469489; Thu, 12 Oct 2023 04:51:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697111469; cv=none; d=google.com; s=arc-20160816; b=sN4Cfm4iqZzB8wT4bGOs8B2pOZ99y68QUpnAqAnfZs14mjiJpOnHMPl1BezIoDAWv4 MD+Q2CnlZK0ApI6FC9uOYPCRJburRzLzyWR4NSdSUik0hgAZobf50qavTKfZXSd1ySV7 3KzHHLLXxdwM9NOPW4OtMb4gx6bnLf85C4+Tavoh5T+3T9VA06+X41q99T6H6WGXi4ih FEIUpR1pqAx/YfvpRIK2VErazMs75TAfkQk/V0x7V/cZmHoiN0WEzsLb0p4UtQZKUmNu T+AuTWtsHhnPqAiAXXwoKqi4xqIYAxRFkAH6TmJnbGRSVnmMmFJfU0CI8STdR4yiqTuI ZnbA== 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=IbcNvtBb6R2GsKrbxEY4D84V1Qu2aTmsMxQuDj2g0AQ=; fh=ceA81l8d2hZW6pWH7VE5TwJxtgXUzAubfWIMcikPA1M=; b=xGbmyFFqMa5Zs4OFfBqxvrLB9wmnTZeFMKhgedF6xgBxbIllQUeM28VnYPMTbvhUGA vUaH0x+mxtPuBRXzBpGwm/z5QQCGuAVSj56CkQp5CCUlRH1fnOOizNg/aUAfTS/ltw/W 7kwvyPPhuMEpx0I0VzTmjCxLYoVwbYBXar+2E/GJO6EBcyJqVuk9cJbiwlkhVAOzQXqt hDw1H396iBxnClYXN7YARm2L3yXznDzxO5/mGagojFoF6letWFtujsmF2L5KwUJxe38f UMa4Auu8SyWmvRABs5JDdFd9VEuhczSaJyfMqxgoMs2mJjBH5Nj94I+Jww7YL/7B9u9i YXsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Gt4nc0tx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id y22-20020a17090264d600b001c6223e5675si1931440pli.188.2023.10.12.04.51.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 04:51:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=Gt4nc0tx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (Postfix) with ESMTP id BF9B980A64EC; Thu, 12 Oct 2023 04:50:54 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379103AbjJLLsp (ORCPT <rfc822;rua109.linux@gmail.com> + 19 others); Thu, 12 Oct 2023 07:48:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378658AbjJLLrO (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 12 Oct 2023 07:47:14 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9864D124; Thu, 12 Oct 2023 04:47:06 -0700 (PDT) Received: from benjamin-XPS-13-9310.. (unknown [IPv6:2a01:e0a:120:3210:7ae7:b86d:c19a:877e]) (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 D47F96607386; Thu, 12 Oct 2023 12:47:04 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1697111225; bh=51uRb95lmgtzN6hPPISI8XHQeJXuX3+AzrSS67M/f6s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Gt4nc0txfNVIZ5gk4/sqZ4qB2MaTfQYsWPhxWnma3yviaHOoARF6sXyzRJQqcO8Ou XTEAtThthuhUpmbSiRuoovR62A4gy/9MJ8/7brNgOXyfIqXGQCUcR/peYoJGA/2lV0 Z9vAeqBAXyTu7CBu6KxUgbS2Q1gHaAfosZtAX6AwGHCqrpP1m1SXj17i8IzP5iDUGh G3OZaWgQg60lJGtoYrK7Ojy62GGP601fLQ42VL2fzdALe+zUaGUxyPvSFyNtKID3qP SR7pFSjVWzGBjGtXWYmY8LuPddgpfsOvoev0Wod6oVczcObQtZhTUb4igjZ1ftwAnC 4roVOh35d8nIg== 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 v11 29/56] media: renesas: Set min_buffers_needed to 16 Date: Thu, 12 Oct 2023 13:46:15 +0200 Message-Id: <20231012114642.19040-30-benjamin.gaignard@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231012114642.19040-1-benjamin.gaignard@collabora.com> References: <20231012114642.19040-1-benjamin.gaignard@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 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 fry.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 (fry.vger.email [0.0.0.0]); Thu, 12 Oct 2023 04:50:54 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779550356035155193 X-GMAIL-MSGID: 1779550356035155193 |
Series |
Add DELETE_BUF ioctl
|
|
Commit Message
Benjamin Gaignard
Oct. 12, 2023, 11:46 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>
CC: Philipp Zabel <p.zabel@pengutronix.de>
---
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;