[PATCH 08/55] media: imx7-media-csi: Stop abusing of min_buffers_needed field

From: Benjamin Gaignard
Date: Mon Nov 27 2023 - 11:55:27 EST


'min_buffers_needed' is suppose to be used to indicate the number
of buffers needed by DMA engine to start streaming.
imx7-media-csi driver doesn't use DMA engine and just want to specify
the minimum number of buffers to allocate when calling VIDIOC_REQBUFS.
That 'min_reqbufs_allocation' field purpose so use it.

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@xxxxxxxxxxxxx>
CC: Rui Miguel Silva <rmfrfs@xxxxxxxxx>
CC: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
CC: Martin Kepplinger <martink@xxxxxxxxx>
CC: Purism Kernel Team <kernel@xxxxxxx>
CC: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>
CC: Shawn Guo <shawnguo@xxxxxxxxxx>
CC: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
CC: Pengutronix Kernel Team <kernel@xxxxxxxxxxxxxx>
CC: Fabio Estevam <festevam@xxxxxxxxx>
CC: NXP Linux Team <linux-imx@xxxxxxx>
---
drivers/media/platform/nxp/imx7-media-csi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/nxp/imx7-media-csi.c b/drivers/media/platform/nxp/imx7-media-csi.c
index 1d2464ca59b8..dcc8c54228e4 100644
--- a/drivers/media/platform/nxp/imx7-media-csi.c
+++ b/drivers/media/platform/nxp/imx7-media-csi.c
@@ -1676,7 +1676,7 @@ static int imx7_csi_video_init(struct imx7_csi *csi)
vq->mem_ops = &vb2_dma_contig_memops;
vq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
vq->lock = &csi->vdev_mutex;
- vq->min_buffers_needed = 2;
+ vq->min_reqbufs_allocation = 2;
vq->dev = csi->dev;

ret = vb2_queue_init(vq);
--
2.39.2