Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3226412rdh; Mon, 27 Nov 2023 09:01:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IFqaPWEZ6AWLHBjzpRWa8lPeKkzTePzXrX173+QPznkTmeZcb5BP/6IkkpXLXM1UfLJydD7 X-Received: by 2002:a05:6a00:e0f:b0:6cb:d2cb:5234 with SMTP id bq15-20020a056a000e0f00b006cbd2cb5234mr14543448pfb.32.1701104503074; Mon, 27 Nov 2023 09:01:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701104503; cv=none; d=google.com; s=arc-20160816; b=n2FyjtZYPYr6EYHYRWUTfMkO1Tayprb+UM1UfmSa1+h/3joP1eqJyOCWQ4I2jalzB5 LEvsnWS1XqKVi/+OyUMI6L/gOk1aevRBfwHVfw5pu2IU0ddMu1gno5eUQXj6PLnzx5G5 wuzmRsd0ZkjtvSIG5OMiiHNybmroM0iEUBSvxHOGJ+qMYcd+1WierZm+myLDvaRU21U2 gYuAIKdm5NpaNzf+SGAYFIKMIftfeb1ARW4N0DvJ90JY/rVGxwabS/0zKn3YfCKJvUTR oFhNh493SaltH36WPQQHs5A7uZoVIvwzNFisCqhXTe5FsOo0+iLvCG90CceU+cvh6cFT ongw== 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=iyxarXCz1whNmPCMSrfIG1iBy6cyhxaTiKsqkUYpg6s=; fh=nikTID0PJ6NwkGNufN11Ag6f/xC6mcRAltiCDIW3jKo=; b=l7j+TvPa2krRgHJtafE2qKCYmPhGTeKscpLxWJd5NC7XaDRe278EqJINRRqFl2LXak lFEEl7JYWRp/4KU1/ipiG4+mGH3izTlngugU6wQrar7Md3VQxKIb31nePLhY7TjgmCRi dKYNRYEUVqc2IclC/ZfHeJeT/HJsksbA0TbBv1hdeKkZPd33iL42KCo5PiMmgMoj0661 Iq/2y4X1SSbCfsc84wvILF5NXcXPrA4tuks25VqjLyEzkrg7dbU2kXT5e+Z5/K+Llb8a 8a/OiYsZuOAl4UKaOL+JyJSs8asdL+HiVgR3c6mWaWnBXX1TQjW32GTgLcezlFgStxp7 DubA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=bWEody9R; 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 Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id g9-20020a056a0023c900b0069342eade87si10564957pfc.18.2023.11.27.09.01.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 09:01:43 -0800 (PST) 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=bWEody9R; 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 032298089A25; Mon, 27 Nov 2023 09:01:40 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234375AbjK0RB0 (ORCPT + 99 others); Mon, 27 Nov 2023 12:01:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234302AbjK0RBC (ORCPT ); Mon, 27 Nov 2023 12:01:02 -0500 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 5E2122D4F; Mon, 27 Nov 2023 08:55:46 -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 817EA6607347; Mon, 27 Nov 2023 16:55:44 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104145; bh=l0yA+tkYAIYjSficENb2r/EZg/4Zvfn7jPg69IDt+aw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bWEody9REaxKp+AZdERITTmjwYiVD1Ytqd62b9M8v/RhCAaSJVc6iwbWgDcDoLPBb lcQ3tFAzSdXrsLYlrSUiNTo4XH3cIefIEKLJZHMlnuLzT0dwsU8Vmgmipy/ubVVsWX f4k6jJ5uZfoH60dUcT4Sz7MvwWZiVHQkUsfY+lPznBquUBUAq8kEKsJZyPoG5OguTd bcQA7VIhiku8qWd3MIJGCRRp/lQa493PRxsmtx4VQrMe9BR42iyWG1XxpFX65q+D0H +kUkB1q1EbSiMvmsCH8Kjr1gFeJ9bY7Xrz+ShVx+tWvZKYCODlc7j0xIMOE+qlSMuk b+gg4DqkqqRQQ== 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 Subject: [PATCH 51/55] media: pci: cx23885: Use min_dma_buffers_needed field Date: Mon, 27 Nov 2023 17:54:50 +0100 Message-Id: <20231127165454.166373-52-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-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,T_SCC_BODY_TEXT_LINE 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: 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, 27 Nov 2023 09:01:40 -0800 (PST) cx23885 driver 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 --- drivers/media/pci/cx23885/cx23885-417.c | 2 +- drivers/media/pci/cx23885/cx23885-dvb.c | 2 +- drivers/media/pci/cx23885/cx23885-video.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/media/pci/cx23885/cx23885-417.c b/drivers/media/pci/cx23885/cx23885-417.c index 434677bd4ad1..44c93484d42c 100644 --- a/drivers/media/pci/cx23885/cx23885-417.c +++ b/drivers/media/pci/cx23885/cx23885-417.c @@ -1525,7 +1525,7 @@ int cx23885_417_register(struct cx23885_dev *dev) q->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; q->io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF | VB2_READ; q->gfp_flags = GFP_DMA32; - q->min_buffers_needed = 2; + q->min_dma_buffers_needed = 2; q->drv_priv = dev; q->buf_struct_size = sizeof(struct cx23885_buffer); q->ops = &cx23885_qops; diff --git a/drivers/media/pci/cx23885/cx23885-dvb.c b/drivers/media/pci/cx23885/cx23885-dvb.c index 7551ca4a322a..7509fbda4e18 100644 --- a/drivers/media/pci/cx23885/cx23885-dvb.c +++ b/drivers/media/pci/cx23885/cx23885-dvb.c @@ -2667,7 +2667,7 @@ int cx23885_dvb_register(struct cx23885_tsport *port) q->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; q->io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF | VB2_READ; q->gfp_flags = GFP_DMA32; - q->min_buffers_needed = 2; + q->min_dma_buffers_needed = 2; q->drv_priv = port; q->buf_struct_size = sizeof(struct cx23885_buffer); q->ops = &dvb_qops; diff --git a/drivers/media/pci/cx23885/cx23885-video.c b/drivers/media/pci/cx23885/cx23885-video.c index 9af2c5596121..13c5812a8833 100644 --- a/drivers/media/pci/cx23885/cx23885-video.c +++ b/drivers/media/pci/cx23885/cx23885-video.c @@ -1321,7 +1321,7 @@ int cx23885_video_register(struct cx23885_dev *dev) q->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; q->io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF | VB2_READ; q->gfp_flags = GFP_DMA32; - q->min_buffers_needed = 2; + q->min_dma_buffers_needed = 2; q->drv_priv = dev; q->buf_struct_size = sizeof(struct cx23885_buffer); q->ops = &cx23885_video_qops; @@ -1338,7 +1338,7 @@ int cx23885_video_register(struct cx23885_dev *dev) q->type = V4L2_BUF_TYPE_VBI_CAPTURE; q->io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF | VB2_READ; q->gfp_flags = GFP_DMA32; - q->min_buffers_needed = 2; + q->min_dma_buffers_needed = 2; q->drv_priv = dev; q->buf_struct_size = sizeof(struct cx23885_buffer); q->ops = &cx23885_vbi_qops; -- 2.39.2