@@ -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)
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@collabora.com> CC: Corentin Labbe <clabbe@baylibre.com> CC: mjpeg-users@lists.sourceforge.net --- drivers/media/pci/zoran/zoran_driver.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)