Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3224208rdh; Mon, 27 Nov 2023 08:59:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IGB9XNsAhT6nCIcKop4hq6FBMWjiWq9P6Z1BE5sthRhtwFTmtLtYI1r0pan1CGM1U33Fwcs X-Received: by 2002:a17:902:b718:b0:1cc:7d96:3fe7 with SMTP id d24-20020a170902b71800b001cc7d963fe7mr9646750pls.28.1701104376748; Mon, 27 Nov 2023 08:59:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701104376; cv=none; d=google.com; s=arc-20160816; b=GVqhzordIB8WsPT9nNhzgv2QLM5s1Y1mnwnbn7m4ptKESjM7TT4+UhbcYVDpZFgid1 1n+GPFfD6Z6iktt8pwZSyz1X8OhJ2s6YPAOdl07Q2rctFUiYL4ojNvG/iSlpcSgRtt5E tpaheIx1MiMcG6rZbLzUzkyruItpJV6ozTKJLF76sl78Lfkl5qdh04gaTeyuTPsXmN9r SQtzm5ujQfO3TBC+XGw7ixXpQvyJF8BgU9rIwkM8UGqBKzyjeZR8B9+1g4mZHNheooOI 9fY7pPZXIiWB8z3sZZcACasKeyJWHC3E2LcLQMzeppla18iKns2brMIvjfue5AeCJXjR aNLQ== 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=UqvdrkUFemjKvRCT9RMiJ4Sq3s07hgFyzehlDx+msRI=; fh=nikTID0PJ6NwkGNufN11Ag6f/xC6mcRAltiCDIW3jKo=; b=Ka5DMjOfM06KbIVvtPgEsoxAMTuFmuqvo3MVYLL/f8JS5M4V1PkJ6GXDluqXQE+TQk 9qHSp9PO5KJ5jUFWSv1iUcPcBLaT4fvytkxVCDMIgxH4GQS7FXmbjhF6mAAwrrdnvP/f dPaGy9mRwORUjjhtwtCmW2hdA+xFCYmITKi9F0gjZm/X7846cE3uZ1ogCEZcQF8lWuiN kGs+nkT+vmfJhgtINsMqmsUL6RdJopr/KN+f0QqZYzfIHDLtwX3DxOQiy1C+O0Fbdska RWASzNfWjqVPpu+67EnkVj1utX99IKSjJhgTbpzVa7NEs/Ev77GGR08B1QAwhP9N3Ghg BZ4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=J5d5ZjFG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id q7-20020a170902eb8700b001cfba111aeasi5326420plg.533.2023.11.27.08.59.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 08:59:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=J5d5ZjFG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (Postfix) with ESMTP id E6990809E227; Mon, 27 Nov 2023 08:59:32 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234613AbjK0Q7O (ORCPT + 99 others); Mon, 27 Nov 2023 11:59:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234624AbjK0Q5c (ORCPT ); Mon, 27 Nov 2023 11:57:32 -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 C10862D46; Mon, 27 Nov 2023 08:55:45 -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 CBA5C660741E; Mon, 27 Nov 2023 16:55:43 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104144; bh=bl7A7cze/Fs4UDnfd9OCkp+Gbfc6kPJk9SWpxLmJ3Pk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=J5d5ZjFGg4ROA1NRrXHHuUPO7jXzI0XIeWXJhwb2b+gH6Ie1Qxt2e3cJo0VlSR1oA cX060uC1AeqYvjTfDc1ieeV+yDijP3RktQDbBInFHfANjb+aM8AdPJE/Dd9g+0HEM6 mMRjAQxqxdLd3YyVh0SaD1BZKIzlr/K6tLHlBlRomaMva0rQxESVJROaAZBANZ1A4F xA48dVXi6GRSNdytMp2iMl3m4mN2bl9R7Hpq8kJhaevWRUu4GQnaVbflt/lK4H9ICD fTuMCFhpgt0/vuHOdH17FpoqbwyeG2Q7x2qbUsnzVOuxxPmf15c4iqjC7P8z8f79FA MRRtrxBQM2vrw== 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 50/55] media: pci: cx88: Use min_dma_buffers_needed field Date: Mon, 27 Nov 2023 17:54:49 +0100 Message-Id: <20231127165454.166373-51-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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Mon, 27 Nov 2023 08:59:33 -0800 (PST) cx88 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/cx88/cx88-blackbird.c | 2 +- drivers/media/pci/cx88/cx88-dvb.c | 2 +- drivers/media/pci/cx88/cx88-video.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/media/pci/cx88/cx88-blackbird.c b/drivers/media/pci/cx88/cx88-blackbird.c index c1b41a9283c1..9cb14d661eec 100644 --- a/drivers/media/pci/cx88/cx88-blackbird.c +++ b/drivers/media/pci/cx88/cx88-blackbird.c @@ -1195,7 +1195,7 @@ static int cx8802_blackbird_probe(struct cx8802_driver *drv) 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 cx88_buffer); q->ops = &blackbird_qops; diff --git a/drivers/media/pci/cx88/cx88-dvb.c b/drivers/media/pci/cx88/cx88-dvb.c index 2087f2491c42..3473e1e93a24 100644 --- a/drivers/media/pci/cx88/cx88-dvb.c +++ b/drivers/media/pci/cx88/cx88-dvb.c @@ -1776,7 +1776,7 @@ static int cx8802_dvb_probe(struct cx8802_driver *drv) 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 cx88_buffer); q->ops = &dvb_qops; diff --git a/drivers/media/pci/cx88/cx88-video.c b/drivers/media/pci/cx88/cx88-video.c index c0ef03ed74f9..31eb79bfa547 100644 --- a/drivers/media/pci/cx88/cx88-video.c +++ b/drivers/media/pci/cx88/cx88-video.c @@ -1411,7 +1411,7 @@ static int cx8800_initdev(struct pci_dev *pci_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 cx88_buffer); q->ops = &cx8800_video_qops; @@ -1428,7 +1428,7 @@ static int cx8800_initdev(struct pci_dev *pci_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 cx88_buffer); q->ops = &cx8800_vbi_qops; -- 2.39.2