diff options
author | Benjamin Gaignard <benjamin.gaignard@collabora.com> | 2024-03-18 14:48:56 +0100 |
---|---|---|
committer | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2024-03-25 12:00:44 +0100 |
commit | f5131d5ce49ef942a3bda5f4a0f6228b1ea40eee (patch) | |
tree | 89fb633804b3840fe600409a538e666d23965557 /drivers/media/test-drivers/vimc | |
parent | media: videobuf2: Add min_reqbufs_allocation field to vb2_queue structure (diff) | |
download | linux-f5131d5ce49ef942a3bda5f4a0f6228b1ea40eee.tar.xz linux-f5131d5ce49ef942a3bda5f4a0f6228b1ea40eee.zip |
media: test-drivers: Set REQBUFS minimum number of buffers
Instead of using 'min_queued_buffers' field to specify the
minimum number of buffers to be allocated when calling REQBUF
use 'min_reqbufs_allocation' field which is dedicated to this
purpose.
Change the minimum requested buffers to 2 for vivid-meta-out
and vivid-touch-cap drivers when creating the queues.
That allows to remove code which prohibe to allocate only
one buffer in their respective queue setup functions.
While at it rename vivid_create_queue() parameter.
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
Reviewed-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'drivers/media/test-drivers/vimc')
-rw-r--r-- | drivers/media/test-drivers/vimc/vimc-capture.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/test-drivers/vimc/vimc-capture.c b/drivers/media/test-drivers/vimc/vimc-capture.c index 2a2d19d23bab..97693561f1e4 100644 --- a/drivers/media/test-drivers/vimc/vimc-capture.c +++ b/drivers/media/test-drivers/vimc/vimc-capture.c @@ -432,7 +432,7 @@ static struct vimc_ent_device *vimc_capture_add(struct vimc_device *vimc, q->mem_ops = vimc_allocator == VIMC_ALLOCATOR_DMA_CONTIG ? &vb2_dma_contig_memops : &vb2_vmalloc_memops; q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; - q->min_queued_buffers = 2; + q->min_reqbufs_allocation = 2; q->lock = &vcapture->lock; q->dev = v4l2_dev->dev; |