Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3223255rdh; Mon, 27 Nov 2023 08:58:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IE/WRZlpi+fwoIOFjcqrZLS/+9Q4azP6B32PAvomHe1w0rca5rqn42RBUPojzXvrlBR6CFy X-Received: by 2002:a17:90b:1c02:b0:285:a94b:85d6 with SMTP id oc2-20020a17090b1c0200b00285a94b85d6mr8582096pjb.45.1701104287639; Mon, 27 Nov 2023 08:58:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701104287; cv=none; d=google.com; s=arc-20160816; b=gMhi52bNxIFt2zubc1NjAdv2D5pKR6aqWq7Iabx+QmVIpubzNJFTUfyq33PV1QY/+Z HMlxNu7J7Pu9+bFopeclnRMA6y6rx4NS78uaLV65Di8LJg1KkmOhQulU72NBv0em8BYQ vFdfgpH0lh91aPlPheTlvH9x8go5jdYzZ0uqg3nIQHedhUeF956epH31THKjSZJLpQ4T pwt182N8H3Q/43ac4F6yI8l3BSGocHMQZ0tsG2SDabUyuwkVk92xgRgLLuCxaq2/e53L TRgxxW4tHDOhFpUARFWqzmjZPK6DxJ2nDfuwf8CbP+9Kqpp9JgY0phH3pUeXFkfDRF9Y 8Fag== 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=Yko7usTmH3Lya6XQafSBOMHN7VY2abfvvO1D6CUR1t0=; fh=qb/QAbhUkq4469wft+Ew7SPHZIS7GC/6sjH9Eti4clE=; b=IQrlhILXCNqdfebtcqsRchTuj0v7nUd+lb6rUkYB3bEVsgNRoDEbpRqoQJ985bGVE4 8OcHKkUB4p/SOHgvyCfD8gLh/3KhJxmp2n/MnHRdfwwMN4eXqTxp75F7nQgK2N/rIOjw 4by6ZfWuTyGlBZLBG3CPSQd5+nWNM6Nao2RuLuI7Z+oyB7AJOeSa28gf2kHRUU90R5K0 Ie0qovFsVgiTptrai+7Zuv27bnYHOZOE0wAOjEGvvj3EAITTqXPn0cX5+P7Kkn7kOezx rFyitFF/Ze6ynr2TJxoX3NATMrOat7wAg/bmWt/0k1wbX1U8AzMM+t0Lr/tvAL5Ad3IR wILg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=jmgsIweR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id x14-20020a63fe4e000000b005c1b2e0b12fsi9989950pgj.372.2023.11.27.08.58.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 08:58:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=jmgsIweR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id 02C8E80A30CF; Mon, 27 Nov 2023 08:58:06 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234713AbjK0Q5v (ORCPT + 99 others); Mon, 27 Nov 2023 11:57:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234429AbjK0Q4V (ORCPT ); Mon, 27 Nov 2023 11:56:21 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7FD0D213B; Mon, 27 Nov 2023 08:55:36 -0800 (PST) Received: from benjamin-XPS-13-9310.. (ec2-34-240-57-77.eu-west-1.compute.amazonaws.com [34.240.57.77]) (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 3E67166073ED; Mon, 27 Nov 2023 16:55:34 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104134; bh=oeU9+ujofjCPuqpbBJhFmasSXcVk3Te+UZBalP9S6o4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jmgsIweRenNoGVU5GQtYm6oRnhpXyUT2dFbt+4WgsQcG69mIJXDiSPgb+VIkZGjza JYJ8g7H5cb1iQEnpOF5S4ikoZ5Sa7hWLa44WS2yAWMdryATzyynpQif+YODa3yT7g2 SZK+FzrT+YrUHmL88C023KqIE+d5k8n6p/kg2nUs7oKLpWiBIEhuCADx4B6hUDiQ5I iUavy+1FeS4FcYhvE8YKYCCHw6gG3QOkvElrDuc+iJ9uqhvLbLrQY7fBScKV2DxRQr Dn9u7W9zHKOt8LqYzi6JRbYGpX9asUCO1yzbmnAJm6UAFRDPIV0MAC6NOS/8Ljdunc c0W+tU8jQKy4w== From: Benjamin Gaignard To: hverkuil@xs4all.nl, mchehab@kernel.org, tfiga@chromium.org, m.szyprowski@samsung.com, matt.ranostay@konsulko.com Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-staging@lists.linux.dev, kernel@collabora.com, Benjamin Gaignard , =?UTF-8?q?Niklas=20S=C3=B6derlund?= , Jacopo Mondi , linux-renesas-soc@vger.kernel.org Subject: [PATCH 37/55] media: renesas: Use min_dma_buffers_needed field Date: Mon, 27 Nov 2023 17:54:36 +0100 Message-Id: <20231127165454.166373-38-benjamin.gaignard@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231127165454.166373-1-benjamin.gaignard@collabora.com> References: <20231127165454.166373-1-benjamin.gaignard@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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,T_SCC_BODY_TEXT_LINE 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: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 27 Nov 2023 08:58:06 -0800 (PST) renesas drivers use a dma engine and needs a minimum number of buffers to be present before start streaming. That is 'min_dma_buffers_needed' purpose so use it instead of 'min_buffers_needed' field. Signed-off-by: Benjamin Gaignard CC: "Niklas Söderlund" CC: Jacopo Mondi CC: linux-renesas-soc@vger.kernel.org --- drivers/media/platform/renesas/rcar-vin/rcar-dma.c | 2 +- drivers/media/platform/renesas/renesas-ceu.c | 2 +- drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c | 2 +- drivers/media/platform/renesas/sh_vou.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/media/platform/renesas/rcar-vin/rcar-dma.c b/drivers/media/platform/renesas/rcar-vin/rcar-dma.c index 2a77353f10b5..b467e7a7d0dc 100644 --- a/drivers/media/platform/renesas/rcar-vin/rcar-dma.c +++ b/drivers/media/platform/renesas/rcar-vin/rcar-dma.c @@ -1559,7 +1559,7 @@ int rvin_dma_register(struct rvin_dev *vin, int irq) q->ops = &rvin_qops; q->mem_ops = &vb2_dma_contig_memops; q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; - q->min_buffers_needed = 4; + q->min_dma_buffers_needed = 4; q->dev = vin->dev; ret = vb2_queue_init(q); diff --git a/drivers/media/platform/renesas/renesas-ceu.c b/drivers/media/platform/renesas/renesas-ceu.c index 2562b30acfb9..e2aef002bca9 100644 --- a/drivers/media/platform/renesas/renesas-ceu.c +++ b/drivers/media/platform/renesas/renesas-ceu.c @@ -1399,7 +1399,7 @@ static int ceu_notify_complete(struct v4l2_async_notifier *notifier) q->mem_ops = &vb2_dma_contig_memops; q->buf_struct_size = sizeof(struct ceu_buffer); q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; - q->min_buffers_needed = 2; + q->min_dma_buffers_needed = 2; q->lock = &ceudev->mlock; q->dev = ceudev->v4l2_dev.dev; diff --git a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c index e6eedd65b71d..df1ab9beea6e 100644 --- a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c +++ b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c @@ -767,7 +767,7 @@ int rzg2l_cru_dma_register(struct rzg2l_cru_dev *cru) q->ops = &rzg2l_cru_qops; q->mem_ops = &vb2_dma_contig_memops; q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; - q->min_buffers_needed = 4; + q->min_dma_buffers_needed = 4; q->dev = cru->dev; ret = vb2_queue_init(q); diff --git a/drivers/media/platform/renesas/sh_vou.c b/drivers/media/platform/renesas/sh_vou.c index f792aedc9d82..c2ac340a9da8 100644 --- a/drivers/media/platform/renesas/sh_vou.c +++ b/drivers/media/platform/renesas/sh_vou.c @@ -1297,7 +1297,7 @@ static int sh_vou_probe(struct platform_device *pdev) q->ops = &sh_vou_qops; q->mem_ops = &vb2_dma_contig_memops; q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; - q->min_buffers_needed = 2; + q->min_dma_buffers_needed = 2; q->lock = &vou_dev->fop_lock; q->dev = &pdev->dev; ret = vb2_queue_init(q); -- 2.39.2