Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3224131rdh; Mon, 27 Nov 2023 08:59:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IGPxu7FhV8CcLd8/1vMNNGyxzbb0Fk+eai8rDkxwvu5SphHtdAAU+SC+GLxOc4bsuimplkd X-Received: by 2002:a17:90b:164b:b0:280:99ca:1611 with SMTP id il11-20020a17090b164b00b0028099ca1611mr10765370pjb.20.1701104370577; Mon, 27 Nov 2023 08:59:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701104370; cv=none; d=google.com; s=arc-20160816; b=tzO3k2JzGgrZ710EohoXX2RtL1v5Kph18MWJ4Wt9CqPqhj5guf7YUQP5Hb/nJFmGRL 0QeHS0caxqojGWBDsXpqe1LM2caizltY8snNRxOyGkIfIXEc6FBB2+jqwMueig/6tdVi A6W9CGYSgyWPn8Nxb/qWqk9Z4CXHozRt3COnyl43IoBC5MTEbNQebFbbdWiEFiay8/Sa 9sif1Pf7A7+mCXaXQE8vVZ/6Mt6h1IWx2KWpFQckjAAjAUa4fPnXqu7NBQ7Pc/+iY6nj icRAOF5TPuUna4x9Z4ij1zSsXjSotJdvKZL+MNS0xXJ7m1FyNawzi3sGiyoPAhtYm9iE X8Pw== 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=JpC4GGR+usgLXqU+6gLqzGZPHlaNMstOUkiwQ/sxYxQ=; fh=VXJx42lpfkfCkQc5whsBs5LVcuPWFI8g1iRi42xWq+E=; b=W5N4ZBJT/B8B15idgV7KnXOV0+goktLoVLnPctSTlPdBWraS/ZnhZjpLsFwR8Sr8Hx YaZndgVHDHLm1lFv77QpVVZhLDjhydivdm3oqrb6yDA3cSo2OUlMnFXhyDaG76SfA8A1 P4WR+Ot7DnDksrHE/h2upCeLhSbjUjAqHkd7YlpalfRrltFQEOc+adXVvOZ2kIuXEdpi CvwKjCdTc8nFsOELexMlbjeVbGFQBpNl7iav9HCd+/eRpXjuSvRkiNWgw+s0Mo3atHpp ttHW2V8L4mg6OFQlRjGCdKQqaAxQG+hvyn2tX6ZRLl+JiVxEsRj+dnGTs0OXofaeBVIt DC/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=NGkKb169; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id o14-20020a17090a4b4e00b0027cf6bb27dfsi10346057pjl.39.2023.11.27.08.59.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 08:59:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=NGkKb169; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id A530E80617F4; Mon, 27 Nov 2023 08:59:22 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234381AbjK0Q6k (ORCPT + 99 others); Mon, 27 Nov 2023 11:58:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234667AbjK0Q4d (ORCPT ); Mon, 27 Nov 2023 11:56:33 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0AF752708; Mon, 27 Nov 2023 08:55:41 -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 2FCCC660740B; Mon, 27 Nov 2023 16:55:40 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104140; bh=4e1hOLtYACGxKpv70NswjOrCLbRfh4IuvxjaZ96vjZQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NGkKb169X7rS7McuEhNRieeSnHBe1RhG1TOGDwtwHiQKKk1HKBxJ9cbjQUqKc+UCB QXA1QTTgzQ3txXhyrBYh2iTC7A2AIXnm9k79ePfyy9OJiu2MpEtZ6TX+mPtyoCr1CU D9Ju9Hz1z+/o8Jz/r6WndG7yUFKHLgkRqwLsUDfjh4tb0P8msDLpHOqEWY0VdGNDki +rJFSdyavDljNblVB8pFtI9pIrKEnCkK9qYAJYLBk+8CO/HbcO7n3lIz/4W4dMt8Su PN3qzqfQajZT/DuKfVXCZ8ukqmnPn2tigDY2WcBDViPie59Oir9KseYg1hQroogFzD Ji5bHV6aYzYzg== 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 , Martin Tuma Subject: [PATCH 45/55] media: pci: mgb4: Use min_dma_buffers_needed field Date: Mon, 27 Nov 2023 17:54:44 +0100 Message-Id: <20231127165454.166373-46-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 groat.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 (groat.vger.email [0.0.0.0]); Mon, 27 Nov 2023 08:59:22 -0800 (PST) mgb4 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 CC: Martin Tuma --- drivers/media/pci/mgb4/mgb4_vin.c | 2 +- drivers/media/pci/mgb4/mgb4_vout.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/pci/mgb4/mgb4_vin.c b/drivers/media/pci/mgb4/mgb4_vin.c index d72b07b87cd1..89e87aa87341 100644 --- a/drivers/media/pci/mgb4/mgb4_vin.c +++ b/drivers/media/pci/mgb4/mgb4_vin.c @@ -849,7 +849,7 @@ struct mgb4_vin_dev *mgb4_vin_create(struct mgb4_dev *mgbdev, int id) vindev->queue.mem_ops = &vb2_dma_sg_memops; vindev->queue.gfp_flags = GFP_DMA32; vindev->queue.timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; - vindev->queue.min_buffers_needed = 2; + vindev->queue.min_dma_buffers_needed = 2; vindev->queue.drv_priv = vindev; vindev->queue.lock = &vindev->lock; vindev->queue.dev = dev; diff --git a/drivers/media/pci/mgb4/mgb4_vout.c b/drivers/media/pci/mgb4/mgb4_vout.c index 857fc7bbd21a..23f0e4fb195f 100644 --- a/drivers/media/pci/mgb4/mgb4_vout.c +++ b/drivers/media/pci/mgb4/mgb4_vout.c @@ -523,7 +523,7 @@ struct mgb4_vout_dev *mgb4_vout_create(struct mgb4_dev *mgbdev, int id) voutdev->queue.mem_ops = &vb2_dma_sg_memops; voutdev->queue.gfp_flags = GFP_DMA32; voutdev->queue.timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; - voutdev->queue.min_buffers_needed = 2; + voutdev->queue.min_dma_buffers_needed = 2; voutdev->queue.drv_priv = voutdev; voutdev->queue.lock = &voutdev->lock; voutdev->queue.dev = dev; -- 2.39.2