[PATCH 54/55] media: meson: vdec: Use min_dma_buffers_needed field
Benjamin Gaignard
benjamin.gaignard at collabora.com
Mon Nov 27 08:54:53 PST 2023
vdec driver use a firmware and comments said that a
minimum number of buffers need 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 at collabora.com>
CC: Neil Armstrong <neil.armstrong at linaro.org>
CC: Kevin Hilman <khilman at baylibre.com>
CC: Jerome Brunet <jbrunet at baylibre.com>
CC: Martin Blumenstingl <martin.blumenstingl at googlemail.com>
CC: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
CC: linux-amlogic at lists.infradead.org
---
drivers/staging/media/meson/vdec/vdec.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/media/meson/vdec/vdec.c b/drivers/staging/media/meson/vdec/vdec.c
index 1e2369f104c8..6c2e3e5c6e6f 100644
--- a/drivers/staging/media/meson/vdec/vdec.c
+++ b/drivers/staging/media/meson/vdec/vdec.c
@@ -184,7 +184,7 @@ static void process_num_buffers(struct vb2_queue *q,
* we need all of them to be queued into the driver
*/
sess->num_dst_bufs = q_num_bufs + *num_buffers;
- q->min_buffers_needed = max(fmt_out->min_buffers, sess->num_dst_bufs);
+ q->min_dma_buffers_needed = max(fmt_out->min_buffers, sess->num_dst_bufs);
}
static int vdec_queue_setup(struct vb2_queue *q, unsigned int *num_buffers,
@@ -825,7 +825,7 @@ static int m2m_queue_init(void *priv, struct vb2_queue *src_vq,
src_vq->mem_ops = &vb2_dma_contig_memops;
src_vq->drv_priv = sess;
src_vq->buf_struct_size = sizeof(struct dummy_buf);
- src_vq->min_buffers_needed = 1;
+ src_vq->min_dma_buffers_needed = 1;
src_vq->dev = sess->core->dev;
src_vq->lock = &sess->lock;
ret = vb2_queue_init(src_vq);
@@ -839,7 +839,7 @@ static int m2m_queue_init(void *priv, struct vb2_queue *src_vq,
dst_vq->mem_ops = &vb2_dma_contig_memops;
dst_vq->drv_priv = sess;
dst_vq->buf_struct_size = sizeof(struct dummy_buf);
- dst_vq->min_buffers_needed = 1;
+ dst_vq->min_dma_buffers_needed = 1;
dst_vq->dev = sess->core->dev;
dst_vq->lock = &sess->lock;
return vb2_queue_init(dst_vq);
--
2.39.2
More information about the linux-amlogic
mailing list