Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3224183rdh; Mon, 27 Nov 2023 08:59:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IGZKq5yijJbvaQFVzxQLM8opNHf7z3zLxkFZwZo8NmT1yNE0kbBA9WnrUGLYN+Za0QgBkWH X-Received: by 2002:a92:d809:0:b0:35c:ae44:1766 with SMTP id y9-20020a92d809000000b0035cae441766mr7176587ilm.4.1701104374370; Mon, 27 Nov 2023 08:59:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701104374; cv=none; d=google.com; s=arc-20160816; b=kvYFovjNCyF+xEXhBUimnAXMMrYXro7zpT8WxcC/VKGptYAyAmtZaH9DelcNr10xsU J1ti4qXCuvLcyo6Umn8hIK2hOpkIf71UzR7fiyRgk2lKaiHgoafBvXpYihoqSGnWtSmM tPhWffdsNsByvCBJYmZWJSnLzyAtm01kkP5blT49o/Mf3JTRLwmRYxeovGWlq8J2xaXW 7LEvExYY54L1/oxKJRp71OQiyN+t40TBsdG8cdJ5a5fTk6dyy+islSObZaZFVMtLnoVV lrOHMAM/LmCyd8JrFfv3oLJ1WRwS9MmfGT3jCJUV3HXmmrujt6cPD7VEJk9LjIaH4DTJ 0GeA== 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=h2Pm1baCn9QPU1nZ7/ZH3IZRVj+rZWeoG1IwhGMeY3w=; fh=CnIAPQxUhJ5eUc7O4Aaw6Zjrhq4UtGGbVudgNPFZTl0=; b=xV0vfkj1L2Urrcna0BmB7Bkh4kBv6v/dOzWv0FdlsKk4PMeASktsyjvvSeQaTCLypC v6HXVSJJpJ6N+PQtV4PLP58Yrk2mnsO2dXSdtJjh5F1anLpVLoi48xR6+iG5zYE8OKHW ZHXSibLC/v2Dg589HP0M1XvhZTxlQt9Ec8xBqqq+ouUlsAlNaQwNoFg8VLHYYf9HiXSb YHzwkXiBsa3yCtR58fNIzdPFUjEjJTZieZ6hvB9ItcfMeOvKqkBi39mXys6K2Ie+DpxV RIqw60EvTuyAwOGbIjqTWQN7KfnxzoD5DjCSTEsv1fU1hlzKjKtnCLITEc7Z13/TXn8D 0Psw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=UOQJzgrW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id b30-20020a631b5e000000b005c278ba0fe2si10351290pgm.175.2023.11.27.08.59.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 08:59:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=UOQJzgrW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 3841C80A2678; Mon, 27 Nov 2023 08:59:33 -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 S234536AbjK0Q7T (ORCPT + 99 others); Mon, 27 Nov 2023 11:59:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234388AbjK0Q5x (ORCPT ); Mon, 27 Nov 2023 11:57:53 -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 A0F0F2D65; Mon, 27 Nov 2023 08:55:47 -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 347576607424; Mon, 27 Nov 2023 16:55:45 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1701104145; bh=yBTcY/czjMNBp1trwVXXouYWoMuVcN590O1KG93acxs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UOQJzgrWxwOp2sA7iCF9XxZJq7N4qsbIqJgtBVRCKuSPh1OE50mJTPPDxhGrydikf FVleabN0drV801aIkvUbtkOPgQq7uf/pkN15a57SUTqLoK+DBlpFM/TuG2aTYbj2xU Bvtve6HF3qVwu/VINhnqzHZdv7Lugq/X497ztVoEXSZcCxIla8Hi0qNdPjkCDbRfxp 3qqpAb8DYCF3RWXO3IX5Vzq2OePF18K7FX9em/JKY44U7NDYWdi9iuTIRPfxo+mQX3 8rtiaC6AKCuQ1AchXUGqH6HGGn0ygk0F88LSMKGIPSdj/cxwEEhGp+S1yQEGqRDRck 072VCRCO/IUtA== 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 , Corentin Labbe , mjpeg-users@lists.sourceforge.net Subject: [PATCH 52/55] media: pci: zoran: Use min_dma_buffers_needed field Date: Mon, 27 Nov 2023 17:54:51 +0100 Message-Id: <20231127165454.166373-53-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=-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:59:33 -0800 (PST) zoran 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: Corentin Labbe CC: mjpeg-users@lists.sourceforge.net --- drivers/media/pci/zoran/zoran_driver.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/media/pci/zoran/zoran_driver.c b/drivers/media/pci/zoran/zoran_driver.c index fa672cc8bc67..23ed1fdc03df 100644 --- a/drivers/media/pci/zoran/zoran_driver.c +++ b/drivers/media/pci/zoran/zoran_driver.c @@ -749,9 +749,6 @@ static int zr_vb2_queue_setup(struct vb2_queue *vq, unsigned int *nbuffers, unsi zr->buf_in_reserve = 0; - if (*nbuffers < vq->min_buffers_needed) - *nbuffers = vq->min_buffers_needed; - if (*nplanes) { if (sizes[0] < size) return -EINVAL; @@ -971,7 +968,7 @@ int zoran_queue_init(struct zoran *zr, struct vb2_queue *vq, int dir) vq->mem_ops = &vb2_dma_contig_memops; vq->gfp_flags = GFP_DMA32; vq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; - vq->min_buffers_needed = 9; + vq->min_dma_buffers_needed = 9; vq->lock = &zr->lock; err = vb2_queue_init(vq); if (err) -- 2.39.2