[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231127165454.166373-53-benjamin.gaignard@collabora.com>
Date: Mon, 27 Nov 2023 17:54:51 +0100
From: Benjamin Gaignard <benjamin.gaignard@...labora.com>
To: hverkuil@...all.nl, mchehab@...nel.org, tfiga@...omium.org,
m.szyprowski@...sung.com, matt.ranostay@...sulko.com
Cc: linux-kernel@...r.kernel.org, linux-media@...r.kernel.org,
linux-staging@...ts.linux.dev, kernel@...labora.com,
Benjamin Gaignard <benjamin.gaignard@...labora.com>,
Corentin Labbe <clabbe@...libre.com>,
mjpeg-users@...ts.sourceforge.net
Subject: [PATCH 52/55] media: pci: zoran: Use min_dma_buffers_needed field
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 <benjamin.gaignard@...labora.com>
CC: Corentin Labbe <clabbe@...libre.com>
CC: mjpeg-users@...ts.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
Powered by blists - more mailing lists