* [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use
@ 2023-11-27 16:53 Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 01/55] videobuf2: Add min_reqbufs_allocation field to vb2_queue structure Benjamin Gaignard
` (54 more replies)
0 siblings, 55 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:53 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard
This series implement Hans's RFC: https://www.spinics.net/lists/linux-media/msg244455.html
To summarize Hans's proposal it is needed to distinguish two cases:
- the minimal number of buffers to be allocated when calling
VIDIOC_REQBUFS.
- the minimale number of buffers to be present before start streaming
(mostly for DMA engine purpose).
Until now drivers use vb2_queue min_buffers_needed field in the both
cases but before introduce delete buffers we need to clarify for which
usage each of them use min_buffers_needed field.
I have done this in 3 steps:
- add min_reqbufs_allocation field and convert all the drivers that I
believe use min_buffers_needed field for VIDIOC_REQBUF purpose.
- add min_dma_buffers_needed field and convert all the drivers with DMA
engine needs.
- remove min_buffers_needed from videobuf2 core.
The branch with all patches is here:
https://gitlab.collabora.com/benjamin.gaignard/for-upstream/-/commits/clean_min_need_buffers_v1
I have tested with this command line, I haven't notice issues:
./test-media -kmemleak mc
Regards,
Benjamin
Benjamin Gaignard (55):
videobuf2: Add min_reqbufs_allocation field to vb2_queue structure
media: test-drivers: Stop abusing of min_buffers_needed field
media: usb: cx231xx: Stop abusing of min_buffers_needed field
media: usb: dvb-usb: cxusb-analog: Stop abusing of min_buffers_needed
field
media: usb: gspca: Stop abusing of min_buffers_needed field
media: atmel: Stop abusing of min_buffers_needed field
media: imx8-isi: Stop abusing of min_buffers_needed field
media: imx7-media-csi: Stop abusing of min_buffers_needed field
media: chips-media: coda: Stop abusing of min_buffers_needed field
media: nuvoton: Stop abusing of min_buffers_needed field
media: sti: hva: Stop abusing of min_buffers_needed field
media: rockchip: rkisp1: Stop abusing of min_buffers_needed field
media: aspeed: Stop abusing of min_buffers_needed field
media: microchip: Stop abusing of min_buffers_needed field
media: amphion: Stop abusing of min_buffers_needed field
media: qcom: venus: Stop abusing of min_buffers_needed field
media: sun4i-csi: Stop abusing of min_buffers_needed field
media: sunxi: sun8i-di: Stop abusing of min_buffers_needed field
media: sun8i-rotate: Stop abusing of min_buffers_needed field
media: sunxi: sun6i-csi: Stop abusing of min_buffers_needed field
media: i2c: video-i2c: Stop abusing of min_buffers_needed field
media: dvb-core: Stop abusing of min_buffers_needed field
media: imx: Stop abusing of min_buffers_needed field
media: atmel: Stop abusing of min_buffers_needed field
media: ipu3: Stop abusing of min_buffers_needed field
media: starfive: Stop abusing of min_buffers_needed field
media: sun6i-isp: Stop abusing of min_buffers_needed field
media: tegra-video: Stop abusing of min_buffers_needed field
media: ti: am437x: Stop abusing of min_buffers_needed field
media: ti: cal: Stop abusing of min_buffers_needed field
media: ti: davinci: Stop abusing of min_buffers_needed field
media: saa7146: Stop abusing of min_buffers_needed field
input: touchscreen: atmel: Stop abusing of min_buffers_needed field
input: touchscreen: sur40: Stop abusing of min_buffers_needed field
videobuf2: core: Add min_dma_buffers_needed field to vb2_queue
media: stm32: stm32-dcmi: Use min_dma_buffers_needed field
media: renesas: Use min_dma_buffers_needed field
media: ti: j721e-csi2rx: Use min_dma_buffers_needed field
media: ti: omap: Use min_dma_buffers_needed field
samples: v4l2: pci: Use min_dma_buffers_needed field
media: pci: intel: ipu3: Use min_dma_buffers_needed field
media: pci: dt3155: Use min_dma_buffers_needed field
media: pci: bt8xx: Use min_dma_buffers_needed field
media: pci: cx18: Use min_dma_buffers_needed field
media: pci: mgb4: Use min_dma_buffers_needed field
media: pci: tw68: Use min_dma_buffers_needed field
media: pci: cx25821: Use min_dma_buffers_needed field
media: pci: tw5864: Use min_dma_buffers_needed field
media: pci: tw686x: Use min_dma_buffers_needed field
media: pci: cx88: Use min_dma_buffers_needed field
media: pci: cx23885: Use min_dma_buffers_needed field
media: pci: zoran: Use min_dma_buffers_needed field
media: pci: cobalt: Use min_dma_buffers_needed field
media: meson: vdec: Use min_dma_buffers_needed field
media: videobuf2: core: Remove 'min_buffers_needed' field
drivers/input/touchscreen/atmel_mxt_ts.c | 2 +-
drivers/input/touchscreen/sur40.c | 2 +-
drivers/media/common/saa7146/saa7146_fops.c | 2 +-
.../media/common/videobuf2/videobuf2-core.c | 26 +++++++++++--------
drivers/media/dvb-core/dvb_vb2.c | 2 +-
drivers/media/i2c/video-i2c.c | 2 +-
drivers/media/pci/bt8xx/bttv-driver.c | 2 +-
drivers/media/pci/cobalt/cobalt-v4l2.c | 2 +-
drivers/media/pci/cx18/cx18-streams.c | 2 +-
drivers/media/pci/cx23885/cx23885-417.c | 2 +-
drivers/media/pci/cx23885/cx23885-dvb.c | 2 +-
drivers/media/pci/cx23885/cx23885-video.c | 4 +--
drivers/media/pci/cx25821/cx25821-video.c | 2 +-
drivers/media/pci/cx88/cx88-blackbird.c | 2 +-
drivers/media/pci/cx88/cx88-dvb.c | 2 +-
drivers/media/pci/cx88/cx88-video.c | 4 +--
drivers/media/pci/dt3155/dt3155.c | 2 +-
drivers/media/pci/intel/ipu3/ipu3-cio2.c | 2 +-
drivers/media/pci/mgb4/mgb4_vin.c | 2 +-
drivers/media/pci/mgb4/mgb4_vout.c | 2 +-
drivers/media/pci/tw5864/tw5864-video.c | 2 +-
drivers/media/pci/tw68/tw68-video.c | 2 +-
drivers/media/pci/tw686x/tw686x-video.c | 2 +-
drivers/media/pci/zoran/zoran_driver.c | 5 +---
drivers/media/platform/amphion/vpu_v4l2.c | 4 +--
drivers/media/platform/aspeed/aspeed-video.c | 2 +-
drivers/media/platform/atmel/atmel-isi.c | 2 +-
.../platform/chips-media/coda/coda-common.c | 2 +-
.../platform/microchip/microchip-isc-base.c | 2 +-
drivers/media/platform/nuvoton/npcm-video.c | 2 +-
drivers/media/platform/nxp/imx7-media-csi.c | 2 +-
.../platform/nxp/imx8-isi/imx8-isi-video.c | 2 +-
drivers/media/platform/qcom/venus/vdec.c | 4 +--
drivers/media/platform/qcom/venus/venc.c | 4 +--
.../platform/renesas/rcar-vin/rcar-dma.c | 2 +-
drivers/media/platform/renesas/renesas-ceu.c | 2 +-
.../platform/renesas/rzg2l-cru/rzg2l-video.c | 2 +-
drivers/media/platform/renesas/sh_vou.c | 2 +-
.../platform/rockchip/rkisp1/rkisp1-capture.c | 2 +-
drivers/media/platform/st/sti/hva/hva-v4l2.c | 4 +--
drivers/media/platform/st/stm32/stm32-dcmi.c | 2 +-
.../platform/sunxi/sun4i-csi/sun4i_dma.c | 2 +-
.../sunxi/sun6i-csi/sun6i_csi_capture.c | 2 +-
.../media/platform/sunxi/sun8i-di/sun8i-di.c | 4 +--
.../sunxi/sun8i-rotate/sun8i_rotate.c | 4 +--
.../media/platform/ti/am437x/am437x-vpfe.c | 2 +-
drivers/media/platform/ti/cal/cal-video.c | 2 +-
.../media/platform/ti/davinci/vpif_capture.c | 2 +-
.../media/platform/ti/davinci/vpif_display.c | 2 +-
.../platform/ti/j721e-csi2rx/j721e-csi2rx.c | 2 +-
drivers/media/platform/ti/omap/omap_vout.c | 2 +-
.../media/test-drivers/vimc/vimc-capture.c | 2 +-
drivers/media/test-drivers/vivid/vivid-core.c | 4 +--
drivers/media/usb/cx231xx/cx231xx-417.c | 2 +-
drivers/media/usb/cx231xx/cx231xx-video.c | 4 +--
drivers/media/usb/dvb-usb/cxusb-analog.c | 2 +-
drivers/media/usb/gspca/gspca.c | 6 ++---
.../media/deprecated/atmel/atmel-isc-base.c | 2 +-
drivers/staging/media/imx/imx-media-capture.c | 2 +-
drivers/staging/media/ipu3/ipu3-v4l2.c | 2 +-
drivers/staging/media/meson/vdec/vdec.c | 6 ++---
.../staging/media/starfive/camss/stf-video.c | 2 +-
.../media/sunxi/sun6i-isp/sun6i_isp_capture.c | 2 +-
.../media/sunxi/sun6i-isp/sun6i_isp_params.c | 2 +-
drivers/staging/media/tegra-video/vi.c | 2 +-
include/media/videobuf2-core.h | 10 +++++--
samples/v4l/v4l2-pci-skeleton.c | 2 +-
67 files changed, 102 insertions(+), 95 deletions(-)
--
2.39.2
^ permalink raw reply [flat|nested] 75+ messages in thread
* [PATCH 01/55] videobuf2: Add min_reqbufs_allocation field to vb2_queue structure
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 02/55] media: test-drivers: Stop abusing of min_buffers_needed field Benjamin Gaignard
` (53 subsequent siblings)
54 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard
Add 'min_reqbufs_allocation' field in vb2_queue structure so drivers
can specificy the minimum number of buffers to allocate when calling
VIDIOC_REQBUFS.
Later that will help to distinguish the minimum number of buffers
needed to start streaming versus the minimum allocation requirement.
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
---
drivers/media/common/videobuf2/videobuf2-core.c | 1 +
include/media/videobuf2-core.h | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/drivers/media/common/videobuf2/videobuf2-core.c b/drivers/media/common/videobuf2/videobuf2-core.c
index 8c1df829745b..c224d13b3105 100644
--- a/drivers/media/common/videobuf2/videobuf2-core.c
+++ b/drivers/media/common/videobuf2/videobuf2-core.c
@@ -866,6 +866,7 @@ int vb2_core_reqbufs(struct vb2_queue *q, enum vb2_memory memory,
* Make sure the requested values and current defaults are sane.
*/
num_buffers = max_t(unsigned int, *count, q->min_buffers_needed);
+ num_buffers = max_t(unsigned int, num_buffers, q->min_reqbufs_allocation);
num_buffers = min_t(unsigned int, num_buffers, q->max_num_buffers);
memset(q->alloc_devs, 0, sizeof(q->alloc_devs));
/*
diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h
index 5557d78b6f20..17cacd696ab4 100644
--- a/include/media/videobuf2-core.h
+++ b/include/media/videobuf2-core.h
@@ -550,6 +550,9 @@ struct vb2_buf_ops {
* @start_streaming can be called. Used when a DMA engine
* cannot be started unless at least this number of buffers
* have been queued into the driver.
+ * @min_reqbufs_allocation: the minimum number of buffers allocated when
+ * calling VIDIOC_REQBUFS. Used when drivers need a to
+ * specify a minimum buffers allocation before setup a queue.
*/
/*
* Private elements (won't appear at the uAPI book):
@@ -615,6 +618,7 @@ struct vb2_queue {
u32 timestamp_flags;
gfp_t gfp_flags;
u32 min_buffers_needed;
+ u32 min_reqbufs_allocation;
struct device *alloc_devs[VB2_MAX_PLANES];
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 02/55] media: test-drivers: Stop abusing of min_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 01/55] videobuf2: Add min_reqbufs_allocation field to vb2_queue structure Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 17:00 ` Shuah Khan
2023-11-27 16:54 ` [PATCH 03/55] media: usb: cx231xx: " Benjamin Gaignard
` (52 subsequent siblings)
54 siblings, 1 reply; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard, Shuah Khan, Kieran Bingham
'min_buffers_needed' is suppose to be used to indicate the number
of buffers needed by DMA engine to start streaming.
Obvious test-drivers don'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.
While at it rename function parameter.
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
CC: Shuah Khan <skhan@linuxfoundation.org>
CC: Kieran Bingham <kieran.bingham@ideasonboard.com>
---
drivers/media/test-drivers/vimc/vimc-capture.c | 2 +-
drivers/media/test-drivers/vivid/vivid-core.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/media/test-drivers/vimc/vimc-capture.c b/drivers/media/test-drivers/vimc/vimc-capture.c
index aa944270e716..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_buffers_needed = 2;
+ q->min_reqbufs_allocation = 2;
q->lock = &vcapture->lock;
q->dev = v4l2_dev->dev;
diff --git a/drivers/media/test-drivers/vivid/vivid-core.c b/drivers/media/test-drivers/vivid/vivid-core.c
index 353f035fcd19..b4e888ac6016 100644
--- a/drivers/media/test-drivers/vivid/vivid-core.c
+++ b/drivers/media/test-drivers/vivid/vivid-core.c
@@ -861,7 +861,7 @@ static const struct media_device_ops vivid_media_ops = {
static int vivid_create_queue(struct vivid_dev *dev,
struct vb2_queue *q,
u32 buf_type,
- unsigned int min_buffers_needed,
+ unsigned int min_reqbufs_allocation,
const struct vb2_ops *ops)
{
if (buf_type == V4L2_BUF_TYPE_VIDEO_CAPTURE && dev->multiplanar)
@@ -898,7 +898,7 @@ static int vivid_create_queue(struct vivid_dev *dev,
q->mem_ops = allocators[dev->inst] == 1 ? &vb2_dma_contig_memops :
&vb2_vmalloc_memops;
q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
- q->min_buffers_needed = supports_requests[dev->inst] ? 0 : min_buffers_needed;
+ q->min_reqbufs_allocation = supports_requests[dev->inst] ? 0 : min_reqbufs_allocation;
q->lock = &dev->mutex;
q->dev = dev->v4l2_dev.dev;
q->supports_requests = supports_requests[dev->inst];
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 03/55] media: usb: cx231xx: Stop abusing of min_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 01/55] videobuf2: Add min_reqbufs_allocation field to vb2_queue structure Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 02/55] media: test-drivers: Stop abusing of min_buffers_needed field Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-28 10:18 ` Hans Verkuil
2023-11-27 16:54 ` [PATCH 04/55] media: usb: dvb-usb: cxusb-analog: " Benjamin Gaignard
` (51 subsequent siblings)
54 siblings, 1 reply; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard
'min_buffers_needed' is suppose to be used to indicate the number
of buffers needed by DMA engine to start streaming.
cx231xx 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@collabora.com>
---
drivers/media/usb/cx231xx/cx231xx-417.c | 2 +-
drivers/media/usb/cx231xx/cx231xx-video.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/media/usb/cx231xx/cx231xx-417.c b/drivers/media/usb/cx231xx/cx231xx-417.c
index 45973fe690b2..66043ed50c8e 100644
--- a/drivers/media/usb/cx231xx/cx231xx-417.c
+++ b/drivers/media/usb/cx231xx/cx231xx-417.c
@@ -1782,7 +1782,7 @@ int cx231xx_417_register(struct cx231xx *dev)
q->ops = &cx231xx_video_qops;
q->mem_ops = &vb2_vmalloc_memops;
q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
- q->min_buffers_needed = 1;
+ q->min_reqbufs_allocation = 1;
q->lock = &dev->lock;
err = vb2_queue_init(q);
if (err)
diff --git a/drivers/media/usb/cx231xx/cx231xx-video.c b/drivers/media/usb/cx231xx/cx231xx-video.c
index c8eb4222319d..df572c466bfb 100644
--- a/drivers/media/usb/cx231xx/cx231xx-video.c
+++ b/drivers/media/usb/cx231xx/cx231xx-video.c
@@ -1811,7 +1811,7 @@ int cx231xx_register_analog_devices(struct cx231xx *dev)
q->ops = &cx231xx_video_qops;
q->mem_ops = &vb2_vmalloc_memops;
q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
- q->min_buffers_needed = 1;
+ q->min_reqbufs_allocation = 1;
q->lock = &dev->lock;
ret = vb2_queue_init(q);
if (ret)
@@ -1871,7 +1871,7 @@ int cx231xx_register_analog_devices(struct cx231xx *dev)
q->ops = &cx231xx_vbi_qops;
q->mem_ops = &vb2_vmalloc_memops;
q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
- q->min_buffers_needed = 1;
+ q->min_reqbufs_allocation = 1;
q->lock = &dev->lock;
ret = vb2_queue_init(q);
if (ret)
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 04/55] media: usb: dvb-usb: cxusb-analog: Stop abusing of min_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (2 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 03/55] media: usb: cx231xx: " Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 05/55] media: usb: gspca: " Benjamin Gaignard
` (50 subsequent siblings)
54 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard, Michael Krufky
'min_buffers_needed' is suppose to be used to indicate the number
of buffers needed by DMA engine to start streaming.
cxusb-analog 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@collabora.com>
CC: Michael Krufky <mkrufky@linuxtv.org>
---
drivers/media/usb/dvb-usb/cxusb-analog.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/usb/dvb-usb/cxusb-analog.c b/drivers/media/usb/dvb-usb/cxusb-analog.c
index deba5224cb8d..a038d97dd62e 100644
--- a/drivers/media/usb/dvb-usb/cxusb-analog.c
+++ b/drivers/media/usb/dvb-usb/cxusb-analog.c
@@ -1632,7 +1632,7 @@ static int cxusb_medion_register_analog_video(struct dvb_usb_device *dvbdev)
cxdev->videoqueue.buf_struct_size =
sizeof(struct cxusb_medion_vbuffer);
cxdev->videoqueue.timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
- cxdev->videoqueue.min_buffers_needed = 6;
+ cxdev->videoqueue.min_reqbufs_allocation = 6;
cxdev->videoqueue.lock = &cxdev->dev_lock;
ret = vb2_queue_init(&cxdev->videoqueue);
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 05/55] media: usb: gspca: Stop abusing of min_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (3 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 04/55] media: usb: dvb-usb: cxusb-analog: " Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 06/55] media: atmel: " Benjamin Gaignard
` (49 subsequent siblings)
54 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard
'min_buffers_needed' is suppose to be used to indicate the number
of buffers needed by DMA engine to start streaming.
gspca 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@collabora.com>
---
drivers/media/usb/gspca/gspca.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/media/usb/gspca/gspca.c b/drivers/media/usb/gspca/gspca.c
index 770714c34295..7b701275f76d 100644
--- a/drivers/media/usb/gspca/gspca.c
+++ b/drivers/media/usb/gspca/gspca.c
@@ -1257,7 +1257,7 @@ static int vidioc_g_parm(struct file *filp, void *priv,
{
struct gspca_dev *gspca_dev = video_drvdata(filp);
- parm->parm.capture.readbuffers = gspca_dev->queue.min_buffers_needed;
+ parm->parm.capture.readbuffers = gspca_dev->queue.min_reqbufs_allocation;
if (!gspca_dev->sd_desc->get_streamparm)
return 0;
@@ -1273,7 +1273,7 @@ static int vidioc_s_parm(struct file *filp, void *priv,
{
struct gspca_dev *gspca_dev = video_drvdata(filp);
- parm->parm.capture.readbuffers = gspca_dev->queue.min_buffers_needed;
+ parm->parm.capture.readbuffers = gspca_dev->queue.min_reqbufs_allocation;
if (!gspca_dev->sd_desc->set_streamparm) {
parm->parm.capture.capability = 0;
@@ -1517,7 +1517,7 @@ int gspca_dev_probe2(struct usb_interface *intf,
q->ops = &gspca_qops;
q->mem_ops = &vb2_vmalloc_memops;
q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
- q->min_buffers_needed = 2;
+ q->min_reqbufs_allocation = 2;
q->lock = &gspca_dev->usb_lock;
ret = vb2_queue_init(q);
if (ret)
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 06/55] media: atmel: Stop abusing of min_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (4 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 05/55] media: usb: gspca: " Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 07/55] media: imx8-isi: " Benjamin Gaignard
` (48 subsequent siblings)
54 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard, Eugen Hristev, Nicolas Ferre,
Alexandre Belloni, Claudiu Beznea
'min_buffers_needed' is suppose to be used to indicate the number
of buffers needed by DMA engine to start streaming.
atmel-isi 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@collabora.com>
CC: Eugen Hristev <eugen.hristev@collabora.com>
CC: Mauro Carvalho Chehab <mchehab@kernel.org>
CC: Nicolas Ferre <nicolas.ferre@microchip.com>
CC: Alexandre Belloni <alexandre.belloni@bootlin.com>
CC: Claudiu Beznea <claudiu.beznea@tuxon.dev>
---
drivers/media/platform/atmel/atmel-isi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/atmel/atmel-isi.c b/drivers/media/platform/atmel/atmel-isi.c
index da58f33b6b0a..9c156771568a 100644
--- a/drivers/media/platform/atmel/atmel-isi.c
+++ b/drivers/media/platform/atmel/atmel-isi.c
@@ -1244,7 +1244,7 @@ static int atmel_isi_probe(struct platform_device *pdev)
q->ops = &isi_video_qops;
q->mem_ops = &vb2_dma_contig_memops;
q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
- q->min_buffers_needed = 2;
+ q->min_reqbufs_allocation = 2;
q->dev = &pdev->dev;
ret = vb2_queue_init(q);
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 07/55] media: imx8-isi: Stop abusing of min_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (5 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 06/55] media: atmel: " Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 17:07 ` Laurent Pinchart
2023-11-27 16:54 ` [PATCH 08/55] media: imx7-media-csi: " Benjamin Gaignard
` (47 subsequent siblings)
54 siblings, 1 reply; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard, Laurent Pinchart, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team
'min_buffers_needed' is suppose to be used to indicate the number
of buffers needed by DMA engine to start streaming.
imx8-isi 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@collabora.com>
CC: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
CC: Mauro Carvalho Chehab <mchehab@kernel.org>
CC: Shawn Guo <shawnguo@kernel.org>
CC: Sascha Hauer <s.hauer@pengutronix.de>
CC: Pengutronix Kernel Team <kernel@pengutronix.de>
CC: Fabio Estevam <festevam@gmail.com>
CC: NXP Linux Team <linux-imx@nxp.com>
---
drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
index 49bca2b01cc6..81673ff9084b 100644
--- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
+++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
@@ -1453,7 +1453,7 @@ int mxc_isi_video_register(struct mxc_isi_pipe *pipe,
q->mem_ops = &vb2_dma_contig_memops;
q->buf_struct_size = sizeof(struct mxc_isi_buffer);
q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
- q->min_buffers_needed = 2;
+ q->min_reqbufs_allocation = 2;
q->lock = &video->lock;
q->dev = pipe->isi->dev;
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 08/55] media: imx7-media-csi: Stop abusing of min_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (6 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 07/55] media: imx8-isi: " Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 09/55] media: chips-media: coda: " Benjamin Gaignard
` (46 subsequent siblings)
54 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard, Rui Miguel Silva, Laurent Pinchart,
Martin Kepplinger, Purism Kernel Team, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team
'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@collabora.com>
CC: Rui Miguel Silva <rmfrfs@gmail.com>
CC: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
CC: Martin Kepplinger <martink@posteo.de>
CC: Purism Kernel Team <kernel@puri.sm>
CC: Mauro Carvalho Chehab <mchehab@kernel.org>
CC: Shawn Guo <shawnguo@kernel.org>
CC: Sascha Hauer <s.hauer@pengutronix.de>
CC: Pengutronix Kernel Team <kernel@pengutronix.de>
CC: Fabio Estevam <festevam@gmail.com>
CC: NXP Linux Team <linux-imx@nxp.com>
---
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
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 09/55] media: chips-media: coda: Stop abusing of min_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (7 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 08/55] media: imx7-media-csi: " Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 10/55] media: nuvoton: " Benjamin Gaignard
` (45 subsequent siblings)
54 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard, Philipp Zabel
'min_buffers_needed' is suppose to be used to indicate the number
of buffers needed by DMA engine to start streaming.
code 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@collabora.com>
CC: Philipp Zabel <p.zabel@pengutronix.de>
---
drivers/media/platform/chips-media/coda/coda-common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/chips-media/coda/coda-common.c b/drivers/media/platform/chips-media/coda/coda-common.c
index f1d85758f6dd..2b535a31e017 100644
--- a/drivers/media/platform/chips-media/coda/coda-common.c
+++ b/drivers/media/platform/chips-media/coda/coda-common.c
@@ -2546,7 +2546,7 @@ static int coda_queue_init(struct coda_ctx *ctx, struct vb2_queue *vq)
* would need to be reflected in job_ready(). Currently we expect all
* queues to have at least one buffer queued.
*/
- vq->min_buffers_needed = 1;
+ vq->min_reqbufs_allocation = 1;
vq->dev = ctx->dev->dev;
return vb2_queue_init(vq);
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 10/55] media: nuvoton: Stop abusing of min_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (8 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 09/55] media: chips-media: coda: " Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 11/55] media: sti: hva: " Benjamin Gaignard
` (44 subsequent siblings)
54 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard, Joseph Liu, Marvin Lin, openbmc
'min_buffers_needed' is suppose to be used to indicate the number
of buffers needed by DMA engine to start streaming.
nuvoton 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@collabora.com>
CC: Joseph Liu <kwliu@nuvoton.com>
CC: Marvin Lin <kflin@nuvoton.com>
CC: openbmc@lists.ozlabs.org
---
drivers/media/platform/nuvoton/npcm-video.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/nuvoton/npcm-video.c b/drivers/media/platform/nuvoton/npcm-video.c
index 267e301f2b26..6c122508be1d 100644
--- a/drivers/media/platform/nuvoton/npcm-video.c
+++ b/drivers/media/platform/nuvoton/npcm-video.c
@@ -1612,7 +1612,7 @@ static int npcm_video_setup_video(struct npcm_video *video)
vbq->drv_priv = video;
vbq->buf_struct_size = sizeof(struct npcm_video_buffer);
vbq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
- vbq->min_buffers_needed = 3;
+ vbq->min_reqbufs_allocation = 3;
rc = vb2_queue_init(vbq);
if (rc) {
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 11/55] media: sti: hva: Stop abusing of min_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (9 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 10/55] media: nuvoton: " Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 12/55] media: rockchip: rkisp1: " Benjamin Gaignard
` (43 subsequent siblings)
54 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard, Jean-Christophe Trotin
'min_buffers_needed' is suppose to be used to indicate the number
of buffers needed by DMA engine to start streaming.
hva 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@collabora.com>
CC: Jean-Christophe Trotin <jean-christophe.trotin@foss.st.com>
---
drivers/media/platform/st/sti/hva/hva-v4l2.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/platform/st/sti/hva/hva-v4l2.c b/drivers/media/platform/st/sti/hva/hva-v4l2.c
index cfe83e9dc01b..d7bc25b0d69e 100644
--- a/drivers/media/platform/st/sti/hva/hva-v4l2.c
+++ b/drivers/media/platform/st/sti/hva/hva-v4l2.c
@@ -1142,7 +1142,7 @@ static int hva_queue_init(void *priv, struct vb2_queue *src_vq,
src_vq->type = V4L2_BUF_TYPE_VIDEO_OUTPUT;
src_vq->buf_struct_size = sizeof(struct hva_frame);
- src_vq->min_buffers_needed = MIN_FRAMES;
+ src_vq->min_reqbufs_allocation = MIN_FRAMES;
src_vq->dev = ctx->hva_dev->dev;
ret = queue_init(ctx, src_vq);
@@ -1151,7 +1151,7 @@ static int hva_queue_init(void *priv, struct vb2_queue *src_vq,
dst_vq->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
dst_vq->buf_struct_size = sizeof(struct hva_stream);
- dst_vq->min_buffers_needed = MIN_STREAMS;
+ dst_vq->min_reqbufs_allocation = MIN_STREAMS;
dst_vq->dev = ctx->hva_dev->dev;
return queue_init(ctx, dst_vq);
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 12/55] media: rockchip: rkisp1: Stop abusing of min_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (10 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 11/55] media: sti: hva: " Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 13/55] media: aspeed: " Benjamin Gaignard
` (42 subsequent siblings)
54 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard, Dafna Hirschfeld, Laurent Pinchart,
linux-rockchip
'min_buffers_needed' is suppose to be used to indicate the number
of buffers needed by DMA engine to start streaming.
rkisp1 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@collabora.com>
CC: Dafna Hirschfeld <dafna@fastmail.com> (maintainer:ROCKCHIP ISP V1 DRIVER)
CC: Laurent Pinchart <laurent.pinchart@ideasonboard.com> (maintainer:ROCKCHIP ISP V1 DRIVER)
CC: linux-rockchip@lists.infradead.org (open list:ROCKCHIP ISP V1 DRIVER)
---
drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c
index c6d7e01c8949..de3d89b1fac7 100644
--- a/drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c
+++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c
@@ -1431,7 +1431,7 @@ static int rkisp1_register_capture(struct rkisp1_capture *cap)
q->ops = &rkisp1_vb2_ops;
q->mem_ops = &vb2_dma_contig_memops;
q->buf_struct_size = sizeof(struct rkisp1_buffer);
- q->min_buffers_needed = RKISP1_MIN_BUFFERS_NEEDED;
+ q->min_reqbufs_allocation = RKISP1_MIN_BUFFERS_NEEDED;
q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
q->lock = &node->vlock;
q->dev = cap->rkisp1->dev;
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 13/55] media: aspeed: Stop abusing of min_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (11 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 12/55] media: rockchip: rkisp1: " Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 19:26 ` Eddie James
2023-11-27 16:54 ` [PATCH 14/55] media: microchip: " Benjamin Gaignard
` (41 subsequent siblings)
54 siblings, 1 reply; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard, Eddie James, Joel Stanley, Andrew Jeffery,
openbmc, linux-aspeed
'min_buffers_needed' is suppose to be used to indicate the number
of buffers needed by DMA engine to start streaming.
aspeed 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@collabora.com>
CC: Eddie James <eajames@linux.ibm.com> (maintainer:ASPEED VIDEO ENGINE DRIVER)
CC: Joel Stanley <joel@jms.id.au> (supporter:ARM/ASPEED MACHINE SUPPORT)
CC: Andrew Jeffery <andrew@codeconstruct.com.au> (reviewer:ARM/ASPEED MACHINE SUPPORT)
CC: openbmc@lists.ozlabs.org (moderated list:ASPEED VIDEO ENGINE DRIVER)
CC: linux-aspeed@lists.ozlabs.org (moderated list:ARM/ASPEED MACHINE SUPPORT)
---
drivers/media/platform/aspeed/aspeed-video.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/aspeed/aspeed-video.c b/drivers/media/platform/aspeed/aspeed-video.c
index d08aa7f73d4f..c28b10808cda 100644
--- a/drivers/media/platform/aspeed/aspeed-video.c
+++ b/drivers/media/platform/aspeed/aspeed-video.c
@@ -2034,7 +2034,7 @@ static int aspeed_video_setup_video(struct aspeed_video *video)
vbq->drv_priv = video;
vbq->buf_struct_size = sizeof(struct aspeed_video_buffer);
vbq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
- vbq->min_buffers_needed = ASPEED_VIDEO_V4L2_MIN_BUF_REQ;
+ vbq->min_reqbufs_allocation = ASPEED_VIDEO_V4L2_MIN_BUF_REQ;
rc = vb2_queue_init(vbq);
if (rc) {
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 14/55] media: microchip: Stop abusing of min_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (12 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 13/55] media: aspeed: " Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 15/55] media: amphion: " Benjamin Gaignard
` (40 subsequent siblings)
54 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard, Eugen Hristev
'min_buffers_needed' is suppose to be used to indicate the number
of buffers needed by DMA engine to start streaming.
microchip 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@collabora.com>
CC: Eugen Hristev <eugen.hristev@collabora.com>
---
drivers/media/platform/microchip/microchip-isc-base.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/microchip/microchip-isc-base.c b/drivers/media/platform/microchip/microchip-isc-base.c
index 3fba0e2844b6..9bed33aaf36f 100644
--- a/drivers/media/platform/microchip/microchip-isc-base.c
+++ b/drivers/media/platform/microchip/microchip-isc-base.c
@@ -1821,7 +1821,7 @@ static int isc_async_complete(struct v4l2_async_notifier *notifier)
q->mem_ops = &vb2_dma_contig_memops;
q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
q->lock = &isc->lock;
- q->min_buffers_needed = 1;
+ q->min_reqbufs_allocation = 1;
q->dev = isc->dev;
ret = vb2_queue_init(q);
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 15/55] media: amphion: Stop abusing of min_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (13 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 14/55] media: microchip: " Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 16/55] media: qcom: venus: " Benjamin Gaignard
` (39 subsequent siblings)
54 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard, Ming Qian, Zhou Peng
'min_buffers_needed' is suppose to be used to indicate the number
of buffers needed by DMA engine to start streaming.
amphion 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@collabora.com>
CC: Ming Qian <ming.qian@nxp.com>
CC: Zhou Peng <eagle.zhou@nxp.com>
---
drivers/media/platform/amphion/vpu_v4l2.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/platform/amphion/vpu_v4l2.c b/drivers/media/platform/amphion/vpu_v4l2.c
index 87afb4a18d5d..1e4c76032d2b 100644
--- a/drivers/media/platform/amphion/vpu_v4l2.c
+++ b/drivers/media/platform/amphion/vpu_v4l2.c
@@ -649,7 +649,7 @@ static int vpu_m2m_queue_init(void *priv, struct vb2_queue *src_vq, struct vb2_q
src_vq->mem_ops = &vb2_vmalloc_memops;
src_vq->drv_priv = inst;
src_vq->buf_struct_size = sizeof(struct vpu_vb2_buffer);
- src_vq->min_buffers_needed = 1;
+ src_vq->min_reqbufs_allocation = 1;
src_vq->dev = inst->vpu->dev;
src_vq->lock = &inst->lock;
ret = vb2_queue_init(src_vq);
@@ -666,7 +666,7 @@ static int vpu_m2m_queue_init(void *priv, struct vb2_queue *src_vq, struct vb2_q
dst_vq->mem_ops = &vb2_vmalloc_memops;
dst_vq->drv_priv = inst;
dst_vq->buf_struct_size = sizeof(struct vpu_vb2_buffer);
- dst_vq->min_buffers_needed = 1;
+ dst_vq->min_reqbufs_allocation = 1;
dst_vq->dev = inst->vpu->dev;
dst_vq->lock = &inst->lock;
ret = vb2_queue_init(dst_vq);
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 16/55] media: qcom: venus: Stop abusing of min_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (14 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 15/55] media: amphion: " Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-28 10:26 ` Hans Verkuil
2023-11-27 16:54 ` [PATCH 17/55] media: sun4i-csi: " Benjamin Gaignard
` (38 subsequent siblings)
54 siblings, 1 reply; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard, Stanimir Varbanov, Vikash Garodia,
Bryan O'Donoghue, Andy Gross, Bjorn Andersson, Konrad Dybcio,
linux-arm-msm
'min_buffers_needed' is suppose to be used to indicate the number
of buffers needed by DMA engine to start streaming.
venus 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@collabora.com>
CC: Stanimir Varbanov <stanimir.k.varbanov@gmail.com> (maintainer:QUALCOMM VENUS VIDEO ACCELERATOR DRIVER)
CC: Vikash Garodia <quic_vgarodia@quicinc.com> (maintainer:QUALCOMM VENUS VIDEO ACCELERATOR DRIVER)
CC: "Bryan O'Donoghue" <bryan.odonoghue@linaro.org> (reviewer:QUALCOMM VENUS VIDEO ACCELERATOR DRIVER)
CC: Andy Gross <agross@kernel.org> (maintainer:ARM/QUALCOMM SUPPORT)
CC: Bjorn Andersson <andersson@kernel.org> (maintainer:ARM/QUALCOMM SUPPORT)
CC: Konrad Dybcio <konrad.dybcio@linaro.org> (maintainer:ARM/QUALCOMM SUPPORT)
CC: linux-arm-msm@vger.kernel.org
---
drivers/media/platform/qcom/venus/vdec.c | 4 ++--
drivers/media/platform/qcom/venus/venc.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c
index dbf305cec120..16b8d0dde10d 100644
--- a/drivers/media/platform/qcom/venus/vdec.c
+++ b/drivers/media/platform/qcom/venus/vdec.c
@@ -1641,7 +1641,7 @@ static int m2m_queue_init(void *priv, struct vb2_queue *src_vq,
src_vq->drv_priv = inst;
src_vq->buf_struct_size = sizeof(struct venus_buffer);
src_vq->allow_zero_bytesused = 1;
- src_vq->min_buffers_needed = 0;
+ src_vq->min_reqbufs_allocation = 0;
src_vq->dev = inst->core->dev;
src_vq->lock = &inst->ctx_q_lock;
ret = vb2_queue_init(src_vq);
@@ -1656,7 +1656,7 @@ static int m2m_queue_init(void *priv, struct vb2_queue *src_vq,
dst_vq->drv_priv = inst;
dst_vq->buf_struct_size = sizeof(struct venus_buffer);
dst_vq->allow_zero_bytesused = 1;
- dst_vq->min_buffers_needed = 0;
+ dst_vq->min_reqbufs_allocation = 0;
dst_vq->dev = inst->core->dev;
dst_vq->lock = &inst->ctx_q_lock;
return vb2_queue_init(dst_vq);
diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c
index 44b13696cf82..e399d01c208c 100644
--- a/drivers/media/platform/qcom/venus/venc.c
+++ b/drivers/media/platform/qcom/venus/venc.c
@@ -1398,7 +1398,7 @@ static int m2m_queue_init(void *priv, struct vb2_queue *src_vq,
src_vq->drv_priv = inst;
src_vq->buf_struct_size = sizeof(struct venus_buffer);
src_vq->allow_zero_bytesused = 1;
- src_vq->min_buffers_needed = 1;
+ src_vq->min_reqbufs_allocation = 1;
src_vq->dev = inst->core->dev;
src_vq->lock = &inst->ctx_q_lock;
if (inst->core->res->hfi_version == HFI_VERSION_1XX)
@@ -1415,7 +1415,7 @@ static int m2m_queue_init(void *priv, struct vb2_queue *src_vq,
dst_vq->drv_priv = inst;
dst_vq->buf_struct_size = sizeof(struct venus_buffer);
dst_vq->allow_zero_bytesused = 1;
- dst_vq->min_buffers_needed = 1;
+ dst_vq->min_reqbufs_allocation = 1;
dst_vq->dev = inst->core->dev;
dst_vq->lock = &inst->ctx_q_lock;
return vb2_queue_init(dst_vq);
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 17/55] media: sun4i-csi: Stop abusing of min_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (15 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 16/55] media: qcom: venus: " Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 18/55] media: sunxi: sun8i-di: " Benjamin Gaignard
` (37 subsequent siblings)
54 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland
'min_buffers_needed' is suppose to be used to indicate the number
of buffers needed by DMA engine to start streaming.
sun4i-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@collabora.com>
CC: Chen-Yu Tsai <wens@csie.org>
CC: Jernej Skrabec <jernej.skrabec@gmail.com>
CC: Samuel Holland <samuel@sholland.org>
---
drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c b/drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c
index 95b5633b7914..8f071cba2d25 100644
--- a/drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c
+++ b/drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c
@@ -411,7 +411,7 @@ int sun4i_csi_dma_register(struct sun4i_csi *csi, int irq)
for (i = 0; i < CSI_MAX_BUFFER; i++)
csi->current_buf[i] = NULL;
- q->min_buffers_needed = 3;
+ q->min_reqbufs_allocation = 3;
q->type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
q->io_modes = VB2_MMAP | VB2_DMABUF;
q->lock = &csi->lock;
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 18/55] media: sunxi: sun8i-di: Stop abusing of min_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (16 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 17/55] media: sun4i-csi: " Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 19/55] media: sun8i-rotate: " Benjamin Gaignard
` (36 subsequent siblings)
54 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard, Chen-Yu Tsai, Samuel Holland
'min_buffers_needed' is suppose to be used to indicate the number
of buffers needed by DMA engine to start streaming.
sun8i-di 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@collabora.com>
CC: Chen-Yu Tsai <wens@csie.org>
CC: Samuel Holland <samuel@sholland.org>
---
drivers/media/platform/sunxi/sun8i-di/sun8i-di.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/platform/sunxi/sun8i-di/sun8i-di.c b/drivers/media/platform/sunxi/sun8i-di/sun8i-di.c
index 90ab1d77b6a5..d0f4f1f98bf0 100644
--- a/drivers/media/platform/sunxi/sun8i-di/sun8i-di.c
+++ b/drivers/media/platform/sunxi/sun8i-di/sun8i-di.c
@@ -673,7 +673,7 @@ static int deinterlace_queue_init(void *priv, struct vb2_queue *src_vq,
src_vq->io_modes = VB2_MMAP | VB2_DMABUF;
src_vq->drv_priv = ctx;
src_vq->buf_struct_size = sizeof(struct v4l2_m2m_buffer);
- src_vq->min_buffers_needed = 1;
+ src_vq->min_reqbufs_allocation = 1;
src_vq->ops = &deinterlace_qops;
src_vq->mem_ops = &vb2_dma_contig_memops;
src_vq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY;
@@ -688,7 +688,7 @@ static int deinterlace_queue_init(void *priv, struct vb2_queue *src_vq,
dst_vq->io_modes = VB2_MMAP | VB2_DMABUF;
dst_vq->drv_priv = ctx;
dst_vq->buf_struct_size = sizeof(struct v4l2_m2m_buffer);
- dst_vq->min_buffers_needed = 2;
+ dst_vq->min_reqbufs_allocation = 2;
dst_vq->ops = &deinterlace_qops;
dst_vq->mem_ops = &vb2_dma_contig_memops;
dst_vq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY;
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 19/55] media: sun8i-rotate: Stop abusing of min_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (17 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 18/55] media: sunxi: sun8i-di: " Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 20/55] media: sunxi: sun6i-csi: " Benjamin Gaignard
` (35 subsequent siblings)
54 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard, Chen-Yu Tsai, Samuel Holland
'min_buffers_needed' is suppose to be used to indicate the number
of buffers needed by DMA engine to start streaming.
sun8i-rotate 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@collabora.com>
CC: Chen-Yu Tsai <wens@csie.org>
CC: Samuel Holland <samuel@sholland.org>
---
drivers/media/platform/sunxi/sun8i-rotate/sun8i_rotate.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/platform/sunxi/sun8i-rotate/sun8i_rotate.c b/drivers/media/platform/sunxi/sun8i-rotate/sun8i_rotate.c
index 0b025ec91826..14cd0afd7c6a 100644
--- a/drivers/media/platform/sunxi/sun8i-rotate/sun8i_rotate.c
+++ b/drivers/media/platform/sunxi/sun8i-rotate/sun8i_rotate.c
@@ -536,7 +536,7 @@ static int rotate_queue_init(void *priv, struct vb2_queue *src_vq,
src_vq->io_modes = VB2_MMAP | VB2_DMABUF;
src_vq->drv_priv = ctx;
src_vq->buf_struct_size = sizeof(struct v4l2_m2m_buffer);
- src_vq->min_buffers_needed = 1;
+ src_vq->min_reqbufs_allocation = 1;
src_vq->ops = &rotate_qops;
src_vq->mem_ops = &vb2_dma_contig_memops;
src_vq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY;
@@ -551,7 +551,7 @@ static int rotate_queue_init(void *priv, struct vb2_queue *src_vq,
dst_vq->io_modes = VB2_MMAP | VB2_DMABUF;
dst_vq->drv_priv = ctx;
dst_vq->buf_struct_size = sizeof(struct v4l2_m2m_buffer);
- dst_vq->min_buffers_needed = 2;
+ dst_vq->min_reqbufs_allocation = 2;
dst_vq->ops = &rotate_qops;
dst_vq->mem_ops = &vb2_dma_contig_memops;
dst_vq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY;
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 20/55] media: sunxi: sun6i-csi: Stop abusing of min_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (18 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 19/55] media: sun8i-rotate: " Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 21/55] media: i2c: video-i2c: " Benjamin Gaignard
` (34 subsequent siblings)
54 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland
'min_buffers_needed' is suppose to be used to indicate the number
of buffers needed by DMA engine to start streaming.
sun6i-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@collabora.com>
CC: Chen-Yu Tsai <wens@csie.org>
CC: Jernej Skrabec <jernej.skrabec@gmail.com>
CC: Samuel Holland <samuel@sholland.org>
---
drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.c b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.c
index cf6aadbc130b..73e721936d27 100644
--- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.c
+++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi_capture.c
@@ -1010,7 +1010,7 @@ int sun6i_csi_capture_setup(struct sun6i_csi_device *csi_dev)
queue->buf_struct_size = sizeof(struct sun6i_csi_buffer);
queue->ops = &sun6i_csi_capture_queue_ops;
queue->mem_ops = &vb2_dma_contig_memops;
- queue->min_buffers_needed = 2;
+ queue->min_reqbufs_allocation = 2;
queue->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
queue->lock = &capture->lock;
queue->dev = csi_dev->dev;
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 21/55] media: i2c: video-i2c: Stop abusing of min_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (19 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 20/55] media: sunxi: sun6i-csi: " Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 22/55] media: dvb-core: " Benjamin Gaignard
` (33 subsequent siblings)
54 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard
'min_buffers_needed' is suppose to be used to indicate the number
of buffers needed by DMA engine to start streaming.
video-i2c 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@collabora.com>
---
drivers/media/i2c/video-i2c.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/i2c/video-i2c.c b/drivers/media/i2c/video-i2c.c
index ebf2ac98a068..ec20849cd306 100644
--- a/drivers/media/i2c/video-i2c.c
+++ b/drivers/media/i2c/video-i2c.c
@@ -795,7 +795,7 @@ static int video_i2c_probe(struct i2c_client *client)
queue->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
queue->drv_priv = data;
queue->buf_struct_size = sizeof(struct video_i2c_buffer);
- queue->min_buffers_needed = 1;
+ queue->min_reqbufs_allocation = 1;
queue->ops = &video_i2c_video_qops;
queue->mem_ops = &vb2_vmalloc_memops;
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 22/55] media: dvb-core: Stop abusing of min_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (20 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 21/55] media: i2c: video-i2c: " Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 23/55] media: imx: " Benjamin Gaignard
` (32 subsequent siblings)
54 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard
'min_buffers_needed' is suppose to be used to indicate the number
of buffers needed by DMA engine to start streaming.
dvb_vb2 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@collabora.com>
---
drivers/media/dvb-core/dvb_vb2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/dvb-core/dvb_vb2.c b/drivers/media/dvb-core/dvb_vb2.c
index 167ff82a6fed..e6253cc41ae3 100644
--- a/drivers/media/dvb-core/dvb_vb2.c
+++ b/drivers/media/dvb-core/dvb_vb2.c
@@ -171,7 +171,7 @@ int dvb_vb2_init(struct dvb_vb2_ctx *ctx, const char *name, int nonblocking)
q->io_modes = VB2_MMAP;
q->drv_priv = ctx;
q->buf_struct_size = sizeof(struct dvb_buffer);
- q->min_buffers_needed = 1;
+ q->min_reqbufs_allocation = 1;
q->ops = &dvb_vb2_qops;
q->mem_ops = &vb2_vmalloc_memops;
q->buf_ops = &dvb_vb2_buf_ops;
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 23/55] media: imx: Stop abusing of min_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (21 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 22/55] media: dvb-core: " Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 24/55] media: atmel: " Benjamin Gaignard
` (31 subsequent siblings)
54 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard, Steve Longerbeam, Philipp Zabel,
Greg Kroah-Hartman, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team
'min_buffers_needed' is suppose to be used to indicate the number
of buffers needed by DMA engine to start streaming.
imx-media-capture 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@collabora.com>
CC: Steve Longerbeam <slongerbeam@gmail.com>
CC: Philipp Zabel <p.zabel@pengutronix.de>
CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
CC: Shawn Guo <shawnguo@kernel.org>
CC: Sascha Hauer <s.hauer@pengutronix.de>
CC: Pengutronix Kernel Team <kernel@pengutronix.de>
CC: Fabio Estevam <festevam@gmail.com>
CC: NXP Linux Team <linux-imx@nxp.com>
---
drivers/staging/media/imx/imx-media-capture.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/media/imx/imx-media-capture.c b/drivers/staging/media/imx/imx-media-capture.c
index ce02199e7b1b..5bb1ebd35d89 100644
--- a/drivers/staging/media/imx/imx-media-capture.c
+++ b/drivers/staging/media/imx/imx-media-capture.c
@@ -1022,7 +1022,7 @@ imx_media_capture_device_init(struct device *dev, struct v4l2_subdev *src_sd,
vq->mem_ops = &vb2_dma_contig_memops;
vq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
vq->lock = &priv->mutex;
- vq->min_buffers_needed = 2;
+ vq->min_reqbufs_allocation = 2;
vq->dev = priv->dev;
ret = vb2_queue_init(vq);
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 24/55] media: atmel: Stop abusing of min_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (22 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 23/55] media: imx: " Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 25/55] media: ipu3: " Benjamin Gaignard
` (30 subsequent siblings)
54 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard, Eugen Hristev, Nicolas Ferre,
Alexandre Belloni, Claudiu Beznea
'min_buffers_needed' is suppose to be used to indicate the number
of buffers needed by DMA engine to start streaming.
atmel-isc drivers don'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@collabora.com>
CC: Eugen Hristev <eugen.hristev@collabora.com>
CC: Nicolas Ferre <nicolas.ferre@microchip.com>
CC: Alexandre Belloni <alexandre.belloni@bootlin.com>
CC: Claudiu Beznea <claudiu.beznea@tuxon.dev>
---
drivers/staging/media/deprecated/atmel/atmel-isc-base.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/media/deprecated/atmel/atmel-isc-base.c b/drivers/staging/media/deprecated/atmel/atmel-isc-base.c
index 468568b5bb7a..dbe611d03018 100644
--- a/drivers/staging/media/deprecated/atmel/atmel-isc-base.c
+++ b/drivers/staging/media/deprecated/atmel/atmel-isc-base.c
@@ -1871,7 +1871,7 @@ static int isc_async_complete(struct v4l2_async_notifier *notifier)
q->mem_ops = &vb2_dma_contig_memops;
q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
q->lock = &isc->lock;
- q->min_buffers_needed = 1;
+ q->min_reqbufs_allocation = 1;
q->dev = isc->dev;
ret = vb2_queue_init(q);
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 25/55] media: ipu3: Stop abusing of min_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (23 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 24/55] media: atmel: " Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 26/55] media: starfive: " Benjamin Gaignard
` (29 subsequent siblings)
54 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard, Sakari Ailus, Bingbu Cao, Tianshu Qiu
'min_buffers_needed' is suppose to be used to indicate the number
of buffers needed by DMA engine to start streaming.
ipu3 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@collabora.com>
CC: Sakari Ailus <sakari.ailus@linux.intel.com>
CC: Bingbu Cao <bingbu.cao@intel.com>
CC: Tianshu Qiu <tian.shu.qiu@intel.com>
---
drivers/staging/media/ipu3/ipu3-v4l2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/media/ipu3/ipu3-v4l2.c b/drivers/staging/media/ipu3/ipu3-v4l2.c
index 0fe2b858da83..197326fbcc2c 100644
--- a/drivers/staging/media/ipu3/ipu3-v4l2.c
+++ b/drivers/staging/media/ipu3/ipu3-v4l2.c
@@ -1198,7 +1198,7 @@ static int imgu_v4l2_node_setup(struct imgu_device *imgu, unsigned int pipe,
vbq->buf_struct_size = imgu->buf_struct_size;
vbq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
/* can streamon w/o buffers */
- vbq->min_buffers_needed = 0;
+ vbq->min_reqbufs_allocation = 0;
vbq->drv_priv = imgu;
vbq->lock = &node->lock;
r = vb2_queue_init(vbq);
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 26/55] media: starfive: Stop abusing of min_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (24 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 25/55] media: ipu3: " Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 27/55] media: sun6i-isp: " Benjamin Gaignard
` (28 subsequent siblings)
54 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard, Jack Zhu, Changhuang Liang
'min_buffers_needed' is suppose to be used to indicate the number
of buffers needed by DMA engine to start streaming.
starfive 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@collabora.com>
CC: Jack Zhu <jack.zhu@starfivetech.com>
CC: Changhuang Liang <changhuang.liang@starfivetech.com>
---
drivers/staging/media/starfive/camss/stf-video.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/media/starfive/camss/stf-video.c b/drivers/staging/media/starfive/camss/stf-video.c
index 0b305f21eb53..25038e37e8a6 100644
--- a/drivers/staging/media/starfive/camss/stf-video.c
+++ b/drivers/staging/media/starfive/camss/stf-video.c
@@ -513,7 +513,7 @@ int stf_video_register(struct stfcamss_video *video,
q->buf_struct_size = sizeof(struct stfcamss_buffer);
q->dev = video->stfcamss->dev;
q->lock = &video->q_lock;
- q->min_buffers_needed = STFCAMSS_MIN_BUFFERS;
+ q->min_reqbufs_allocation = STFCAMSS_MIN_BUFFERS;
ret = vb2_queue_init(q);
if (ret < 0) {
dev_err(video->stfcamss->dev,
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 27/55] media: sun6i-isp: Stop abusing of min_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (25 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 26/55] media: starfive: " Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-29 13:40 ` Paul Kocialkowski
2023-11-27 16:54 ` [PATCH 28/55] media: tegra-video: " Benjamin Gaignard
` (27 subsequent siblings)
54 siblings, 1 reply; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard, Paul Kocialkowski, Chen-Yu Tsai,
Jernej Skrabec, Samuel Holland, linux-sunxi
'min_buffers_needed' is suppose to be used to indicate the number
of buffers needed by DMA engine to start streaming.
sun6i-isp 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@collabora.com>
CC: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
CC: Chen-Yu Tsai <wens@csie.org>
CC: Jernej Skrabec <jernej.skrabec@gmail.com>
CC: Samuel Holland <samuel@sholland.org>
CC: linux-sunxi@lists.linux.dev
---
drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_capture.c | 2 +-
drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_params.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_capture.c b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_capture.c
index 1595a9607775..f47f9946c19f 100644
--- a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_capture.c
+++ b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_capture.c
@@ -660,7 +660,7 @@ int sun6i_isp_capture_setup(struct sun6i_isp_device *isp_dev)
queue->buf_struct_size = sizeof(struct sun6i_isp_buffer);
queue->ops = &sun6i_isp_capture_queue_ops;
queue->mem_ops = &vb2_dma_contig_memops;
- queue->min_buffers_needed = 2;
+ queue->min_reqbufs_allocation = 2;
queue->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
queue->lock = &capture->lock;
queue->dev = isp_dev->dev;
diff --git a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_params.c b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_params.c
index e28be895b486..259f6bfcb620 100644
--- a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_params.c
+++ b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_params.c
@@ -489,7 +489,7 @@ int sun6i_isp_params_setup(struct sun6i_isp_device *isp_dev)
queue->buf_struct_size = sizeof(struct sun6i_isp_buffer);
queue->ops = &sun6i_isp_params_queue_ops;
queue->mem_ops = &vb2_vmalloc_memops;
- queue->min_buffers_needed = 1;
+ queue->min_reqbufs_allocation = 1;
queue->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
queue->lock = ¶ms->lock;
queue->dev = isp_dev->dev;
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 28/55] media: tegra-video: Stop abusing of min_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (26 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 27/55] media: sun6i-isp: " Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 29/55] media: ti: am437x: " Benjamin Gaignard
` (26 subsequent siblings)
54 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard, Thierry Reding, Jonathan Hunter,
Sowjanya Komatineni, Luca Ceresoli, linux-tegra
'min_buffers_needed' is suppose to be used to indicate the number
of buffers needed by DMA engine to start streaming.
tegra-video 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@collabora.com>
CC: Thierry Reding <thierry.reding@gmail.com>
CC: Jonathan Hunter <jonathanh@nvidia.com>
CC: Sowjanya Komatineni <skomatineni@nvidia.com>
CC: Luca Ceresoli <luca.ceresoli@bootlin.com>
CC: linux-tegra@vger.kernel.org
---
drivers/staging/media/tegra-video/vi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/media/tegra-video/vi.c b/drivers/staging/media/tegra-video/vi.c
index e0bb59ee3c09..b8242c8c0497 100644
--- a/drivers/staging/media/tegra-video/vi.c
+++ b/drivers/staging/media/tegra-video/vi.c
@@ -1174,7 +1174,7 @@ static int tegra_channel_init(struct tegra_vi_channel *chan)
chan->queue.ops = &tegra_channel_queue_qops;
chan->queue.mem_ops = &vb2_dma_contig_memops;
chan->queue.timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
- chan->queue.min_buffers_needed = 2;
+ chan->queue.min_reqbufs_allocation = 2;
chan->queue.dev = vi->dev;
ret = vb2_queue_init(&chan->queue);
if (ret < 0) {
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 29/55] media: ti: am437x: Stop abusing of min_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (27 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 28/55] media: tegra-video: " Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 30/55] media: ti: cal: " Benjamin Gaignard
` (25 subsequent siblings)
54 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard, Lad, Prabhakar
'min_buffers_needed' is suppose to be used to indicate the number
of buffers needed by DMA engine to start streaming.
am437x 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@collabora.com>
CC: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
---
drivers/media/platform/ti/am437x/am437x-vpfe.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/ti/am437x/am437x-vpfe.c b/drivers/media/platform/ti/am437x/am437x-vpfe.c
index f18acf9286a2..c2abb7760225 100644
--- a/drivers/media/platform/ti/am437x/am437x-vpfe.c
+++ b/drivers/media/platform/ti/am437x/am437x-vpfe.c
@@ -2234,7 +2234,7 @@ static int vpfe_probe_complete(struct vpfe_device *vpfe)
q->buf_struct_size = sizeof(struct vpfe_cap_buffer);
q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
q->lock = &vpfe->lock;
- q->min_buffers_needed = 1;
+ q->min_reqbufs_allocation = 1;
q->dev = vpfe->pdev;
err = vb2_queue_init(q);
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 30/55] media: ti: cal: Stop abusing of min_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (28 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 29/55] media: ti: am437x: " Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 31/55] media: ti: davinci: " Benjamin Gaignard
` (24 subsequent siblings)
54 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard, Benoit Parrot
'min_buffers_needed' is suppose to be used to indicate the number
of buffers needed by DMA engine to start streaming.
Cal 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@collabora.com>
CC: Benoit Parrot <bparrot@ti.com>
---
drivers/media/platform/ti/cal/cal-video.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/ti/cal/cal-video.c b/drivers/media/platform/ti/cal/cal-video.c
index e1c5e68e945b..04709dac7221 100644
--- a/drivers/media/platform/ti/cal/cal-video.c
+++ b/drivers/media/platform/ti/cal/cal-video.c
@@ -1010,7 +1010,7 @@ int cal_ctx_v4l2_init(struct cal_ctx *ctx)
q->mem_ops = &vb2_dma_contig_memops;
q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
q->lock = &ctx->mutex;
- q->min_buffers_needed = 3;
+ q->min_reqbufs_allocation = 3;
q->dev = ctx->cal->dev;
ret = vb2_queue_init(q);
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 31/55] media: ti: davinci: Stop abusing of min_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (29 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 30/55] media: ti: cal: " Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 32/55] media: saa7146: " Benjamin Gaignard
` (23 subsequent siblings)
54 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard, Lad, Prabhakar
'min_buffers_needed' is suppose to be used to indicate the number
of buffers needed by DMA engine to start streaming.
davinci 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@collabora.com>
CC: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>
---
drivers/media/platform/ti/davinci/vpif_capture.c | 2 +-
drivers/media/platform/ti/davinci/vpif_display.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/platform/ti/davinci/vpif_capture.c b/drivers/media/platform/ti/davinci/vpif_capture.c
index fc42b4bc37e6..1714d67ea702 100644
--- a/drivers/media/platform/ti/davinci/vpif_capture.c
+++ b/drivers/media/platform/ti/davinci/vpif_capture.c
@@ -1429,7 +1429,7 @@ static int vpif_probe_complete(void)
q->mem_ops = &vb2_dma_contig_memops;
q->buf_struct_size = sizeof(struct vpif_cap_buffer);
q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
- q->min_buffers_needed = 1;
+ q->min_reqbufs_allocation = 1;
q->lock = &common->lock;
q->dev = vpif_dev;
diff --git a/drivers/media/platform/ti/davinci/vpif_display.c b/drivers/media/platform/ti/davinci/vpif_display.c
index 9dbab1003c1d..e918b6c8e645 100644
--- a/drivers/media/platform/ti/davinci/vpif_display.c
+++ b/drivers/media/platform/ti/davinci/vpif_display.c
@@ -1169,7 +1169,7 @@ static int vpif_probe_complete(void)
q->mem_ops = &vb2_dma_contig_memops;
q->buf_struct_size = sizeof(struct vpif_disp_buffer);
q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
- q->min_buffers_needed = 1;
+ q->min_reqbufs_allocation = 1;
q->lock = &common->lock;
q->dev = vpif_dev;
err = vb2_queue_init(q);
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 32/55] media: saa7146: Stop abusing of min_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (30 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 31/55] media: ti: davinci: " Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 33/55] input: touchscreen: atmel: " Benjamin Gaignard
` (22 subsequent siblings)
54 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard
'min_buffers_needed' is suppose to be used to indicate the number
of buffers needed by DMA engine to start streaming.
saa7146 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@collabora.com>
---
drivers/media/common/saa7146/saa7146_fops.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/common/saa7146/saa7146_fops.c b/drivers/media/common/saa7146/saa7146_fops.c
index 79214459387a..db4d725a05d4 100644
--- a/drivers/media/common/saa7146/saa7146_fops.c
+++ b/drivers/media/common/saa7146/saa7146_fops.c
@@ -387,7 +387,7 @@ int saa7146_register_device(struct video_device *vfd, struct saa7146_dev *dev,
q->gfp_flags = __GFP_DMA32;
q->buf_struct_size = sizeof(struct saa7146_buf);
q->lock = &dev->v4l2_lock;
- q->min_buffers_needed = 2;
+ q->min_reqbufs_allocation = 2;
q->dev = &dev->pci->dev;
err = vb2_queue_init(q);
if (err)
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 33/55] input: touchscreen: atmel: Stop abusing of min_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (31 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 32/55] media: saa7146: " Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 34/55] input: touchscreen: sur40: " Benjamin Gaignard
` (21 subsequent siblings)
54 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard, Nick Dyer, Dmitry Torokhov, linux-input
'min_buffers_needed' is suppose to be used to indicate the number
of buffers needed by DMA engine to start streaming.
atmel touchscreen 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@collabora.com>
CC: Nick Dyer <nick@shmanahar.org>
CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
CC: linux-input@vger.kernel.org
---
drivers/input/touchscreen/atmel_mxt_ts.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
index 20094b9899f0..47f2b3aafa4d 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -2546,7 +2546,7 @@ static const struct vb2_queue mxt_queue = {
.ops = &mxt_queue_ops,
.mem_ops = &vb2_vmalloc_memops,
.timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC,
- .min_buffers_needed = 1,
+ .min_reqbufs_allocation = 1,
};
static int mxt_vidioc_querycap(struct file *file, void *priv,
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 34/55] input: touchscreen: sur40: Stop abusing of min_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (32 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 33/55] input: touchscreen: atmel: " Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 35/55] videobuf2: core: Add min_dma_buffers_needed field to vb2_queue Benjamin Gaignard
` (20 subsequent siblings)
54 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard, Dmitry Torokhov, linux-input
'min_buffers_needed' is suppose to be used to indicate the number
of buffers needed by DMA engine to start streaming.
sur40 touchscreen 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@collabora.com>
CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
CC: linux-input@vger.kernel.org
---
drivers/input/touchscreen/sur40.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/touchscreen/sur40.c b/drivers/input/touchscreen/sur40.c
index e7d2a52169a0..4da3063c352e 100644
--- a/drivers/input/touchscreen/sur40.c
+++ b/drivers/input/touchscreen/sur40.c
@@ -1124,7 +1124,7 @@ static const struct vb2_queue sur40_queue = {
.ops = &sur40_queue_ops,
.mem_ops = &vb2_dma_sg_memops,
.timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC,
- .min_buffers_needed = 3,
+ .min_reqbufs_allocation = 3,
};
static const struct v4l2_file_operations sur40_video_fops = {
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 35/55] videobuf2: core: Add min_dma_buffers_needed field to vb2_queue
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (33 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 34/55] input: touchscreen: sur40: " Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 36/55] media: stm32: stm32-dcmi: Use min_dma_buffers_needed field Benjamin Gaignard
` (19 subsequent siblings)
54 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard
'min_dma_buffers_needed' field is to clarify 'min_buffers_needed'
purpose versus 'min_reqbufs_allocation' usage.
'min_buffers_needed' is still used in few drivers so directly
rename it would be problematic.
The both will live together while fixing the drivers to use
'min_dma_buffers_needed' field instead.
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
---
.../media/common/videobuf2/videobuf2-core.c | 28 ++++++++++++++-----
include/media/videobuf2-core.h | 7 +++++
2 files changed, 28 insertions(+), 7 deletions(-)
diff --git a/drivers/media/common/videobuf2/videobuf2-core.c b/drivers/media/common/videobuf2/videobuf2-core.c
index c224d13b3105..a6ec55db8635 100644
--- a/drivers/media/common/videobuf2/videobuf2-core.c
+++ b/drivers/media/common/videobuf2/videobuf2-core.c
@@ -816,7 +816,7 @@ static bool verify_coherency_flags(struct vb2_queue *q, bool non_coherent_mem)
int vb2_core_reqbufs(struct vb2_queue *q, enum vb2_memory memory,
unsigned int flags, unsigned int *count)
{
- unsigned int num_buffers, allocated_buffers, num_planes = 0;
+ unsigned int num_buffers, allocated_buffers, min_reqbufs_needed, num_planes = 0;
unsigned int q_num_bufs = vb2_get_num_buffers(q);
unsigned plane_sizes[VB2_MAX_PLANES] = { };
bool non_coherent_mem = flags & V4L2_MEMORY_FLAG_NON_COHERENT;
@@ -866,7 +866,11 @@ int vb2_core_reqbufs(struct vb2_queue *q, enum vb2_memory memory,
* Make sure the requested values and current defaults are sane.
*/
num_buffers = max_t(unsigned int, *count, q->min_buffers_needed);
- num_buffers = max_t(unsigned int, num_buffers, q->min_reqbufs_allocation);
+ if (q->min_reqbufs_allocation)
+ num_buffers = max_t(unsigned int, num_buffers, q->min_reqbufs_allocation);
+ else
+ num_buffers = max_t(unsigned int, num_buffers, q->min_dma_buffers_needed + 1);
+ min_reqbufs_needed = num_buffers;
num_buffers = min_t(unsigned int, num_buffers, q->max_num_buffers);
memset(q->alloc_devs, 0, sizeof(q->alloc_devs));
/*
@@ -918,7 +922,7 @@ int vb2_core_reqbufs(struct vb2_queue *q, enum vb2_memory memory,
* There is no point in continuing if we can't allocate the minimum
* number of buffers needed by this vb2_queue.
*/
- if (allocated_buffers < q->min_buffers_needed)
+ if (allocated_buffers < min_reqbufs_needed)
ret = -ENOMEM;
/*
@@ -1654,7 +1658,7 @@ EXPORT_SYMBOL_GPL(vb2_core_prepare_buf);
* @q: videobuf2 queue
*
* Attempt to start streaming. When this function is called there must be
- * at least q->min_buffers_needed buffers queued up (i.e. the minimum
+ * at least q->min_dma_buffers_needed queued up (i.e. the minimum
* number of buffers required for the DMA engine to function). If the
* @start_streaming op fails it is supposed to return all the driver-owned
* buffers back to vb2 in state QUEUED. Check if that happened and if
@@ -1847,7 +1851,8 @@ int vb2_core_qbuf(struct vb2_queue *q, struct vb2_buffer *vb, void *pb,
* then we can finally call start_streaming().
*/
if (q->streaming && !q->start_streaming_called &&
- q->queued_count >= q->min_buffers_needed) {
+ ((q->queued_count >= q->min_buffers_needed) ||
+ (q->queued_count >= q->min_dma_buffers_needed))) {
ret = vb2_start_streaming(q);
if (ret) {
/*
@@ -2217,6 +2222,12 @@ int vb2_core_streamon(struct vb2_queue *q, unsigned int type)
return -EINVAL;
}
+ if (q_num_bufs < q->min_dma_buffers_needed) {
+ dprintk(q, 1, "need at least %u allocated buffers\n",
+ q->min_dma_buffers_needed);
+ return -EINVAL;
+ }
+
ret = call_qop(q, prepare_streaming, q);
if (ret)
return ret;
@@ -2225,7 +2236,8 @@ int vb2_core_streamon(struct vb2_queue *q, unsigned int type)
* Tell driver to start streaming provided sufficient buffers
* are available.
*/
- if (q->queued_count >= q->min_buffers_needed) {
+ if (q->queued_count >= q->min_buffers_needed &&
+ q->queued_count >= q->min_dma_buffers_needed) {
ret = vb2_start_streaming(q);
if (ret)
goto unprepare;
@@ -2505,6 +2517,7 @@ int vb2_core_queue_init(struct vb2_queue *q)
return -EINVAL;
if (WARN_ON(q->max_num_buffers > MAX_BUFFER_INDEX) ||
+ WARN_ON(q->min_dma_buffers_needed > q->max_num_buffers) ||
WARN_ON(q->min_buffers_needed > q->max_num_buffers))
return -EINVAL;
@@ -2519,7 +2532,8 @@ int vb2_core_queue_init(struct vb2_queue *q)
* in that request) will always succeed. There is no method of
* propagating an error back to userspace.
*/
- if (WARN_ON(q->supports_requests && q->min_buffers_needed))
+ if (WARN_ON(q->supports_requests &&
+ (q->min_buffers_needed || q->min_dma_buffers_needed)))
return -EINVAL;
INIT_LIST_HEAD(&q->queued_list);
diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h
index 17cacd696ab4..0bc97f28a7ea 100644
--- a/include/media/videobuf2-core.h
+++ b/include/media/videobuf2-core.h
@@ -549,10 +549,16 @@ struct vb2_buf_ops {
* @min_buffers_needed: the minimum number of buffers needed before
* @start_streaming can be called. Used when a DMA engine
* cannot be started unless at least this number of buffers
+ * have been queued into the driver. (Deprecated)
+ * @min_dma_buffers_needed: the minimum number of buffers needed before
+ * @start_streaming can be called. Used when a DMA engine
+ * cannot be started unless at least this number of buffers
* have been queued into the driver.
* @min_reqbufs_allocation: the minimum number of buffers allocated when
* calling VIDIOC_REQBUFS. Used when drivers need a to
* specify a minimum buffers allocation before setup a queue.
+ * If set to 0 then min_dma_buffers_needed + 1 value is used
+ * as minimum numbers of buffers value.
*/
/*
* Private elements (won't appear at the uAPI book):
@@ -618,6 +624,7 @@ struct vb2_queue {
u32 timestamp_flags;
gfp_t gfp_flags;
u32 min_buffers_needed;
+ u32 min_dma_buffers_needed;
u32 min_reqbufs_allocation;
struct device *alloc_devs[VB2_MAX_PLANES];
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 36/55] media: stm32: stm32-dcmi: Use min_dma_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (34 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 35/55] videobuf2: core: Add min_dma_buffers_needed field to vb2_queue Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 37/55] media: renesas: " Benjamin Gaignard
` (18 subsequent siblings)
54 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard, Hugues Fruchet, linux-stm32
smt32-dcmi 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: Hugues Fruchet <hugues.fruchet@foss.st.com>
CC: linux-stm32@st-md-mailman.stormreply.com
---
drivers/media/platform/st/stm32/stm32-dcmi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/st/stm32/stm32-dcmi.c b/drivers/media/platform/st/stm32/stm32-dcmi.c
index 48140fdf40bb..a267fdcbe886 100644
--- a/drivers/media/platform/st/stm32/stm32-dcmi.c
+++ b/drivers/media/platform/st/stm32/stm32-dcmi.c
@@ -2031,7 +2031,7 @@ static int dcmi_probe(struct platform_device *pdev)
q->ops = &dcmi_video_qops;
q->mem_ops = &vb2_dma_contig_memops;
q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
- q->min_buffers_needed = 2;
+ q->min_dma_buffers_needed = 2;
q->allow_cache_hints = 1;
q->dev = &pdev->dev;
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 37/55] media: renesas: Use min_dma_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (35 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 36/55] media: stm32: stm32-dcmi: Use min_dma_buffers_needed field Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 38/55] media: ti: j721e-csi2rx: " Benjamin Gaignard
` (17 subsequent siblings)
54 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard, Niklas Söderlund, Jacopo Mondi,
linux-renesas-soc
renesas drivers 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: "Niklas Söderlund" <niklas.soderlund@ragnatech.se>
CC: Jacopo Mondi <jacopo@jmondi.org>
CC: linux-renesas-soc@vger.kernel.org
---
drivers/media/platform/renesas/rcar-vin/rcar-dma.c | 2 +-
drivers/media/platform/renesas/renesas-ceu.c | 2 +-
drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c | 2 +-
drivers/media/platform/renesas/sh_vou.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/media/platform/renesas/rcar-vin/rcar-dma.c b/drivers/media/platform/renesas/rcar-vin/rcar-dma.c
index 2a77353f10b5..b467e7a7d0dc 100644
--- a/drivers/media/platform/renesas/rcar-vin/rcar-dma.c
+++ b/drivers/media/platform/renesas/rcar-vin/rcar-dma.c
@@ -1559,7 +1559,7 @@ int rvin_dma_register(struct rvin_dev *vin, int irq)
q->ops = &rvin_qops;
q->mem_ops = &vb2_dma_contig_memops;
q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
- q->min_buffers_needed = 4;
+ q->min_dma_buffers_needed = 4;
q->dev = vin->dev;
ret = vb2_queue_init(q);
diff --git a/drivers/media/platform/renesas/renesas-ceu.c b/drivers/media/platform/renesas/renesas-ceu.c
index 2562b30acfb9..e2aef002bca9 100644
--- a/drivers/media/platform/renesas/renesas-ceu.c
+++ b/drivers/media/platform/renesas/renesas-ceu.c
@@ -1399,7 +1399,7 @@ static int ceu_notify_complete(struct v4l2_async_notifier *notifier)
q->mem_ops = &vb2_dma_contig_memops;
q->buf_struct_size = sizeof(struct ceu_buffer);
q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
- q->min_buffers_needed = 2;
+ q->min_dma_buffers_needed = 2;
q->lock = &ceudev->mlock;
q->dev = ceudev->v4l2_dev.dev;
diff --git a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c
index e6eedd65b71d..df1ab9beea6e 100644
--- a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c
+++ b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c
@@ -767,7 +767,7 @@ int rzg2l_cru_dma_register(struct rzg2l_cru_dev *cru)
q->ops = &rzg2l_cru_qops;
q->mem_ops = &vb2_dma_contig_memops;
q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
- q->min_buffers_needed = 4;
+ q->min_dma_buffers_needed = 4;
q->dev = cru->dev;
ret = vb2_queue_init(q);
diff --git a/drivers/media/platform/renesas/sh_vou.c b/drivers/media/platform/renesas/sh_vou.c
index f792aedc9d82..c2ac340a9da8 100644
--- a/drivers/media/platform/renesas/sh_vou.c
+++ b/drivers/media/platform/renesas/sh_vou.c
@@ -1297,7 +1297,7 @@ static int sh_vou_probe(struct platform_device *pdev)
q->ops = &sh_vou_qops;
q->mem_ops = &vb2_dma_contig_memops;
q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
- q->min_buffers_needed = 2;
+ q->min_dma_buffers_needed = 2;
q->lock = &vou_dev->fop_lock;
q->dev = &pdev->dev;
ret = vb2_queue_init(q);
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 38/55] media: ti: j721e-csi2rx: Use min_dma_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (36 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 37/55] media: renesas: " Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 39/55] media: ti: omap: " Benjamin Gaignard
` (16 subsequent siblings)
54 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard, Jai Luthra
j721e-csi2rx 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: Jai Luthra <j-luthra@ti.com>
---
drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c b/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c
index ada61391c8d2..55e843419eb9 100644
--- a/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c
+++ b/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c
@@ -873,7 +873,7 @@ static int ti_csi2rx_init_vb2q(struct ti_csi2rx_dev *csi)
q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
q->dev = dmaengine_get_dma_device(csi->dma.chan);
q->lock = &csi->mutex;
- q->min_buffers_needed = 1;
+ q->min_dma_buffers_needed = 1;
ret = vb2_queue_init(q);
if (ret)
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 39/55] media: ti: omap: Use min_dma_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (37 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 38/55] media: ti: j721e-csi2rx: " Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 40/55] samples: v4l2: pci: " Benjamin Gaignard
` (15 subsequent siblings)
54 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard
omap 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>
---
drivers/media/platform/ti/omap/omap_vout.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/ti/omap/omap_vout.c b/drivers/media/platform/ti/omap/omap_vout.c
index 72ce903717d3..0adbdd11e06b 100644
--- a/drivers/media/platform/ti/omap/omap_vout.c
+++ b/drivers/media/platform/ti/omap/omap_vout.c
@@ -1404,7 +1404,7 @@ static int __init omap_vout_setup_video_data(struct omap_vout_device *vout)
vq->ops = &omap_vout_vb2_ops;
vq->mem_ops = &vb2_dma_contig_memops;
vq->lock = &vout->lock;
- vq->min_buffers_needed = 1;
+ vq->min_dma_buffers_needed = 1;
vfd->queue = vq;
ret = vb2_queue_init(vq);
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 40/55] samples: v4l2: pci: Use min_dma_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (38 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 39/55] media: ti: omap: " Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 41/55] media: pci: intel: ipu3: " Benjamin Gaignard
` (14 subsequent siblings)
54 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard
v4l2 pci skeleton sample 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>
---
samples/v4l/v4l2-pci-skeleton.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/samples/v4l/v4l2-pci-skeleton.c b/samples/v4l/v4l2-pci-skeleton.c
index a65aa9d1e9da..6018c5e7b3f1 100644
--- a/samples/v4l/v4l2-pci-skeleton.c
+++ b/samples/v4l/v4l2-pci-skeleton.c
@@ -821,7 +821,7 @@ static int skeleton_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
* available before it can be started. The start_streaming() op
* won't be called until at least this many buffers are queued up.
*/
- q->min_buffers_needed = 2;
+ q->min_dma_buffers_needed = 2;
/*
* The serialization lock for the streaming ioctls. This is the same
* as the main serialization lock, but if some of the non-streaming
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 41/55] media: pci: intel: ipu3: Use min_dma_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (39 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 40/55] samples: v4l2: pci: " Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 42/55] media: pci: dt3155: " Benjamin Gaignard
` (13 subsequent siblings)
54 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard, Yong Zhi, Sakari Ailus, Bingbu Cao, Dan Scally,
Tianshu Qiu
Ipu3 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: Yong Zhi <yong.zhi@intel.com>
CC: Sakari Ailus <sakari.ailus@linux.intel.com>
CC: Bingbu Cao <bingbu.cao@intel.com>
CC: Dan Scally <djrscally@gmail.com>
CC: Tianshu Qiu <tian.shu.qiu@intel.com>
---
drivers/media/pci/intel/ipu3/ipu3-cio2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/pci/intel/ipu3/ipu3-cio2.c b/drivers/media/pci/intel/ipu3/ipu3-cio2.c
index 5d3b0ffd3d08..3a000a682cb0 100644
--- a/drivers/media/pci/intel/ipu3/ipu3-cio2.c
+++ b/drivers/media/pci/intel/ipu3/ipu3-cio2.c
@@ -1589,7 +1589,7 @@ static int cio2_queue_init(struct cio2_device *cio2, struct cio2_queue *q)
vbq->mem_ops = &vb2_dma_sg_memops;
vbq->buf_struct_size = sizeof(struct cio2_buffer);
vbq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
- vbq->min_buffers_needed = 1;
+ vbq->min_dma_buffers_needed = 1;
vbq->drv_priv = cio2;
vbq->lock = &q->lock;
r = vb2_queue_init(vbq);
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 42/55] media: pci: dt3155: Use min_dma_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (40 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 41/55] media: pci: intel: ipu3: " Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 43/55] media: pci: bt8xx: " Benjamin Gaignard
` (12 subsequent siblings)
54 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard
dt3155 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>
---
drivers/media/pci/dt3155/dt3155.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/pci/dt3155/dt3155.c b/drivers/media/pci/dt3155/dt3155.c
index d09cde2f6ee4..43b44af1e9ca 100644
--- a/drivers/media/pci/dt3155/dt3155.c
+++ b/drivers/media/pci/dt3155/dt3155.c
@@ -517,7 +517,7 @@ static int dt3155_probe(struct pci_dev *pdev, const struct pci_device_id *id)
pd->vidq.ops = &q_ops;
pd->vidq.mem_ops = &vb2_dma_contig_memops;
pd->vidq.drv_priv = pd;
- pd->vidq.min_buffers_needed = 2;
+ pd->vidq.min_dma_buffers_needed = 2;
pd->vidq.gfp_flags = GFP_DMA32;
pd->vidq.lock = &pd->mux; /* for locking v4l2_file_operations */
pd->vidq.dev = &pdev->dev;
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 43/55] media: pci: bt8xx: Use min_dma_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (41 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 42/55] media: pci: dt3155: " Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 44/55] media: pci: cx18: " Benjamin Gaignard
` (11 subsequent siblings)
54 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard
bt8xx 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>
---
drivers/media/pci/bt8xx/bttv-driver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/pci/bt8xx/bttv-driver.c b/drivers/media/pci/bt8xx/bttv-driver.c
index 09a193bb87df..8a3fb30e73f6 100644
--- a/drivers/media/pci/bt8xx/bttv-driver.c
+++ b/drivers/media/pci/bt8xx/bttv-driver.c
@@ -3094,7 +3094,7 @@ static int vdev_init(struct bttv *btv, struct video_device *vfd,
q->gfp_flags = __GFP_DMA32;
q->buf_struct_size = sizeof(struct bttv_buffer);
q->lock = &btv->lock;
- q->min_buffers_needed = 2;
+ q->min_dma_buffers_needed = 2;
q->dev = &btv->c.pci->dev;
err = vb2_queue_init(q);
if (err)
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 44/55] media: pci: cx18: Use min_dma_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (42 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 43/55] media: pci: bt8xx: " Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 45/55] media: pci: mgb4: " Benjamin Gaignard
` (10 subsequent siblings)
54 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard, Andy Walls
cx18 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: Andy Walls <awalls@md.metrocast.net>
---
drivers/media/pci/cx18/cx18-streams.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/pci/cx18/cx18-streams.c b/drivers/media/pci/cx18/cx18-streams.c
index cfbc4a907802..1b66a70c6d6e 100644
--- a/drivers/media/pci/cx18/cx18-streams.c
+++ b/drivers/media/pci/cx18/cx18-streams.c
@@ -287,7 +287,7 @@ static int cx18_stream_init(struct cx18 *cx, int type)
s->vidq.ops = &cx18_vb2_qops;
s->vidq.mem_ops = &vb2_vmalloc_memops;
s->vidq.timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
- s->vidq.min_buffers_needed = 2;
+ s->vidq.min_dma_buffers_needed = 2;
s->vidq.gfp_flags = GFP_DMA32;
s->vidq.dev = &cx->pci_dev->dev;
s->vidq.lock = &cx->serialize_lock;
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 45/55] media: pci: mgb4: Use min_dma_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (43 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 44/55] media: pci: cx18: " Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 46/55] media: pci: tw68: " Benjamin Gaignard
` (9 subsequent siblings)
54 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard, Martin Tuma
mgb4 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: Martin Tuma <martin.tuma@digiteqautomotive.com>
---
drivers/media/pci/mgb4/mgb4_vin.c | 2 +-
drivers/media/pci/mgb4/mgb4_vout.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/pci/mgb4/mgb4_vin.c b/drivers/media/pci/mgb4/mgb4_vin.c
index d72b07b87cd1..89e87aa87341 100644
--- a/drivers/media/pci/mgb4/mgb4_vin.c
+++ b/drivers/media/pci/mgb4/mgb4_vin.c
@@ -849,7 +849,7 @@ struct mgb4_vin_dev *mgb4_vin_create(struct mgb4_dev *mgbdev, int id)
vindev->queue.mem_ops = &vb2_dma_sg_memops;
vindev->queue.gfp_flags = GFP_DMA32;
vindev->queue.timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
- vindev->queue.min_buffers_needed = 2;
+ vindev->queue.min_dma_buffers_needed = 2;
vindev->queue.drv_priv = vindev;
vindev->queue.lock = &vindev->lock;
vindev->queue.dev = dev;
diff --git a/drivers/media/pci/mgb4/mgb4_vout.c b/drivers/media/pci/mgb4/mgb4_vout.c
index 857fc7bbd21a..23f0e4fb195f 100644
--- a/drivers/media/pci/mgb4/mgb4_vout.c
+++ b/drivers/media/pci/mgb4/mgb4_vout.c
@@ -523,7 +523,7 @@ struct mgb4_vout_dev *mgb4_vout_create(struct mgb4_dev *mgbdev, int id)
voutdev->queue.mem_ops = &vb2_dma_sg_memops;
voutdev->queue.gfp_flags = GFP_DMA32;
voutdev->queue.timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
- voutdev->queue.min_buffers_needed = 2;
+ voutdev->queue.min_dma_buffers_needed = 2;
voutdev->queue.drv_priv = voutdev;
voutdev->queue.lock = &voutdev->lock;
voutdev->queue.dev = dev;
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 46/55] media: pci: tw68: Use min_dma_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (44 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 45/55] media: pci: mgb4: " Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 47/55] media: pci: cx25821: " Benjamin Gaignard
` (8 subsequent siblings)
54 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard
tw68 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>
---
drivers/media/pci/tw68/tw68-video.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/pci/tw68/tw68-video.c b/drivers/media/pci/tw68/tw68-video.c
index 79b627ebc92a..b181abe3bfbb 100644
--- a/drivers/media/pci/tw68/tw68-video.c
+++ b/drivers/media/pci/tw68/tw68-video.c
@@ -952,7 +952,7 @@ int tw68_video_init2(struct tw68_dev *dev, int video_nr)
dev->vidq.gfp_flags = __GFP_DMA32 | __GFP_KSWAPD_RECLAIM;
dev->vidq.buf_struct_size = sizeof(struct tw68_buf);
dev->vidq.lock = &dev->lock;
- dev->vidq.min_buffers_needed = 2;
+ dev->vidq.min_dma_buffers_needed = 2;
dev->vidq.dev = &dev->pci->dev;
ret = vb2_queue_init(&dev->vidq);
if (ret)
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 47/55] media: pci: cx25821: Use min_dma_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (45 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 46/55] media: pci: tw68: " Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 48/55] media: pci: tw5864: " Benjamin Gaignard
` (7 subsequent siblings)
54 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard
cx25821 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>
---
drivers/media/pci/cx25821/cx25821-video.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/pci/cx25821/cx25821-video.c b/drivers/media/pci/cx25821/cx25821-video.c
index 1b80c990cb94..7283a7379ae1 100644
--- a/drivers/media/pci/cx25821/cx25821-video.c
+++ b/drivers/media/pci/cx25821/cx25821-video.c
@@ -730,7 +730,7 @@ int cx25821_video_register(struct cx25821_dev *dev)
q->io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF;
q->io_modes |= is_output ? VB2_WRITE : VB2_READ;
q->gfp_flags = GFP_DMA32;
- q->min_buffers_needed = 2;
+ q->min_dma_buffers_needed = 2;
q->drv_priv = chan;
q->buf_struct_size = sizeof(struct cx25821_buffer);
q->ops = &cx25821_video_qops;
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 48/55] media: pci: tw5864: Use min_dma_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (46 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 47/55] media: pci: cx25821: " Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 49/55] media: pci: tw686x: " Benjamin Gaignard
` (6 subsequent siblings)
54 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard, Bluecherry Maintainers, Anton Sviridenko,
Andrey Utkin
tw5864 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: Bluecherry Maintainers <maintainers@bluecherrydvr.com>
CC: Anton Sviridenko <anton@corp.bluecherry.net>
CC: Andrey Utkin <andrey.utkin@corp.bluecherry.net>
---
drivers/media/pci/tw5864/tw5864-video.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/pci/tw5864/tw5864-video.c b/drivers/media/pci/tw5864/tw5864-video.c
index 197ed8978102..647a57552d4c 100644
--- a/drivers/media/pci/tw5864/tw5864-video.c
+++ b/drivers/media/pci/tw5864/tw5864-video.c
@@ -1114,7 +1114,7 @@ static int tw5864_video_input_init(struct tw5864_input *input, int video_nr)
input->vidq.gfp_flags = 0;
input->vidq.buf_struct_size = sizeof(struct tw5864_buf);
input->vidq.lock = &input->lock;
- input->vidq.min_buffers_needed = 2;
+ input->vidq.min_dma_buffers_needed = 2;
input->vidq.dev = &input->root->pci->dev;
ret = vb2_queue_init(&input->vidq);
if (ret)
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 49/55] media: pci: tw686x: Use min_dma_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (47 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 48/55] media: pci: tw5864: " Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 50/55] media: pci: cx88: " Benjamin Gaignard
` (5 subsequent siblings)
54 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard, Ezequiel Garcia
tw686x 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: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
---
drivers/media/pci/tw686x/tw686x-video.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/pci/tw686x/tw686x-video.c b/drivers/media/pci/tw686x/tw686x-video.c
index 6bc6d143d18c..8526c200f305 100644
--- a/drivers/media/pci/tw686x/tw686x-video.c
+++ b/drivers/media/pci/tw686x/tw686x-video.c
@@ -1222,7 +1222,7 @@ int tw686x_video_init(struct tw686x_dev *dev)
vc->vidq.ops = &tw686x_video_qops;
vc->vidq.mem_ops = dev->dma_ops->mem_ops;
vc->vidq.timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
- vc->vidq.min_buffers_needed = 2;
+ vc->vidq.min_dma_buffers_needed = 2;
vc->vidq.lock = &vc->vb_mutex;
vc->vidq.gfp_flags = dev->dma_mode != TW686X_DMA_MODE_MEMCPY ?
GFP_DMA32 : 0;
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 50/55] media: pci: cx88: Use min_dma_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (48 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 49/55] media: pci: tw686x: " Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 51/55] media: pci: cx23885: " Benjamin Gaignard
` (4 subsequent siblings)
54 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard
cx88 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>
---
drivers/media/pci/cx88/cx88-blackbird.c | 2 +-
drivers/media/pci/cx88/cx88-dvb.c | 2 +-
drivers/media/pci/cx88/cx88-video.c | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/media/pci/cx88/cx88-blackbird.c b/drivers/media/pci/cx88/cx88-blackbird.c
index c1b41a9283c1..9cb14d661eec 100644
--- a/drivers/media/pci/cx88/cx88-blackbird.c
+++ b/drivers/media/pci/cx88/cx88-blackbird.c
@@ -1195,7 +1195,7 @@ static int cx8802_blackbird_probe(struct cx8802_driver *drv)
q->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
q->io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF | VB2_READ;
q->gfp_flags = GFP_DMA32;
- q->min_buffers_needed = 2;
+ q->min_dma_buffers_needed = 2;
q->drv_priv = dev;
q->buf_struct_size = sizeof(struct cx88_buffer);
q->ops = &blackbird_qops;
diff --git a/drivers/media/pci/cx88/cx88-dvb.c b/drivers/media/pci/cx88/cx88-dvb.c
index 2087f2491c42..3473e1e93a24 100644
--- a/drivers/media/pci/cx88/cx88-dvb.c
+++ b/drivers/media/pci/cx88/cx88-dvb.c
@@ -1776,7 +1776,7 @@ static int cx8802_dvb_probe(struct cx8802_driver *drv)
q->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
q->io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF | VB2_READ;
q->gfp_flags = GFP_DMA32;
- q->min_buffers_needed = 2;
+ q->min_dma_buffers_needed = 2;
q->drv_priv = dev;
q->buf_struct_size = sizeof(struct cx88_buffer);
q->ops = &dvb_qops;
diff --git a/drivers/media/pci/cx88/cx88-video.c b/drivers/media/pci/cx88/cx88-video.c
index c0ef03ed74f9..31eb79bfa547 100644
--- a/drivers/media/pci/cx88/cx88-video.c
+++ b/drivers/media/pci/cx88/cx88-video.c
@@ -1411,7 +1411,7 @@ static int cx8800_initdev(struct pci_dev *pci_dev,
q->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
q->io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF | VB2_READ;
q->gfp_flags = GFP_DMA32;
- q->min_buffers_needed = 2;
+ q->min_dma_buffers_needed = 2;
q->drv_priv = dev;
q->buf_struct_size = sizeof(struct cx88_buffer);
q->ops = &cx8800_video_qops;
@@ -1428,7 +1428,7 @@ static int cx8800_initdev(struct pci_dev *pci_dev,
q->type = V4L2_BUF_TYPE_VBI_CAPTURE;
q->io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF | VB2_READ;
q->gfp_flags = GFP_DMA32;
- q->min_buffers_needed = 2;
+ q->min_dma_buffers_needed = 2;
q->drv_priv = dev;
q->buf_struct_size = sizeof(struct cx88_buffer);
q->ops = &cx8800_vbi_qops;
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 51/55] media: pci: cx23885: Use min_dma_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (49 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 50/55] media: pci: cx88: " Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 52/55] media: pci: zoran: " Benjamin Gaignard
` (3 subsequent siblings)
54 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard
cx23885 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>
---
drivers/media/pci/cx23885/cx23885-417.c | 2 +-
drivers/media/pci/cx23885/cx23885-dvb.c | 2 +-
drivers/media/pci/cx23885/cx23885-video.c | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/media/pci/cx23885/cx23885-417.c b/drivers/media/pci/cx23885/cx23885-417.c
index 434677bd4ad1..44c93484d42c 100644
--- a/drivers/media/pci/cx23885/cx23885-417.c
+++ b/drivers/media/pci/cx23885/cx23885-417.c
@@ -1525,7 +1525,7 @@ int cx23885_417_register(struct cx23885_dev *dev)
q->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
q->io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF | VB2_READ;
q->gfp_flags = GFP_DMA32;
- q->min_buffers_needed = 2;
+ q->min_dma_buffers_needed = 2;
q->drv_priv = dev;
q->buf_struct_size = sizeof(struct cx23885_buffer);
q->ops = &cx23885_qops;
diff --git a/drivers/media/pci/cx23885/cx23885-dvb.c b/drivers/media/pci/cx23885/cx23885-dvb.c
index 7551ca4a322a..7509fbda4e18 100644
--- a/drivers/media/pci/cx23885/cx23885-dvb.c
+++ b/drivers/media/pci/cx23885/cx23885-dvb.c
@@ -2667,7 +2667,7 @@ int cx23885_dvb_register(struct cx23885_tsport *port)
q->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
q->io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF | VB2_READ;
q->gfp_flags = GFP_DMA32;
- q->min_buffers_needed = 2;
+ q->min_dma_buffers_needed = 2;
q->drv_priv = port;
q->buf_struct_size = sizeof(struct cx23885_buffer);
q->ops = &dvb_qops;
diff --git a/drivers/media/pci/cx23885/cx23885-video.c b/drivers/media/pci/cx23885/cx23885-video.c
index 9af2c5596121..13c5812a8833 100644
--- a/drivers/media/pci/cx23885/cx23885-video.c
+++ b/drivers/media/pci/cx23885/cx23885-video.c
@@ -1321,7 +1321,7 @@ int cx23885_video_register(struct cx23885_dev *dev)
q->type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
q->io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF | VB2_READ;
q->gfp_flags = GFP_DMA32;
- q->min_buffers_needed = 2;
+ q->min_dma_buffers_needed = 2;
q->drv_priv = dev;
q->buf_struct_size = sizeof(struct cx23885_buffer);
q->ops = &cx23885_video_qops;
@@ -1338,7 +1338,7 @@ int cx23885_video_register(struct cx23885_dev *dev)
q->type = V4L2_BUF_TYPE_VBI_CAPTURE;
q->io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF | VB2_READ;
q->gfp_flags = GFP_DMA32;
- q->min_buffers_needed = 2;
+ q->min_dma_buffers_needed = 2;
q->drv_priv = dev;
q->buf_struct_size = sizeof(struct cx23885_buffer);
q->ops = &cx23885_vbi_qops;
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 52/55] media: pci: zoran: Use min_dma_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (50 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 51/55] media: pci: cx23885: " Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 53/55] media: pci: cobalt: " Benjamin Gaignard
` (2 subsequent siblings)
54 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard, Corentin Labbe, mjpeg-users
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(-)
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
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 53/55] media: pci: cobalt: Use min_dma_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (51 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 52/55] media: pci: zoran: " Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 54/55] media: meson: vdec: " Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 55/55] media: videobuf2: core: Remove 'min_buffers_needed' field Benjamin Gaignard
54 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard
cobalt 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>
---
drivers/media/pci/cobalt/cobalt-v4l2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/pci/cobalt/cobalt-v4l2.c b/drivers/media/pci/cobalt/cobalt-v4l2.c
index 26bf58d17a3d..9e99820f58d4 100644
--- a/drivers/media/pci/cobalt/cobalt-v4l2.c
+++ b/drivers/media/pci/cobalt/cobalt-v4l2.c
@@ -1260,7 +1260,7 @@ static int cobalt_node_register(struct cobalt *cobalt, int node)
q->ops = &cobalt_qops;
q->mem_ops = &vb2_dma_sg_memops;
q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
- q->min_buffers_needed = 2;
+ q->min_dma_buffers_needed = 2;
q->lock = &s->lock;
q->dev = &cobalt->pci_dev->dev;
vdev->queue = q;
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 54/55] media: meson: vdec: Use min_dma_buffers_needed field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (52 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 53/55] media: pci: cobalt: " Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 55/55] media: videobuf2: core: Remove 'min_buffers_needed' field Benjamin Gaignard
54 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard, Neil Armstrong, Kevin Hilman, Jerome Brunet,
Martin Blumenstingl, Greg Kroah-Hartman, linux-amlogic
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@collabora.com>
CC: Neil Armstrong <neil.armstrong@linaro.org>
CC: Kevin Hilman <khilman@baylibre.com>
CC: Jerome Brunet <jbrunet@baylibre.com>
CC: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
CC: linux-amlogic@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
^ permalink raw reply related [flat|nested] 75+ messages in thread
* [PATCH 55/55] media: videobuf2: core: Remove 'min_buffers_needed' field
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
` (53 preceding siblings ...)
2023-11-27 16:54 ` [PATCH 54/55] media: meson: vdec: " Benjamin Gaignard
@ 2023-11-27 16:54 ` Benjamin Gaignard
54 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-27 16:54 UTC (permalink / raw)
To: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Benjamin Gaignard
After clean up all the drivers it is possible to remove this
field from vb2_queue structure. It has been replace by
'min_dma_buffers_needed' which indicates how many buffers
a dma engine needs before start streaming and 'min_reqbufs_allocation'
to let drivers specify the minimum number of buffers to be
allocated when calling VIDIO_REQBUFS
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
---
.../media/common/videobuf2/videobuf2-core.c | 25 ++++++-------------
include/media/videobuf2-core.h | 5 ----
2 files changed, 7 insertions(+), 23 deletions(-)
diff --git a/drivers/media/common/videobuf2/videobuf2-core.c b/drivers/media/common/videobuf2/videobuf2-core.c
index a6ec55db8635..223521cc135d 100644
--- a/drivers/media/common/videobuf2/videobuf2-core.c
+++ b/drivers/media/common/videobuf2/videobuf2-core.c
@@ -865,11 +865,10 @@ int vb2_core_reqbufs(struct vb2_queue *q, enum vb2_memory memory,
/*
* Make sure the requested values and current defaults are sane.
*/
- num_buffers = max_t(unsigned int, *count, q->min_buffers_needed);
if (q->min_reqbufs_allocation)
- num_buffers = max_t(unsigned int, num_buffers, q->min_reqbufs_allocation);
+ num_buffers = max_t(unsigned int, *count, q->min_reqbufs_allocation);
else
- num_buffers = max_t(unsigned int, num_buffers, q->min_dma_buffers_needed + 1);
+ num_buffers = max_t(unsigned int, *count, q->min_dma_buffers_needed + 1);
min_reqbufs_needed = num_buffers;
num_buffers = min_t(unsigned int, num_buffers, q->max_num_buffers);
memset(q->alloc_devs, 0, sizeof(q->alloc_devs));
@@ -1851,8 +1850,7 @@ int vb2_core_qbuf(struct vb2_queue *q, struct vb2_buffer *vb, void *pb,
* then we can finally call start_streaming().
*/
if (q->streaming && !q->start_streaming_called &&
- ((q->queued_count >= q->min_buffers_needed) ||
- (q->queued_count >= q->min_dma_buffers_needed))) {
+ q->queued_count >= q->min_dma_buffers_needed) {
ret = vb2_start_streaming(q);
if (ret) {
/*
@@ -2216,12 +2214,6 @@ int vb2_core_streamon(struct vb2_queue *q, unsigned int type)
return -EINVAL;
}
- if (q_num_bufs < q->min_buffers_needed) {
- dprintk(q, 1, "need at least %u allocated buffers\n",
- q->min_buffers_needed);
- return -EINVAL;
- }
-
if (q_num_bufs < q->min_dma_buffers_needed) {
dprintk(q, 1, "need at least %u allocated buffers\n",
q->min_dma_buffers_needed);
@@ -2236,8 +2228,7 @@ int vb2_core_streamon(struct vb2_queue *q, unsigned int type)
* Tell driver to start streaming provided sufficient buffers
* are available.
*/
- if (q->queued_count >= q->min_buffers_needed &&
- q->queued_count >= q->min_dma_buffers_needed) {
+ if (q->queued_count >= q->min_dma_buffers_needed) {
ret = vb2_start_streaming(q);
if (ret)
goto unprepare;
@@ -2517,8 +2508,7 @@ int vb2_core_queue_init(struct vb2_queue *q)
return -EINVAL;
if (WARN_ON(q->max_num_buffers > MAX_BUFFER_INDEX) ||
- WARN_ON(q->min_dma_buffers_needed > q->max_num_buffers) ||
- WARN_ON(q->min_buffers_needed > q->max_num_buffers))
+ WARN_ON(q->min_dma_buffers_needed > q->max_num_buffers))
return -EINVAL;
if (WARN_ON(q->requires_requests && !q->supports_requests))
@@ -2526,14 +2516,13 @@ int vb2_core_queue_init(struct vb2_queue *q)
/*
* This combination is not allowed since a non-zero value of
- * q->min_buffers_needed can cause vb2_core_qbuf() to fail if
+ * q->min_dma_buffers_needed can cause vb2_core_qbuf() to fail if
* it has to call start_streaming(), and the Request API expects
* that queueing a request (and thus queueing a buffer contained
* in that request) will always succeed. There is no method of
* propagating an error back to userspace.
*/
- if (WARN_ON(q->supports_requests &&
- (q->min_buffers_needed || q->min_dma_buffers_needed)))
+ if (WARN_ON(q->supports_requests && q->min_dma_buffers_needed))
return -EINVAL;
INIT_LIST_HEAD(&q->queued_list);
diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h
index 0bc97f28a7ea..353dccee7a30 100644
--- a/include/media/videobuf2-core.h
+++ b/include/media/videobuf2-core.h
@@ -546,10 +546,6 @@ struct vb2_buf_ops {
* @gfp_flags: additional gfp flags used when allocating the buffers.
* Typically this is 0, but it may be e.g. %GFP_DMA or %__GFP_DMA32
* to force the buffer allocation to a specific memory zone.
- * @min_buffers_needed: the minimum number of buffers needed before
- * @start_streaming can be called. Used when a DMA engine
- * cannot be started unless at least this number of buffers
- * have been queued into the driver. (Deprecated)
* @min_dma_buffers_needed: the minimum number of buffers needed before
* @start_streaming can be called. Used when a DMA engine
* cannot be started unless at least this number of buffers
@@ -623,7 +619,6 @@ struct vb2_queue {
unsigned int buf_struct_size;
u32 timestamp_flags;
gfp_t gfp_flags;
- u32 min_buffers_needed;
u32 min_dma_buffers_needed;
u32 min_reqbufs_allocation;
--
2.39.2
^ permalink raw reply related [flat|nested] 75+ messages in thread
* Re: [PATCH 02/55] media: test-drivers: Stop abusing of min_buffers_needed field
2023-11-27 16:54 ` [PATCH 02/55] media: test-drivers: Stop abusing of min_buffers_needed field Benjamin Gaignard
@ 2023-11-27 17:00 ` Shuah Khan
2023-11-28 9:27 ` Benjamin Gaignard
0 siblings, 1 reply; 75+ messages in thread
From: Shuah Khan @ 2023-11-27 17:00 UTC (permalink / raw)
To: Benjamin Gaignard, hverkuil, mchehab, tfiga, m.szyprowski,
matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel, Kieran Bingham,
Shuah Khan
On 11/27/23 09:54, Benjamin Gaignard wrote:
> 'min_buffers_needed' is suppose to be used to indicate the number
> of buffers needed by DMA engine to start streaming.
> Obvious test-drivers don'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.
> While at it rename function parameter.
>
So how ate the test-drivers currently abusing this field
and how does this change benefit?
I don't have objections to this change, I want to understand
it a bit more. I would like to see more details on why this
change is needed.
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 75+ messages in thread
* Re: [PATCH 07/55] media: imx8-isi: Stop abusing of min_buffers_needed field
2023-11-27 16:54 ` [PATCH 07/55] media: imx8-isi: " Benjamin Gaignard
@ 2023-11-27 17:07 ` Laurent Pinchart
2023-11-28 9:31 ` Benjamin Gaignard
0 siblings, 1 reply; 75+ messages in thread
From: Laurent Pinchart @ 2023-11-27 17:07 UTC (permalink / raw)
To: Benjamin Gaignard
Cc: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay,
linux-kernel, linux-media, linux-staging, kernel, Shawn Guo,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
NXP Linux Team
Hi Benjamin,
Thank you for the patch.
On Mon, Nov 27, 2023 at 05:54:06PM +0100, Benjamin Gaignard wrote:
> 'min_buffers_needed' is suppose to be used to indicate the number
> of buffers needed by DMA engine to start streaming.
> imx8-isi driver doesn't use DMA engine and just want to specify
What do you mean, "doesn't use DMA engine" ? The ISI surely has DMA
engines :-)
> 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@collabora.com>
> CC: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> CC: Mauro Carvalho Chehab <mchehab@kernel.org>
> CC: Shawn Guo <shawnguo@kernel.org>
> CC: Sascha Hauer <s.hauer@pengutronix.de>
> CC: Pengutronix Kernel Team <kernel@pengutronix.de>
> CC: Fabio Estevam <festevam@gmail.com>
> CC: NXP Linux Team <linux-imx@nxp.com>
> ---
> drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
> index 49bca2b01cc6..81673ff9084b 100644
> --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
> +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
> @@ -1453,7 +1453,7 @@ int mxc_isi_video_register(struct mxc_isi_pipe *pipe,
> q->mem_ops = &vb2_dma_contig_memops;
> q->buf_struct_size = sizeof(struct mxc_isi_buffer);
> q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
> - q->min_buffers_needed = 2;
> + q->min_reqbufs_allocation = 2;
> q->lock = &video->lock;
> q->dev = pipe->isi->dev;
>
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 75+ messages in thread
* Re: [PATCH 13/55] media: aspeed: Stop abusing of min_buffers_needed field
2023-11-27 16:54 ` [PATCH 13/55] media: aspeed: " Benjamin Gaignard
@ 2023-11-27 19:26 ` Eddie James
0 siblings, 0 replies; 75+ messages in thread
From: Eddie James @ 2023-11-27 19:26 UTC (permalink / raw)
To: Benjamin Gaignard, hverkuil, mchehab, tfiga, m.szyprowski,
matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel, Joel Stanley,
Andrew Jeffery, openbmc, linux-aspeed
On 11/27/23 10:54, Benjamin Gaignard wrote:
> 'min_buffers_needed' is suppose to be used to indicate the number
> of buffers needed by DMA engine to start streaming.
> aspeed 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.
Reviewed-by: Eddie James <eajames@linux.ibm.com>
>
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
> CC: Eddie James <eajames@linux.ibm.com> (maintainer:ASPEED VIDEO ENGINE DRIVER)
> CC: Joel Stanley <joel@jms.id.au> (supporter:ARM/ASPEED MACHINE SUPPORT)
> CC: Andrew Jeffery <andrew@codeconstruct.com.au> (reviewer:ARM/ASPEED MACHINE SUPPORT)
> CC: openbmc@lists.ozlabs.org (moderated list:ASPEED VIDEO ENGINE DRIVER)
> CC: linux-aspeed@lists.ozlabs.org (moderated list:ARM/ASPEED MACHINE SUPPORT)
> ---
> drivers/media/platform/aspeed/aspeed-video.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/aspeed/aspeed-video.c b/drivers/media/platform/aspeed/aspeed-video.c
> index d08aa7f73d4f..c28b10808cda 100644
> --- a/drivers/media/platform/aspeed/aspeed-video.c
> +++ b/drivers/media/platform/aspeed/aspeed-video.c
> @@ -2034,7 +2034,7 @@ static int aspeed_video_setup_video(struct aspeed_video *video)
> vbq->drv_priv = video;
> vbq->buf_struct_size = sizeof(struct aspeed_video_buffer);
> vbq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
> - vbq->min_buffers_needed = ASPEED_VIDEO_V4L2_MIN_BUF_REQ;
> + vbq->min_reqbufs_allocation = ASPEED_VIDEO_V4L2_MIN_BUF_REQ;
>
> rc = vb2_queue_init(vbq);
> if (rc) {
^ permalink raw reply [flat|nested] 75+ messages in thread
* Re: [PATCH 02/55] media: test-drivers: Stop abusing of min_buffers_needed field
2023-11-27 17:00 ` Shuah Khan
@ 2023-11-28 9:27 ` Benjamin Gaignard
0 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-28 9:27 UTC (permalink / raw)
To: Shuah Khan, hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel, Kieran Bingham
Le 27/11/2023 à 18:00, Shuah Khan a écrit :
> On 11/27/23 09:54, Benjamin Gaignard wrote:
>> 'min_buffers_needed' is suppose to be used to indicate the number
>> of buffers needed by DMA engine to start streaming.
>> Obvious test-drivers don'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.
>> While at it rename function parameter.
>>
>
> So how ate the test-drivers currently abusing this field
> and how does this change benefit?
In videobuf2-core.h min_buffers_needed is documemented as:
"the minimum number of buffers needed before @start_streaming can be called.
Used when a DMA engine cannot be started unless at least this number of buffers have been queued into the driver."
Test-drivers don't use DMA engine so they (ab)use of this variable, like Hans said in this RFC:
https://www.spinics.net/lists/linux-media/msg244455.html
The goal of this series is to distinguish the minimum number of buffers to be allocated in VIDIOC_REQBUF
versus the minimum numbers of buffers needed before start streaming.
Regards,
Benjamin
>
> I don't have objections to this change, I want to understand
> it a bit more. I would like to see more details on why this
> change is needed.
>
> thanks,
> -- Shuah
^ permalink raw reply [flat|nested] 75+ messages in thread
* Re: [PATCH 07/55] media: imx8-isi: Stop abusing of min_buffers_needed field
2023-11-27 17:07 ` Laurent Pinchart
@ 2023-11-28 9:31 ` Benjamin Gaignard
2023-11-28 9:35 ` Tomasz Figa
0 siblings, 1 reply; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-28 9:31 UTC (permalink / raw)
To: Laurent Pinchart
Cc: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay,
linux-kernel, linux-media, linux-staging, kernel, Shawn Guo,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
NXP Linux Team
Le 27/11/2023 à 18:07, Laurent Pinchart a écrit :
> Hi Benjamin,
>
> Thank you for the patch.
>
> On Mon, Nov 27, 2023 at 05:54:06PM +0100, Benjamin Gaignard wrote:
>> 'min_buffers_needed' is suppose to be used to indicate the number
>> of buffers needed by DMA engine to start streaming.
>> imx8-isi driver doesn't use DMA engine and just want to specify
> What do you mean, "doesn't use DMA engine" ? The ISI surely has DMA
> engines :-)
I have done assumption on drivers given if they use or dma_* functions.
I have considers that all PCI drivers are using DMA engine and
I don't know the design for each drivers so I hope to get this information
from maintainers and fix that in v2.
If imx8-isi driver needs a minimum number of buffers before start streaming
I will do a v2 and use min_dma_buffers_needed instead.
Regards,
Benjamin
>
>> 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@collabora.com>
>> CC: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>> CC: Mauro Carvalho Chehab <mchehab@kernel.org>
>> CC: Shawn Guo <shawnguo@kernel.org>
>> CC: Sascha Hauer <s.hauer@pengutronix.de>
>> CC: Pengutronix Kernel Team <kernel@pengutronix.de>
>> CC: Fabio Estevam <festevam@gmail.com>
>> CC: NXP Linux Team <linux-imx@nxp.com>
>> ---
>> drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
>> index 49bca2b01cc6..81673ff9084b 100644
>> --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
>> +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
>> @@ -1453,7 +1453,7 @@ int mxc_isi_video_register(struct mxc_isi_pipe *pipe,
>> q->mem_ops = &vb2_dma_contig_memops;
>> q->buf_struct_size = sizeof(struct mxc_isi_buffer);
>> q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
>> - q->min_buffers_needed = 2;
>> + q->min_reqbufs_allocation = 2;
>> q->lock = &video->lock;
>> q->dev = pipe->isi->dev;
>>
^ permalink raw reply [flat|nested] 75+ messages in thread
* Re: [PATCH 07/55] media: imx8-isi: Stop abusing of min_buffers_needed field
2023-11-28 9:31 ` Benjamin Gaignard
@ 2023-11-28 9:35 ` Tomasz Figa
2023-11-28 10:26 ` Benjamin Gaignard
2023-11-28 10:31 ` Laurent Pinchart
0 siblings, 2 replies; 75+ messages in thread
From: Tomasz Figa @ 2023-11-28 9:35 UTC (permalink / raw)
To: Benjamin Gaignard
Cc: Laurent Pinchart, hverkuil, mchehab, m.szyprowski, matt.ranostay,
linux-kernel, linux-media, linux-staging, kernel, Shawn Guo,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
NXP Linux Team
On Tue, Nov 28, 2023 at 6:31 PM Benjamin Gaignard
<benjamin.gaignard@collabora.com> wrote:
>
>
> Le 27/11/2023 à 18:07, Laurent Pinchart a écrit :
> > Hi Benjamin,
> >
> > Thank you for the patch.
> >
> > On Mon, Nov 27, 2023 at 05:54:06PM +0100, Benjamin Gaignard wrote:
> >> 'min_buffers_needed' is suppose to be used to indicate the number
> >> of buffers needed by DMA engine to start streaming.
> >> imx8-isi driver doesn't use DMA engine and just want to specify
> > What do you mean, "doesn't use DMA engine" ? The ISI surely has DMA
> > engines :-)
>
> I have done assumption on drivers given if they use or dma_* functions.
I suspect the use of vb2_dma_sg_plane_desc() and
vb2_dma_contig_plane_dma_addr() may be more correlated to whether
there is a DMA involved or not. Usually V4L2 drivers don't really have
to deal with the DMA API explicitly, because the vb2 framework handles
most of the work.
Best regards,
Tomasz
> I have considers that all PCI drivers are using DMA engine and
> I don't know the design for each drivers so I hope to get this information
> from maintainers and fix that in v2.
> If imx8-isi driver needs a minimum number of buffers before start streaming
> I will do a v2 and use min_dma_buffers_needed instead.
>
> Regards,
> Benjamin
>
> >
> >> 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@collabora.com>
> >> CC: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> >> CC: Mauro Carvalho Chehab <mchehab@kernel.org>
> >> CC: Shawn Guo <shawnguo@kernel.org>
> >> CC: Sascha Hauer <s.hauer@pengutronix.de>
> >> CC: Pengutronix Kernel Team <kernel@pengutronix.de>
> >> CC: Fabio Estevam <festevam@gmail.com>
> >> CC: NXP Linux Team <linux-imx@nxp.com>
> >> ---
> >> drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c | 2 +-
> >> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
> >> index 49bca2b01cc6..81673ff9084b 100644
> >> --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
> >> +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
> >> @@ -1453,7 +1453,7 @@ int mxc_isi_video_register(struct mxc_isi_pipe *pipe,
> >> q->mem_ops = &vb2_dma_contig_memops;
> >> q->buf_struct_size = sizeof(struct mxc_isi_buffer);
> >> q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
> >> - q->min_buffers_needed = 2;
> >> + q->min_reqbufs_allocation = 2;
> >> q->lock = &video->lock;
> >> q->dev = pipe->isi->dev;
> >>
^ permalink raw reply [flat|nested] 75+ messages in thread
* Re: [PATCH 03/55] media: usb: cx231xx: Stop abusing of min_buffers_needed field
2023-11-27 16:54 ` [PATCH 03/55] media: usb: cx231xx: " Benjamin Gaignard
@ 2023-11-28 10:18 ` Hans Verkuil
2023-11-28 10:23 ` Benjamin Gaignard
0 siblings, 1 reply; 75+ messages in thread
From: Hans Verkuil @ 2023-11-28 10:18 UTC (permalink / raw)
To: Benjamin Gaignard, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel
On 27/11/2023 17:54, Benjamin Gaignard wrote:
> 'min_buffers_needed' is suppose to be used to indicate the number
> of buffers needed by DMA engine to start streaming.
> cx231xx 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@collabora.com>
> ---
> drivers/media/usb/cx231xx/cx231xx-417.c | 2 +-
> drivers/media/usb/cx231xx/cx231xx-video.c | 4 ++--
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/media/usb/cx231xx/cx231xx-417.c b/drivers/media/usb/cx231xx/cx231xx-417.c
> index 45973fe690b2..66043ed50c8e 100644
> --- a/drivers/media/usb/cx231xx/cx231xx-417.c
> +++ b/drivers/media/usb/cx231xx/cx231xx-417.c
> @@ -1782,7 +1782,7 @@ int cx231xx_417_register(struct cx231xx *dev)
> q->ops = &cx231xx_video_qops;
> q->mem_ops = &vb2_vmalloc_memops;
> q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
> - q->min_buffers_needed = 1;
> + q->min_reqbufs_allocation = 1;
There is no point setting min_reqbufs_allocation to 1: you can't allocate
less than 1 buffer after all.
It is different in that respect from min_buffers_needed: you can call
VIDIOC_STREAMON (and thus start_streaming) without any buffers queued.
This also suggests a better name for min_buffers_needed: min_queued_buffers
So 'min_queued_buffers' buffers have to be queued before start_streaming can
be called.
The old min_buffers_needed mixed up the two requirements of the minimum
number of buffers to allocate in REQBUFS and the minimum number of buffers
that need to be queued before you can start streaming. Separating these two
meanings should make things easier to understand.
The only relationship between the two is that min_reqbufs_allocation >
min_queued_buffers, otherwise you would end up in a state where the
driver would just cycle buffers and never be able to return a buffer
to userspace to process.
Regards,
Hans
> q->lock = &dev->lock;
> err = vb2_queue_init(q);
> if (err)
> diff --git a/drivers/media/usb/cx231xx/cx231xx-video.c b/drivers/media/usb/cx231xx/cx231xx-video.c
> index c8eb4222319d..df572c466bfb 100644
> --- a/drivers/media/usb/cx231xx/cx231xx-video.c
> +++ b/drivers/media/usb/cx231xx/cx231xx-video.c
> @@ -1811,7 +1811,7 @@ int cx231xx_register_analog_devices(struct cx231xx *dev)
> q->ops = &cx231xx_video_qops;
> q->mem_ops = &vb2_vmalloc_memops;
> q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
> - q->min_buffers_needed = 1;
> + q->min_reqbufs_allocation = 1;
> q->lock = &dev->lock;
> ret = vb2_queue_init(q);
> if (ret)
> @@ -1871,7 +1871,7 @@ int cx231xx_register_analog_devices(struct cx231xx *dev)
> q->ops = &cx231xx_vbi_qops;
> q->mem_ops = &vb2_vmalloc_memops;
> q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
> - q->min_buffers_needed = 1;
> + q->min_reqbufs_allocation = 1;
> q->lock = &dev->lock;
> ret = vb2_queue_init(q);
> if (ret)
^ permalink raw reply [flat|nested] 75+ messages in thread
* Re: [PATCH 03/55] media: usb: cx231xx: Stop abusing of min_buffers_needed field
2023-11-28 10:18 ` Hans Verkuil
@ 2023-11-28 10:23 ` Benjamin Gaignard
0 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-28 10:23 UTC (permalink / raw)
To: Hans Verkuil, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel
Le 28/11/2023 à 11:18, Hans Verkuil a écrit :
> On 27/11/2023 17:54, Benjamin Gaignard wrote:
>> 'min_buffers_needed' is suppose to be used to indicate the number
>> of buffers needed by DMA engine to start streaming.
>> cx231xx 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@collabora.com>
>> ---
>> drivers/media/usb/cx231xx/cx231xx-417.c | 2 +-
>> drivers/media/usb/cx231xx/cx231xx-video.c | 4 ++--
>> 2 files changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/media/usb/cx231xx/cx231xx-417.c b/drivers/media/usb/cx231xx/cx231xx-417.c
>> index 45973fe690b2..66043ed50c8e 100644
>> --- a/drivers/media/usb/cx231xx/cx231xx-417.c
>> +++ b/drivers/media/usb/cx231xx/cx231xx-417.c
>> @@ -1782,7 +1782,7 @@ int cx231xx_417_register(struct cx231xx *dev)
>> q->ops = &cx231xx_video_qops;
>> q->mem_ops = &vb2_vmalloc_memops;
>> q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
>> - q->min_buffers_needed = 1;
>> + q->min_reqbufs_allocation = 1;
> There is no point setting min_reqbufs_allocation to 1: you can't allocate
> less than 1 buffer after all.
Does that mean I should just remove this line ?
>
> It is different in that respect from min_buffers_needed: you can call
> VIDIOC_STREAMON (and thus start_streaming) without any buffers queued.
>
> This also suggests a better name for min_buffers_needed: min_queued_buffers
>
> So 'min_queued_buffers' buffers have to be queued before start_streaming can
> be called.
Ok I will change that in V2
Regards,
Benjamin
>
> The old min_buffers_needed mixed up the two requirements of the minimum
> number of buffers to allocate in REQBUFS and the minimum number of buffers
> that need to be queued before you can start streaming. Separating these two
> meanings should make things easier to understand.
>
> The only relationship between the two is that min_reqbufs_allocation >
> min_queued_buffers, otherwise you would end up in a state where the
> driver would just cycle buffers and never be able to return a buffer
> to userspace to process.
>
> Regards,
>
> Hans
>
>> q->lock = &dev->lock;
>> err = vb2_queue_init(q);
>> if (err)
>> diff --git a/drivers/media/usb/cx231xx/cx231xx-video.c b/drivers/media/usb/cx231xx/cx231xx-video.c
>> index c8eb4222319d..df572c466bfb 100644
>> --- a/drivers/media/usb/cx231xx/cx231xx-video.c
>> +++ b/drivers/media/usb/cx231xx/cx231xx-video.c
>> @@ -1811,7 +1811,7 @@ int cx231xx_register_analog_devices(struct cx231xx *dev)
>> q->ops = &cx231xx_video_qops;
>> q->mem_ops = &vb2_vmalloc_memops;
>> q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
>> - q->min_buffers_needed = 1;
>> + q->min_reqbufs_allocation = 1;
>> q->lock = &dev->lock;
>> ret = vb2_queue_init(q);
>> if (ret)
>> @@ -1871,7 +1871,7 @@ int cx231xx_register_analog_devices(struct cx231xx *dev)
>> q->ops = &cx231xx_vbi_qops;
>> q->mem_ops = &vb2_vmalloc_memops;
>> q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
>> - q->min_buffers_needed = 1;
>> + q->min_reqbufs_allocation = 1;
>> q->lock = &dev->lock;
>> ret = vb2_queue_init(q);
>> if (ret)
>
^ permalink raw reply [flat|nested] 75+ messages in thread
* Re: [PATCH 16/55] media: qcom: venus: Stop abusing of min_buffers_needed field
2023-11-27 16:54 ` [PATCH 16/55] media: qcom: venus: " Benjamin Gaignard
@ 2023-11-28 10:26 ` Hans Verkuil
2023-11-29 9:48 ` Tomasz Figa
0 siblings, 1 reply; 75+ messages in thread
From: Hans Verkuil @ 2023-11-28 10:26 UTC (permalink / raw)
To: Benjamin Gaignard, mchehab, tfiga, m.szyprowski, matt.ranostay
Cc: linux-kernel, linux-media, linux-staging, kernel,
Stanimir Varbanov, Vikash Garodia, Bryan O'Donoghue,
Andy Gross, Bjorn Andersson, Konrad Dybcio, linux-arm-msm
On 27/11/2023 17:54, Benjamin Gaignard wrote:
> 'min_buffers_needed' is suppose to be used to indicate the number
> of buffers needed by DMA engine to start streaming.
> venus 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@collabora.com>
> CC: Stanimir Varbanov <stanimir.k.varbanov@gmail.com> (maintainer:QUALCOMM VENUS VIDEO ACCELERATOR DRIVER)
> CC: Vikash Garodia <quic_vgarodia@quicinc.com> (maintainer:QUALCOMM VENUS VIDEO ACCELERATOR DRIVER)
> CC: "Bryan O'Donoghue" <bryan.odonoghue@linaro.org> (reviewer:QUALCOMM VENUS VIDEO ACCELERATOR DRIVER)
> CC: Andy Gross <agross@kernel.org> (maintainer:ARM/QUALCOMM SUPPORT)
> CC: Bjorn Andersson <andersson@kernel.org> (maintainer:ARM/QUALCOMM SUPPORT)
> CC: Konrad Dybcio <konrad.dybcio@linaro.org> (maintainer:ARM/QUALCOMM SUPPORT)
> CC: linux-arm-msm@vger.kernel.org
> ---
> drivers/media/platform/qcom/venus/vdec.c | 4 ++--
> drivers/media/platform/qcom/venus/venc.c | 4 ++--
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c
> index dbf305cec120..16b8d0dde10d 100644
> --- a/drivers/media/platform/qcom/venus/vdec.c
> +++ b/drivers/media/platform/qcom/venus/vdec.c
> @@ -1641,7 +1641,7 @@ static int m2m_queue_init(void *priv, struct vb2_queue *src_vq,
> src_vq->drv_priv = inst;
> src_vq->buf_struct_size = sizeof(struct venus_buffer);
> src_vq->allow_zero_bytesused = 1;
> - src_vq->min_buffers_needed = 0;
> + src_vq->min_reqbufs_allocation = 0;
Just drop this.
> src_vq->dev = inst->core->dev;
> src_vq->lock = &inst->ctx_q_lock;
> ret = vb2_queue_init(src_vq);
> @@ -1656,7 +1656,7 @@ static int m2m_queue_init(void *priv, struct vb2_queue *src_vq,
> dst_vq->drv_priv = inst;
> dst_vq->buf_struct_size = sizeof(struct venus_buffer);
> dst_vq->allow_zero_bytesused = 1;
> - dst_vq->min_buffers_needed = 0;
> + dst_vq->min_reqbufs_allocation = 0;
> dst_vq->dev = inst->core->dev;
> dst_vq->lock = &inst->ctx_q_lock;
> return vb2_queue_init(dst_vq);
> diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c
> index 44b13696cf82..e399d01c208c 100644
> --- a/drivers/media/platform/qcom/venus/venc.c
> +++ b/drivers/media/platform/qcom/venus/venc.c
> @@ -1398,7 +1398,7 @@ static int m2m_queue_init(void *priv, struct vb2_queue *src_vq,
> src_vq->drv_priv = inst;
> src_vq->buf_struct_size = sizeof(struct venus_buffer);
> src_vq->allow_zero_bytesused = 1;
> - src_vq->min_buffers_needed = 1;
> + src_vq->min_reqbufs_allocation = 1;
So for platform drivers like this it is going to be more difficult to
determine which meaning min_buffers_needed had: is at least one queued
buffer needed before you can start streaming, or is this for a minimum
buffer allocation?
In the case of m2m devices using the v4l2-mem2mem framework it is almost
certainly the minimum buffer allocation since the m2m framework already
checks that there are input and output buffers queued (__v4l2_m2m_try_queue).
So just delete the src_vq->min_buffers_needed = 1; line, and there is
no need to set min_reqbufs_allocation.
> src_vq->dev = inst->core->dev;
> src_vq->lock = &inst->ctx_q_lock;
> if (inst->core->res->hfi_version == HFI_VERSION_1XX)
> @@ -1415,7 +1415,7 @@ static int m2m_queue_init(void *priv, struct vb2_queue *src_vq,
> dst_vq->drv_priv = inst;
> dst_vq->buf_struct_size = sizeof(struct venus_buffer);
> dst_vq->allow_zero_bytesused = 1;
> - dst_vq->min_buffers_needed = 1;
> + dst_vq->min_reqbufs_allocation = 1;
> dst_vq->dev = inst->core->dev;
> dst_vq->lock = &inst->ctx_q_lock;
> return vb2_queue_init(dst_vq);
Ditto.
Regards,
Hans
^ permalink raw reply [flat|nested] 75+ messages in thread
* Re: [PATCH 07/55] media: imx8-isi: Stop abusing of min_buffers_needed field
2023-11-28 9:35 ` Tomasz Figa
@ 2023-11-28 10:26 ` Benjamin Gaignard
2023-11-29 4:17 ` Tomasz Figa
2023-11-28 10:31 ` Laurent Pinchart
1 sibling, 1 reply; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-28 10:26 UTC (permalink / raw)
To: Tomasz Figa
Cc: Laurent Pinchart, hverkuil, mchehab, m.szyprowski, matt.ranostay,
linux-kernel, linux-media, linux-staging, kernel, Shawn Guo,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
NXP Linux Team
Le 28/11/2023 à 10:35, Tomasz Figa a écrit :
> On Tue, Nov 28, 2023 at 6:31 PM Benjamin Gaignard
> <benjamin.gaignard@collabora.com> wrote:
>>
>> Le 27/11/2023 à 18:07, Laurent Pinchart a écrit :
>>> Hi Benjamin,
>>>
>>> Thank you for the patch.
>>>
>>> On Mon, Nov 27, 2023 at 05:54:06PM +0100, Benjamin Gaignard wrote:
>>>> 'min_buffers_needed' is suppose to be used to indicate the number
>>>> of buffers needed by DMA engine to start streaming.
>>>> imx8-isi driver doesn't use DMA engine and just want to specify
>>> What do you mean, "doesn't use DMA engine" ? The ISI surely has DMA
>>> engines :-)
>> I have done assumption on drivers given if they use or dma_* functions.
> I suspect the use of vb2_dma_sg_plane_desc() and
> vb2_dma_contig_plane_dma_addr() may be more correlated to whether
> there is a DMA involved or not. Usually V4L2 drivers don't really have
> to deal with the DMA API explicitly, because the vb2 framework handles
> most of the work.
Unfortunately isn't not true either, for example verisilicon driver use
these function but doesn't need DMA engine.
I haven't found yet a 100% criteria to decide if driver use or not DMA engine
so I plan to fix case by case given maintainers remarks.
Regards,
Benjamin
>
> Best regards,
> Tomasz
>
>> I have considers that all PCI drivers are using DMA engine and
>> I don't know the design for each drivers so I hope to get this information
>> from maintainers and fix that in v2.
>> If imx8-isi driver needs a minimum number of buffers before start streaming
>> I will do a v2 and use min_dma_buffers_needed instead.
>>
>> Regards,
>> Benjamin
>>
>>>> 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@collabora.com>
>>>> CC: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>>>> CC: Mauro Carvalho Chehab <mchehab@kernel.org>
>>>> CC: Shawn Guo <shawnguo@kernel.org>
>>>> CC: Sascha Hauer <s.hauer@pengutronix.de>
>>>> CC: Pengutronix Kernel Team <kernel@pengutronix.de>
>>>> CC: Fabio Estevam <festevam@gmail.com>
>>>> CC: NXP Linux Team <linux-imx@nxp.com>
>>>> ---
>>>> drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c | 2 +-
>>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>>
>>>> diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
>>>> index 49bca2b01cc6..81673ff9084b 100644
>>>> --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
>>>> +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
>>>> @@ -1453,7 +1453,7 @@ int mxc_isi_video_register(struct mxc_isi_pipe *pipe,
>>>> q->mem_ops = &vb2_dma_contig_memops;
>>>> q->buf_struct_size = sizeof(struct mxc_isi_buffer);
>>>> q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
>>>> - q->min_buffers_needed = 2;
>>>> + q->min_reqbufs_allocation = 2;
>>>> q->lock = &video->lock;
>>>> q->dev = pipe->isi->dev;
>>>>
^ permalink raw reply [flat|nested] 75+ messages in thread
* Re: [PATCH 07/55] media: imx8-isi: Stop abusing of min_buffers_needed field
2023-11-28 9:35 ` Tomasz Figa
2023-11-28 10:26 ` Benjamin Gaignard
@ 2023-11-28 10:31 ` Laurent Pinchart
2023-12-07 18:33 ` Nicolas Dufresne
1 sibling, 1 reply; 75+ messages in thread
From: Laurent Pinchart @ 2023-11-28 10:31 UTC (permalink / raw)
To: Tomasz Figa
Cc: Benjamin Gaignard, hverkuil, mchehab, m.szyprowski, matt.ranostay,
linux-kernel, linux-media, linux-staging, kernel, Shawn Guo,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
NXP Linux Team
On Tue, Nov 28, 2023 at 06:35:51PM +0900, Tomasz Figa wrote:
> On Tue, Nov 28, 2023 at 6:31 PM Benjamin Gaignard wrote:
> > Le 27/11/2023 à 18:07, Laurent Pinchart a écrit :
> > > Hi Benjamin,
> > >
> > > Thank you for the patch.
> > >
> > > On Mon, Nov 27, 2023 at 05:54:06PM +0100, Benjamin Gaignard wrote:
> > >> 'min_buffers_needed' is suppose to be used to indicate the number
> > >> of buffers needed by DMA engine to start streaming.
> > >> imx8-isi driver doesn't use DMA engine and just want to specify
> > > What do you mean, "doesn't use DMA engine" ? The ISI surely has DMA
> > > engines :-)
> >
> > I have done assumption on drivers given if they use or dma_* functions.
>
> I suspect the use of vb2_dma_sg_plane_desc() and
> vb2_dma_contig_plane_dma_addr() may be more correlated to whether
> there is a DMA involved or not. Usually V4L2 drivers don't really have
> to deal with the DMA API explicitly, because the vb2 framework handles
> most of the work.
And this is anyway not related to DMA at all, but to the logic each
driver implements when it deals with buffers. There's a lower chance a
USB driver driver will have a hard requirement for more than one buffer
compared to an AMBA/platform/PCI device driver, but at the end of the
day, each driver needs to be analyzed individually to check what they
require. Benjamin, I think you'll have some more homework to do :-)
> > I have considers that all PCI drivers are using DMA engine and
> > I don't know the design for each drivers so I hope to get this information
> > from maintainers and fix that in v2.
> > If imx8-isi driver needs a minimum number of buffers before start streaming
> > I will do a v2 and use min_dma_buffers_needed instead.
> >
> > >> 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@collabora.com>
> > >> CC: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > >> CC: Mauro Carvalho Chehab <mchehab@kernel.org>
> > >> CC: Shawn Guo <shawnguo@kernel.org>
> > >> CC: Sascha Hauer <s.hauer@pengutronix.de>
> > >> CC: Pengutronix Kernel Team <kernel@pengutronix.de>
> > >> CC: Fabio Estevam <festevam@gmail.com>
> > >> CC: NXP Linux Team <linux-imx@nxp.com>
> > >> ---
> > >> drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c | 2 +-
> > >> 1 file changed, 1 insertion(+), 1 deletion(-)
> > >>
> > >> diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
> > >> index 49bca2b01cc6..81673ff9084b 100644
> > >> --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
> > >> +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
> > >> @@ -1453,7 +1453,7 @@ int mxc_isi_video_register(struct mxc_isi_pipe *pipe,
> > >> q->mem_ops = &vb2_dma_contig_memops;
> > >> q->buf_struct_size = sizeof(struct mxc_isi_buffer);
> > >> q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
> > >> - q->min_buffers_needed = 2;
> > >> + q->min_reqbufs_allocation = 2;
> > >> q->lock = &video->lock;
> > >> q->dev = pipe->isi->dev;
> > >>
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 75+ messages in thread
* Re: [PATCH 07/55] media: imx8-isi: Stop abusing of min_buffers_needed field
2023-11-28 10:26 ` Benjamin Gaignard
@ 2023-11-29 4:17 ` Tomasz Figa
2023-11-29 8:28 ` Benjamin Gaignard
0 siblings, 1 reply; 75+ messages in thread
From: Tomasz Figa @ 2023-11-29 4:17 UTC (permalink / raw)
To: Benjamin Gaignard
Cc: Laurent Pinchart, hverkuil, mchehab, m.szyprowski, matt.ranostay,
linux-kernel, linux-media, linux-staging, kernel, Shawn Guo,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
NXP Linux Team
On Tue, Nov 28, 2023 at 7:26 PM Benjamin Gaignard
<benjamin.gaignard@collabora.com> wrote:
>
>
> Le 28/11/2023 à 10:35, Tomasz Figa a écrit :
> > On Tue, Nov 28, 2023 at 6:31 PM Benjamin Gaignard
> > <benjamin.gaignard@collabora.com> wrote:
> >>
> >> Le 27/11/2023 à 18:07, Laurent Pinchart a écrit :
> >>> Hi Benjamin,
> >>>
> >>> Thank you for the patch.
> >>>
> >>> On Mon, Nov 27, 2023 at 05:54:06PM +0100, Benjamin Gaignard wrote:
> >>>> 'min_buffers_needed' is suppose to be used to indicate the number
> >>>> of buffers needed by DMA engine to start streaming.
> >>>> imx8-isi driver doesn't use DMA engine and just want to specify
> >>> What do you mean, "doesn't use DMA engine" ? The ISI surely has DMA
> >>> engines :-)
> >> I have done assumption on drivers given if they use or dma_* functions.
> > I suspect the use of vb2_dma_sg_plane_desc() and
> > vb2_dma_contig_plane_dma_addr() may be more correlated to whether
> > there is a DMA involved or not. Usually V4L2 drivers don't really have
> > to deal with the DMA API explicitly, because the vb2 framework handles
> > most of the work.
>
> Unfortunately isn't not true either, for example verisilicon driver use
> these function but doesn't need DMA engine.
That sounds weird. Why would a driver that doesn't have a DMA engine
need to obtain a scatterlist or the DMA address of the buffer?
> I haven't found yet a 100% criteria to decide if driver use or not DMA engine
> so I plan to fix case by case given maintainers remarks.
Yeah, there probably wouldn't be a way that would give one a 100%
certainty, although I'd still insist that the two functions I
mentioned should be close to that. Of course a driver can use those
functions for some queues, while other queues would be pure software
queues, e.g. for some metadata - a simple grep is not enough. Is that
perhaps the case for the verisilicon driver?
Best regards,
Tomasz
>
> Regards,
> Benjamin
>
> >
> > Best regards,
> > Tomasz
> >
> >> I have considers that all PCI drivers are using DMA engine and
> >> I don't know the design for each drivers so I hope to get this information
> >> from maintainers and fix that in v2.
> >> If imx8-isi driver needs a minimum number of buffers before start streaming
> >> I will do a v2 and use min_dma_buffers_needed instead.
> >>
> >> Regards,
> >> Benjamin
> >>
> >>>> 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@collabora.com>
> >>>> CC: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> >>>> CC: Mauro Carvalho Chehab <mchehab@kernel.org>
> >>>> CC: Shawn Guo <shawnguo@kernel.org>
> >>>> CC: Sascha Hauer <s.hauer@pengutronix.de>
> >>>> CC: Pengutronix Kernel Team <kernel@pengutronix.de>
> >>>> CC: Fabio Estevam <festevam@gmail.com>
> >>>> CC: NXP Linux Team <linux-imx@nxp.com>
> >>>> ---
> >>>> drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c | 2 +-
> >>>> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>>>
> >>>> diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
> >>>> index 49bca2b01cc6..81673ff9084b 100644
> >>>> --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
> >>>> +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
> >>>> @@ -1453,7 +1453,7 @@ int mxc_isi_video_register(struct mxc_isi_pipe *pipe,
> >>>> q->mem_ops = &vb2_dma_contig_memops;
> >>>> q->buf_struct_size = sizeof(struct mxc_isi_buffer);
> >>>> q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
> >>>> - q->min_buffers_needed = 2;
> >>>> + q->min_reqbufs_allocation = 2;
> >>>> q->lock = &video->lock;
> >>>> q->dev = pipe->isi->dev;
> >>>>
^ permalink raw reply [flat|nested] 75+ messages in thread
* Re: [PATCH 07/55] media: imx8-isi: Stop abusing of min_buffers_needed field
2023-11-29 4:17 ` Tomasz Figa
@ 2023-11-29 8:28 ` Benjamin Gaignard
2023-11-29 8:39 ` Tomasz Figa
0 siblings, 1 reply; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-29 8:28 UTC (permalink / raw)
To: Tomasz Figa
Cc: Laurent Pinchart, hverkuil, mchehab, m.szyprowski, matt.ranostay,
linux-kernel, linux-media, linux-staging, kernel, Shawn Guo,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
NXP Linux Team
Le 29/11/2023 à 05:17, Tomasz Figa a écrit :
> On Tue, Nov 28, 2023 at 7:26 PM Benjamin Gaignard
> <benjamin.gaignard@collabora.com> wrote:
>>
>> Le 28/11/2023 à 10:35, Tomasz Figa a écrit :
>>> On Tue, Nov 28, 2023 at 6:31 PM Benjamin Gaignard
>>> <benjamin.gaignard@collabora.com> wrote:
>>>> Le 27/11/2023 à 18:07, Laurent Pinchart a écrit :
>>>>> Hi Benjamin,
>>>>>
>>>>> Thank you for the patch.
>>>>>
>>>>> On Mon, Nov 27, 2023 at 05:54:06PM +0100, Benjamin Gaignard wrote:
>>>>>> 'min_buffers_needed' is suppose to be used to indicate the number
>>>>>> of buffers needed by DMA engine to start streaming.
>>>>>> imx8-isi driver doesn't use DMA engine and just want to specify
>>>>> What do you mean, "doesn't use DMA engine" ? The ISI surely has DMA
>>>>> engines :-)
>>>> I have done assumption on drivers given if they use or dma_* functions.
>>> I suspect the use of vb2_dma_sg_plane_desc() and
>>> vb2_dma_contig_plane_dma_addr() may be more correlated to whether
>>> there is a DMA involved or not. Usually V4L2 drivers don't really have
>>> to deal with the DMA API explicitly, because the vb2 framework handles
>>> most of the work.
>> Unfortunately isn't not true either, for example verisilicon driver use
>> these function but doesn't need DMA engine.
> That sounds weird. Why would a driver that doesn't have a DMA engine
> need to obtain a scatterlist or the DMA address of the buffer?
Just because the hardware needs the physical address of the buffer to access it.
>
>> I haven't found yet a 100% criteria to decide if driver use or not DMA engine
>> so I plan to fix case by case given maintainers remarks.
> Yeah, there probably wouldn't be a way that would give one a 100%
> certainty, although I'd still insist that the two functions I
> mentioned should be close to that. Of course a driver can use those
> functions for some queues, while other queues would be pure software
> queues, e.g. for some metadata - a simple grep is not enough. Is that
> perhaps the case for the verisilicon driver?
Verisilicon hardware block doesn't have IOMMU so it needs the physical
addresses of all the buffers it use (input buffer, reference frame buffers, etc...).
No DMA engine involved here it is just how the hardware is working.
Expect functions like dma_release_channel() or being in PCI directory,
I don't have found any magical way to know if a driver needs a minimum number of buffers before start streaming.
I can only read the code and do assumptions for the other cases.
I hope maintainers, like Laurent or you, will answer to this question for each driver.
Regards,
Benjamin
>
> Best regards,
> Tomasz
>
>> Regards,
>> Benjamin
>>
>>> Best regards,
>>> Tomasz
>>>
>>>> I have considers that all PCI drivers are using DMA engine and
>>>> I don't know the design for each drivers so I hope to get this information
>>>> from maintainers and fix that in v2.
>>>> If imx8-isi driver needs a minimum number of buffers before start streaming
>>>> I will do a v2 and use min_dma_buffers_needed instead.
>>>>
>>>> Regards,
>>>> Benjamin
>>>>
>>>>>> 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@collabora.com>
>>>>>> CC: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>>>>>> CC: Mauro Carvalho Chehab <mchehab@kernel.org>
>>>>>> CC: Shawn Guo <shawnguo@kernel.org>
>>>>>> CC: Sascha Hauer <s.hauer@pengutronix.de>
>>>>>> CC: Pengutronix Kernel Team <kernel@pengutronix.de>
>>>>>> CC: Fabio Estevam <festevam@gmail.com>
>>>>>> CC: NXP Linux Team <linux-imx@nxp.com>
>>>>>> ---
>>>>>> drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c | 2 +-
>>>>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>>>>
>>>>>> diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
>>>>>> index 49bca2b01cc6..81673ff9084b 100644
>>>>>> --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
>>>>>> +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
>>>>>> @@ -1453,7 +1453,7 @@ int mxc_isi_video_register(struct mxc_isi_pipe *pipe,
>>>>>> q->mem_ops = &vb2_dma_contig_memops;
>>>>>> q->buf_struct_size = sizeof(struct mxc_isi_buffer);
>>>>>> q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
>>>>>> - q->min_buffers_needed = 2;
>>>>>> + q->min_reqbufs_allocation = 2;
>>>>>> q->lock = &video->lock;
>>>>>> q->dev = pipe->isi->dev;
>>>>>>
^ permalink raw reply [flat|nested] 75+ messages in thread
* Re: [PATCH 07/55] media: imx8-isi: Stop abusing of min_buffers_needed field
2023-11-29 8:28 ` Benjamin Gaignard
@ 2023-11-29 8:39 ` Tomasz Figa
2023-11-29 10:24 ` Laurent Pinchart
0 siblings, 1 reply; 75+ messages in thread
From: Tomasz Figa @ 2023-11-29 8:39 UTC (permalink / raw)
To: Benjamin Gaignard
Cc: Laurent Pinchart, hverkuil, mchehab, m.szyprowski, matt.ranostay,
linux-kernel, linux-media, linux-staging, kernel, Shawn Guo,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
NXP Linux Team
On Wed, Nov 29, 2023 at 5:28 PM Benjamin Gaignard
<benjamin.gaignard@collabora.com> wrote:
>
>
> Le 29/11/2023 à 05:17, Tomasz Figa a écrit :
> > On Tue, Nov 28, 2023 at 7:26 PM Benjamin Gaignard
> > <benjamin.gaignard@collabora.com> wrote:
> >>
> >> Le 28/11/2023 à 10:35, Tomasz Figa a écrit :
> >>> On Tue, Nov 28, 2023 at 6:31 PM Benjamin Gaignard
> >>> <benjamin.gaignard@collabora.com> wrote:
> >>>> Le 27/11/2023 à 18:07, Laurent Pinchart a écrit :
> >>>>> Hi Benjamin,
> >>>>>
> >>>>> Thank you for the patch.
> >>>>>
> >>>>> On Mon, Nov 27, 2023 at 05:54:06PM +0100, Benjamin Gaignard wrote:
> >>>>>> 'min_buffers_needed' is suppose to be used to indicate the number
> >>>>>> of buffers needed by DMA engine to start streaming.
> >>>>>> imx8-isi driver doesn't use DMA engine and just want to specify
> >>>>> What do you mean, "doesn't use DMA engine" ? The ISI surely has DMA
> >>>>> engines :-)
> >>>> I have done assumption on drivers given if they use or dma_* functions.
> >>> I suspect the use of vb2_dma_sg_plane_desc() and
> >>> vb2_dma_contig_plane_dma_addr() may be more correlated to whether
> >>> there is a DMA involved or not. Usually V4L2 drivers don't really have
> >>> to deal with the DMA API explicitly, because the vb2 framework handles
> >>> most of the work.
> >> Unfortunately isn't not true either, for example verisilicon driver use
> >> these function but doesn't need DMA engine.
> > That sounds weird. Why would a driver that doesn't have a DMA engine
> > need to obtain a scatterlist or the DMA address of the buffer?
>
> Just because the hardware needs the physical address of the buffer to access it.
>
Right, and the part of the hardware that accesses the memory is called
a DMA engine.
> >
> >> I haven't found yet a 100% criteria to decide if driver use or not DMA engine
> >> so I plan to fix case by case given maintainers remarks.
> > Yeah, there probably wouldn't be a way that would give one a 100%
> > certainty, although I'd still insist that the two functions I
> > mentioned should be close to that. Of course a driver can use those
> > functions for some queues, while other queues would be pure software
> > queues, e.g. for some metadata - a simple grep is not enough. Is that
> > perhaps the case for the verisilicon driver?
>
> Verisilicon hardware block doesn't have IOMMU so it needs the physical
> addresses of all the buffers it use (input buffer, reference frame buffers, etc...).
> No DMA engine involved here it is just how the hardware is working.
I think we need to clarify what you mean by DMA engine. If it's
basically a standalone hardware block that does the DMA for another
hardware block, i.e. such as the standalone DMA engines under
drivers/dma, then I'd like to ask what the relation is between using
an external DMA engine and min_buffers_needed.
> Expect functions like dma_release_channel() or being in PCI directory,
> I don't have found any magical way to know if a driver needs a minimum number of buffers before start streaming.
> I can only read the code and do assumptions for the other cases.
> I hope maintainers, like Laurent or you, will answer to this question for each driver.
>
In theory that could work too, so hopefully we can achieve that. Some
drivers may not have very active maintainers... And other maintainers
who never worked with such drivers are as suited to read the code and
guess the expected state as you. That said, let's make sure that
everyone involved does their best, without pushing the task around.
Best regards,
Tomasz
> Regards,
> Benjamin
>
> >
> > Best regards,
> > Tomasz
> >
> >> Regards,
> >> Benjamin
> >>
> >>> Best regards,
> >>> Tomasz
> >>>
> >>>> I have considers that all PCI drivers are using DMA engine and
> >>>> I don't know the design for each drivers so I hope to get this information
> >>>> from maintainers and fix that in v2.
> >>>> If imx8-isi driver needs a minimum number of buffers before start streaming
> >>>> I will do a v2 and use min_dma_buffers_needed instead.
> >>>>
> >>>> Regards,
> >>>> Benjamin
> >>>>
> >>>>>> 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@collabora.com>
> >>>>>> CC: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> >>>>>> CC: Mauro Carvalho Chehab <mchehab@kernel.org>
> >>>>>> CC: Shawn Guo <shawnguo@kernel.org>
> >>>>>> CC: Sascha Hauer <s.hauer@pengutronix.de>
> >>>>>> CC: Pengutronix Kernel Team <kernel@pengutronix.de>
> >>>>>> CC: Fabio Estevam <festevam@gmail.com>
> >>>>>> CC: NXP Linux Team <linux-imx@nxp.com>
> >>>>>> ---
> >>>>>> drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c | 2 +-
> >>>>>> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>>>>>
> >>>>>> diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
> >>>>>> index 49bca2b01cc6..81673ff9084b 100644
> >>>>>> --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
> >>>>>> +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
> >>>>>> @@ -1453,7 +1453,7 @@ int mxc_isi_video_register(struct mxc_isi_pipe *pipe,
> >>>>>> q->mem_ops = &vb2_dma_contig_memops;
> >>>>>> q->buf_struct_size = sizeof(struct mxc_isi_buffer);
> >>>>>> q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
> >>>>>> - q->min_buffers_needed = 2;
> >>>>>> + q->min_reqbufs_allocation = 2;
> >>>>>> q->lock = &video->lock;
> >>>>>> q->dev = pipe->isi->dev;
> >>>>>>
^ permalink raw reply [flat|nested] 75+ messages in thread
* Re: [PATCH 16/55] media: qcom: venus: Stop abusing of min_buffers_needed field
2023-11-28 10:26 ` Hans Verkuil
@ 2023-11-29 9:48 ` Tomasz Figa
0 siblings, 0 replies; 75+ messages in thread
From: Tomasz Figa @ 2023-11-29 9:48 UTC (permalink / raw)
To: Hans Verkuil
Cc: Benjamin Gaignard, mchehab, m.szyprowski, matt.ranostay,
linux-kernel, linux-media, linux-staging, kernel,
Stanimir Varbanov, Vikash Garodia, Bryan O'Donoghue,
Andy Gross, Bjorn Andersson, Konrad Dybcio, linux-arm-msm
On Tue, Nov 28, 2023 at 7:26 PM Hans Verkuil <hverkuil@xs4all.nl> wrote:
>
> On 27/11/2023 17:54, Benjamin Gaignard wrote:
> > 'min_buffers_needed' is suppose to be used to indicate the number
> > of buffers needed by DMA engine to start streaming.
> > venus 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@collabora.com>
> > CC: Stanimir Varbanov <stanimir.k.varbanov@gmail.com> (maintainer:QUALCOMM VENUS VIDEO ACCELERATOR DRIVER)
> > CC: Vikash Garodia <quic_vgarodia@quicinc.com> (maintainer:QUALCOMM VENUS VIDEO ACCELERATOR DRIVER)
> > CC: "Bryan O'Donoghue" <bryan.odonoghue@linaro.org> (reviewer:QUALCOMM VENUS VIDEO ACCELERATOR DRIVER)
> > CC: Andy Gross <agross@kernel.org> (maintainer:ARM/QUALCOMM SUPPORT)
> > CC: Bjorn Andersson <andersson@kernel.org> (maintainer:ARM/QUALCOMM SUPPORT)
> > CC: Konrad Dybcio <konrad.dybcio@linaro.org> (maintainer:ARM/QUALCOMM SUPPORT)
> > CC: linux-arm-msm@vger.kernel.org
> > ---
> > drivers/media/platform/qcom/venus/vdec.c | 4 ++--
> > drivers/media/platform/qcom/venus/venc.c | 4 ++--
> > 2 files changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c
> > index dbf305cec120..16b8d0dde10d 100644
> > --- a/drivers/media/platform/qcom/venus/vdec.c
> > +++ b/drivers/media/platform/qcom/venus/vdec.c
> > @@ -1641,7 +1641,7 @@ static int m2m_queue_init(void *priv, struct vb2_queue *src_vq,
> > src_vq->drv_priv = inst;
> > src_vq->buf_struct_size = sizeof(struct venus_buffer);
> > src_vq->allow_zero_bytesused = 1;
> > - src_vq->min_buffers_needed = 0;
> > + src_vq->min_reqbufs_allocation = 0;
>
> Just drop this.
>
> > src_vq->dev = inst->core->dev;
> > src_vq->lock = &inst->ctx_q_lock;
> > ret = vb2_queue_init(src_vq);
> > @@ -1656,7 +1656,7 @@ static int m2m_queue_init(void *priv, struct vb2_queue *src_vq,
> > dst_vq->drv_priv = inst;
> > dst_vq->buf_struct_size = sizeof(struct venus_buffer);
> > dst_vq->allow_zero_bytesused = 1;
> > - dst_vq->min_buffers_needed = 0;
> > + dst_vq->min_reqbufs_allocation = 0;
> > dst_vq->dev = inst->core->dev;
> > dst_vq->lock = &inst->ctx_q_lock;
> > return vb2_queue_init(dst_vq);
> > diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c
> > index 44b13696cf82..e399d01c208c 100644
> > --- a/drivers/media/platform/qcom/venus/venc.c
> > +++ b/drivers/media/platform/qcom/venus/venc.c
> > @@ -1398,7 +1398,7 @@ static int m2m_queue_init(void *priv, struct vb2_queue *src_vq,
> > src_vq->drv_priv = inst;
> > src_vq->buf_struct_size = sizeof(struct venus_buffer);
> > src_vq->allow_zero_bytesused = 1;
> > - src_vq->min_buffers_needed = 1;
> > + src_vq->min_reqbufs_allocation = 1;
>
> So for platform drivers like this it is going to be more difficult to
> determine which meaning min_buffers_needed had: is at least one queued
> buffer needed before you can start streaming, or is this for a minimum
> buffer allocation?
By the way, for stateful decoders, we also have the
V4L2_CID_MIN_BUFFERS_FOR_CAPTURE control, which tells the userspace
the minimum buffers that need to be allocated and the drivers also
should adjust the number requested in REQBUFS to be at least that.
>
> In the case of m2m devices using the v4l2-mem2mem framework it is almost
> certainly the minimum buffer allocation since the m2m framework already
> checks that there are input and output buffers queued (__v4l2_m2m_try_queue).
>
> So just delete the src_vq->min_buffers_needed = 1; line, and there is
> no need to set min_reqbufs_allocation.
>
> > src_vq->dev = inst->core->dev;
> > src_vq->lock = &inst->ctx_q_lock;
> > if (inst->core->res->hfi_version == HFI_VERSION_1XX)
> > @@ -1415,7 +1415,7 @@ static int m2m_queue_init(void *priv, struct vb2_queue *src_vq,
> > dst_vq->drv_priv = inst;
> > dst_vq->buf_struct_size = sizeof(struct venus_buffer);
> > dst_vq->allow_zero_bytesused = 1;
> > - dst_vq->min_buffers_needed = 1;
> > + dst_vq->min_reqbufs_allocation = 1;
> > dst_vq->dev = inst->core->dev;
> > dst_vq->lock = &inst->ctx_q_lock;
> > return vb2_queue_init(dst_vq);
>
> Ditto.
>
> Regards,
>
> Hans
^ permalink raw reply [flat|nested] 75+ messages in thread
* Re: [PATCH 07/55] media: imx8-isi: Stop abusing of min_buffers_needed field
2023-11-29 8:39 ` Tomasz Figa
@ 2023-11-29 10:24 ` Laurent Pinchart
0 siblings, 0 replies; 75+ messages in thread
From: Laurent Pinchart @ 2023-11-29 10:24 UTC (permalink / raw)
To: Tomasz Figa
Cc: Benjamin Gaignard, hverkuil, mchehab, m.szyprowski, matt.ranostay,
linux-kernel, linux-media, linux-staging, kernel, Shawn Guo,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
NXP Linux Team
On Wed, Nov 29, 2023 at 05:39:25PM +0900, Tomasz Figa wrote:
> On Wed, Nov 29, 2023 at 5:28 PM Benjamin Gaignard wrote:
> > Le 29/11/2023 à 05:17, Tomasz Figa a écrit :
> > > On Tue, Nov 28, 2023 at 7:26 PM Benjamin Gaignard wrote:
> > >> Le 28/11/2023 à 10:35, Tomasz Figa a écrit :
> > >>> On Tue, Nov 28, 2023 at 6:31 PM Benjamin Gaignard wrote:
> > >>>> Le 27/11/2023 à 18:07, Laurent Pinchart a écrit :
> > >>>>> On Mon, Nov 27, 2023 at 05:54:06PM +0100, Benjamin Gaignard wrote:
> > >>>>>> 'min_buffers_needed' is suppose to be used to indicate the number
> > >>>>>> of buffers needed by DMA engine to start streaming.
> > >>>>>> imx8-isi driver doesn't use DMA engine and just want to specify
> > >>>>>
> > >>>>> What do you mean, "doesn't use DMA engine" ? The ISI surely has DMA
> > >>>>> engines :-)
> > >>>>
> > >>>> I have done assumption on drivers given if they use or dma_* functions.
> > >>>
> > >>> I suspect the use of vb2_dma_sg_plane_desc() and
> > >>> vb2_dma_contig_plane_dma_addr() may be more correlated to whether
> > >>> there is a DMA involved or not. Usually V4L2 drivers don't really have
> > >>> to deal with the DMA API explicitly, because the vb2 framework handles
> > >>> most of the work.
> > >>
> > >> Unfortunately isn't not true either, for example verisilicon driver use
> > >> these function but doesn't need DMA engine.
> > >
> > > That sounds weird. Why would a driver that doesn't have a DMA engine
> > > need to obtain a scatterlist or the DMA address of the buffer?
> >
> > Just because the hardware needs the physical address of the buffer to access it.
>
> Right, and the part of the hardware that accesses the memory is called
> a DMA engine.
>
> > >> I haven't found yet a 100% criteria to decide if driver use or not DMA engine
> > >> so I plan to fix case by case given maintainers remarks.
> > >
> > > Yeah, there probably wouldn't be a way that would give one a 100%
> > > certainty, although I'd still insist that the two functions I
> > > mentioned should be close to that. Of course a driver can use those
> > > functions for some queues, while other queues would be pure software
> > > queues, e.g. for some metadata - a simple grep is not enough. Is that
> > > perhaps the case for the verisilicon driver?
> >
> > Verisilicon hardware block doesn't have IOMMU so it needs the physical
> > addresses of all the buffers it use (input buffer, reference frame buffers, etc...).
> > No DMA engine involved here it is just how the hardware is working.
>
> I think we need to clarify what you mean by DMA engine. If it's
> basically a standalone hardware block that does the DMA for another
> hardware block, i.e. such as the standalone DMA engines under
> drivers/dma, then I'd like to ask what the relation is between using
> an external DMA engine and min_buffers_needed.
Yes, there seems to have been some confusion, DMA engine != dmaengine.h.
> > Expect functions like dma_release_channel() or being in PCI directory,
> > I don't have found any magical way to know if a driver needs a minimum number of buffers before start streaming.
> > I can only read the code and do assumptions for the other cases.
> > I hope maintainers, like Laurent or you, will answer to this question for each driver.
>
> In theory that could work too, so hopefully we can achieve that. Some
> drivers may not have very active maintainers... And other maintainers
> who never worked with such drivers are as suited to read the code and
> guess the expected state as you. That said, let's make sure that
> everyone involved does their best, without pushing the task around.
We can rely on individual drivers maintainers for review, but the
initial work needs to make a reasonable effort to analyze the drivers
and find the right value for min_buffers_needed and
min_reqbufs_allocation.
> > >>>> I have considers that all PCI drivers are using DMA engine and
> > >>>> I don't know the design for each drivers so I hope to get this information
> > >>>> from maintainers and fix that in v2.
> > >>>> If imx8-isi driver needs a minimum number of buffers before start streaming
> > >>>> I will do a v2 and use min_dma_buffers_needed instead.
> > >>>>
> > >>>>>> 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@collabora.com>
> > >>>>>> CC: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > >>>>>> CC: Mauro Carvalho Chehab <mchehab@kernel.org>
> > >>>>>> CC: Shawn Guo <shawnguo@kernel.org>
> > >>>>>> CC: Sascha Hauer <s.hauer@pengutronix.de>
> > >>>>>> CC: Pengutronix Kernel Team <kernel@pengutronix.de>
> > >>>>>> CC: Fabio Estevam <festevam@gmail.com>
> > >>>>>> CC: NXP Linux Team <linux-imx@nxp.com>
> > >>>>>> ---
> > >>>>>> drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c | 2 +-
> > >>>>>> 1 file changed, 1 insertion(+), 1 deletion(-)
> > >>>>>>
> > >>>>>> diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
> > >>>>>> index 49bca2b01cc6..81673ff9084b 100644
> > >>>>>> --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
> > >>>>>> +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
> > >>>>>> @@ -1453,7 +1453,7 @@ int mxc_isi_video_register(struct mxc_isi_pipe *pipe,
> > >>>>>> q->mem_ops = &vb2_dma_contig_memops;
> > >>>>>> q->buf_struct_size = sizeof(struct mxc_isi_buffer);
> > >>>>>> q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
> > >>>>>> - q->min_buffers_needed = 2;
> > >>>>>> + q->min_reqbufs_allocation = 2;
> > >>>>>> q->lock = &video->lock;
> > >>>>>> q->dev = pipe->isi->dev;
> > >>>>>>
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 75+ messages in thread
* Re: [PATCH 27/55] media: sun6i-isp: Stop abusing of min_buffers_needed field
2023-11-27 16:54 ` [PATCH 27/55] media: sun6i-isp: " Benjamin Gaignard
@ 2023-11-29 13:40 ` Paul Kocialkowski
2023-11-29 14:03 ` Benjamin Gaignard
0 siblings, 1 reply; 75+ messages in thread
From: Paul Kocialkowski @ 2023-11-29 13:40 UTC (permalink / raw)
To: Benjamin Gaignard
Cc: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay,
linux-kernel, linux-media, linux-staging, kernel, Chen-Yu Tsai,
Jernej Skrabec, Samuel Holland, linux-sunxi
[-- Attachment #1: Type: text/plain, Size: 2841 bytes --]
Hi Benjamin,
On Mon 27 Nov 23, 17:54, Benjamin Gaignard wrote:
> 'min_buffers_needed' is suppose to be used to indicate the number
> of buffers needed by DMA engine to start streaming.
> sun6i-isp 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.
The hardware actually has its own DMA engine. It can work with just one buffer
though (which will never be returned to userspace). But I think we should still
require at least two buffers allocated, otherwise the driver will be of no use
at all.
So I don't think the commit message here is correct.
Cheers,
Paul
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
> CC: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
> CC: Chen-Yu Tsai <wens@csie.org>
> CC: Jernej Skrabec <jernej.skrabec@gmail.com>
> CC: Samuel Holland <samuel@sholland.org>
> CC: linux-sunxi@lists.linux.dev
> ---
> drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_capture.c | 2 +-
> drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_params.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_capture.c b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_capture.c
> index 1595a9607775..f47f9946c19f 100644
> --- a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_capture.c
> +++ b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_capture.c
> @@ -660,7 +660,7 @@ int sun6i_isp_capture_setup(struct sun6i_isp_device *isp_dev)
> queue->buf_struct_size = sizeof(struct sun6i_isp_buffer);
> queue->ops = &sun6i_isp_capture_queue_ops;
> queue->mem_ops = &vb2_dma_contig_memops;
> - queue->min_buffers_needed = 2;
> + queue->min_reqbufs_allocation = 2;
> queue->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
> queue->lock = &capture->lock;
> queue->dev = isp_dev->dev;
> diff --git a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_params.c b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_params.c
> index e28be895b486..259f6bfcb620 100644
> --- a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_params.c
> +++ b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_params.c
> @@ -489,7 +489,7 @@ int sun6i_isp_params_setup(struct sun6i_isp_device *isp_dev)
> queue->buf_struct_size = sizeof(struct sun6i_isp_buffer);
> queue->ops = &sun6i_isp_params_queue_ops;
> queue->mem_ops = &vb2_vmalloc_memops;
> - queue->min_buffers_needed = 1;
> + queue->min_reqbufs_allocation = 1;
> queue->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
> queue->lock = ¶ms->lock;
> queue->dev = isp_dev->dev;
> --
> 2.39.2
>
--
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 75+ messages in thread
* Re: [PATCH 27/55] media: sun6i-isp: Stop abusing of min_buffers_needed field
2023-11-29 13:40 ` Paul Kocialkowski
@ 2023-11-29 14:03 ` Benjamin Gaignard
0 siblings, 0 replies; 75+ messages in thread
From: Benjamin Gaignard @ 2023-11-29 14:03 UTC (permalink / raw)
To: Paul Kocialkowski
Cc: hverkuil, mchehab, tfiga, m.szyprowski, matt.ranostay,
linux-kernel, linux-media, linux-staging, kernel, Chen-Yu Tsai,
Jernej Skrabec, Samuel Holland, linux-sunxi
Le 29/11/2023 à 14:40, Paul Kocialkowski a écrit :
> Hi Benjamin,
>
> On Mon 27 Nov 23, 17:54, Benjamin Gaignard wrote:
>> 'min_buffers_needed' is suppose to be used to indicate the number
>> of buffers needed by DMA engine to start streaming.
>> sun6i-isp 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.
> The hardware actually has its own DMA engine. It can work with just one buffer
> though (which will never be returned to userspace). But I think we should still
> require at least two buffers allocated, otherwise the driver will be of no use
> at all.
>
> So I don't think the commit message here is correct.
That is exactly the info I hope to get for this first series since I don't know
each hardware block details.
I will remove this commit and make the driver use min_queued_buffers field instead
so that will fit with it needs.
Thanks,
Benjamin
>
> Cheers,
>
> Paul
>
>> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
>> CC: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
>> CC: Chen-Yu Tsai <wens@csie.org>
>> CC: Jernej Skrabec <jernej.skrabec@gmail.com>
>> CC: Samuel Holland <samuel@sholland.org>
>> CC: linux-sunxi@lists.linux.dev
>> ---
>> drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_capture.c | 2 +-
>> drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_params.c | 2 +-
>> 2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_capture.c b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_capture.c
>> index 1595a9607775..f47f9946c19f 100644
>> --- a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_capture.c
>> +++ b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_capture.c
>> @@ -660,7 +660,7 @@ int sun6i_isp_capture_setup(struct sun6i_isp_device *isp_dev)
>> queue->buf_struct_size = sizeof(struct sun6i_isp_buffer);
>> queue->ops = &sun6i_isp_capture_queue_ops;
>> queue->mem_ops = &vb2_dma_contig_memops;
>> - queue->min_buffers_needed = 2;
>> + queue->min_reqbufs_allocation = 2;
>> queue->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
>> queue->lock = &capture->lock;
>> queue->dev = isp_dev->dev;
>> diff --git a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_params.c b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_params.c
>> index e28be895b486..259f6bfcb620 100644
>> --- a/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_params.c
>> +++ b/drivers/staging/media/sunxi/sun6i-isp/sun6i_isp_params.c
>> @@ -489,7 +489,7 @@ int sun6i_isp_params_setup(struct sun6i_isp_device *isp_dev)
>> queue->buf_struct_size = sizeof(struct sun6i_isp_buffer);
>> queue->ops = &sun6i_isp_params_queue_ops;
>> queue->mem_ops = &vb2_vmalloc_memops;
>> - queue->min_buffers_needed = 1;
>> + queue->min_reqbufs_allocation = 1;
>> queue->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
>> queue->lock = ¶ms->lock;
>> queue->dev = isp_dev->dev;
>> --
>> 2.39.2
>>
^ permalink raw reply [flat|nested] 75+ messages in thread
* Re: [PATCH 07/55] media: imx8-isi: Stop abusing of min_buffers_needed field
2023-11-28 10:31 ` Laurent Pinchart
@ 2023-12-07 18:33 ` Nicolas Dufresne
0 siblings, 0 replies; 75+ messages in thread
From: Nicolas Dufresne @ 2023-12-07 18:33 UTC (permalink / raw)
To: Laurent Pinchart, Tomasz Figa
Cc: Benjamin Gaignard, hverkuil, mchehab, m.szyprowski, matt.ranostay,
linux-kernel, linux-media, linux-staging, kernel, Shawn Guo,
Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
NXP Linux Team
Le mardi 28 novembre 2023 à 12:31 +0200, Laurent Pinchart a écrit :
> On Tue, Nov 28, 2023 at 06:35:51PM +0900, Tomasz Figa wrote:
> > On Tue, Nov 28, 2023 at 6:31 PM Benjamin Gaignard wrote:
> > > Le 27/11/2023 à 18:07, Laurent Pinchart a écrit :
> > > > Hi Benjamin,
> > > >
> > > > Thank you for the patch.
> > > >
> > > > On Mon, Nov 27, 2023 at 05:54:06PM +0100, Benjamin Gaignard wrote:
> > > > > 'min_buffers_needed' is suppose to be used to indicate the number
> > > > > of buffers needed by DMA engine to start streaming.
> > > > > imx8-isi driver doesn't use DMA engine and just want to specify
> > > > What do you mean, "doesn't use DMA engine" ? The ISI surely has DMA
> > > > engines :-)
> > >
> > > I have done assumption on drivers given if they use or dma_* functions.
> >
> > I suspect the use of vb2_dma_sg_plane_desc() and
> > vb2_dma_contig_plane_dma_addr() may be more correlated to whether
> > there is a DMA involved or not. Usually V4L2 drivers don't really have
> > to deal with the DMA API explicitly, because the vb2 framework handles
> > most of the work.
>
> And this is anyway not related to DMA at all, but to the logic each
> driver implements when it deals with buffers. There's a lower chance a
> USB driver driver will have a hard requirement for more than one buffer
> compared to an AMBA/platform/PCI device driver, but at the end of the
> day, each driver needs to be analyzed individually to check what they
> require. Benjamin, I think you'll have some more homework to do :-)
Personally, I disagree that we should blindly patch drivers and actually change
the framework behaviour. A patch that simply take what we have, and make it so a
human reader now understand what is going on should be acceptable. Maintainers
or developer that have access to the hardware should be making this judgment now
that the current behaviour is visible, modify and test it.
Asking to eye review drivers and change their behaviour without any test being
conducted will certainly cause regressions. I don't believe this is the right
approach. Refactoring the code, making an effort to not change the behaviour
during refactoring does make more sense to me.
regards,
Nicolas
>
> > > I have considers that all PCI drivers are using DMA engine and
> > > I don't know the design for each drivers so I hope to get this information
> > > from maintainers and fix that in v2.
> > > If imx8-isi driver needs a minimum number of buffers before start streaming
> > > I will do a v2 and use min_dma_buffers_needed instead.
> > >
> > > > > 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@collabora.com>
> > > > > CC: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > > > > CC: Mauro Carvalho Chehab <mchehab@kernel.org>
> > > > > CC: Shawn Guo <shawnguo@kernel.org>
> > > > > CC: Sascha Hauer <s.hauer@pengutronix.de>
> > > > > CC: Pengutronix Kernel Team <kernel@pengutronix.de>
> > > > > CC: Fabio Estevam <festevam@gmail.com>
> > > > > CC: NXP Linux Team <linux-imx@nxp.com>
> > > > > ---
> > > > > drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c | 2 +-
> > > > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > > > >
> > > > > diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
> > > > > index 49bca2b01cc6..81673ff9084b 100644
> > > > > --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
> > > > > +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-video.c
> > > > > @@ -1453,7 +1453,7 @@ int mxc_isi_video_register(struct mxc_isi_pipe *pipe,
> > > > > q->mem_ops = &vb2_dma_contig_memops;
> > > > > q->buf_struct_size = sizeof(struct mxc_isi_buffer);
> > > > > q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
> > > > > - q->min_buffers_needed = 2;
> > > > > + q->min_reqbufs_allocation = 2;
> > > > > q->lock = &video->lock;
> > > > > q->dev = pipe->isi->dev;
> > > > >
>
^ permalink raw reply [flat|nested] 75+ messages in thread
end of thread, other threads:[~2023-12-07 18:33 UTC | newest]
Thread overview: 75+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-27 16:53 [PATCH 00/55] Clean up queue_setup()/min_buffers_needed (ab)use Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 01/55] videobuf2: Add min_reqbufs_allocation field to vb2_queue structure Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 02/55] media: test-drivers: Stop abusing of min_buffers_needed field Benjamin Gaignard
2023-11-27 17:00 ` Shuah Khan
2023-11-28 9:27 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 03/55] media: usb: cx231xx: " Benjamin Gaignard
2023-11-28 10:18 ` Hans Verkuil
2023-11-28 10:23 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 04/55] media: usb: dvb-usb: cxusb-analog: " Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 05/55] media: usb: gspca: " Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 06/55] media: atmel: " Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 07/55] media: imx8-isi: " Benjamin Gaignard
2023-11-27 17:07 ` Laurent Pinchart
2023-11-28 9:31 ` Benjamin Gaignard
2023-11-28 9:35 ` Tomasz Figa
2023-11-28 10:26 ` Benjamin Gaignard
2023-11-29 4:17 ` Tomasz Figa
2023-11-29 8:28 ` Benjamin Gaignard
2023-11-29 8:39 ` Tomasz Figa
2023-11-29 10:24 ` Laurent Pinchart
2023-11-28 10:31 ` Laurent Pinchart
2023-12-07 18:33 ` Nicolas Dufresne
2023-11-27 16:54 ` [PATCH 08/55] media: imx7-media-csi: " Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 09/55] media: chips-media: coda: " Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 10/55] media: nuvoton: " Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 11/55] media: sti: hva: " Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 12/55] media: rockchip: rkisp1: " Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 13/55] media: aspeed: " Benjamin Gaignard
2023-11-27 19:26 ` Eddie James
2023-11-27 16:54 ` [PATCH 14/55] media: microchip: " Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 15/55] media: amphion: " Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 16/55] media: qcom: venus: " Benjamin Gaignard
2023-11-28 10:26 ` Hans Verkuil
2023-11-29 9:48 ` Tomasz Figa
2023-11-27 16:54 ` [PATCH 17/55] media: sun4i-csi: " Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 18/55] media: sunxi: sun8i-di: " Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 19/55] media: sun8i-rotate: " Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 20/55] media: sunxi: sun6i-csi: " Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 21/55] media: i2c: video-i2c: " Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 22/55] media: dvb-core: " Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 23/55] media: imx: " Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 24/55] media: atmel: " Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 25/55] media: ipu3: " Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 26/55] media: starfive: " Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 27/55] media: sun6i-isp: " Benjamin Gaignard
2023-11-29 13:40 ` Paul Kocialkowski
2023-11-29 14:03 ` Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 28/55] media: tegra-video: " Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 29/55] media: ti: am437x: " Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 30/55] media: ti: cal: " Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 31/55] media: ti: davinci: " Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 32/55] media: saa7146: " Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 33/55] input: touchscreen: atmel: " Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 34/55] input: touchscreen: sur40: " Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 35/55] videobuf2: core: Add min_dma_buffers_needed field to vb2_queue Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 36/55] media: stm32: stm32-dcmi: Use min_dma_buffers_needed field Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 37/55] media: renesas: " Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 38/55] media: ti: j721e-csi2rx: " Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 39/55] media: ti: omap: " Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 40/55] samples: v4l2: pci: " Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 41/55] media: pci: intel: ipu3: " Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 42/55] media: pci: dt3155: " Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 43/55] media: pci: bt8xx: " Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 44/55] media: pci: cx18: " Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 45/55] media: pci: mgb4: " Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 46/55] media: pci: tw68: " Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 47/55] media: pci: cx25821: " Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 48/55] media: pci: tw5864: " Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 49/55] media: pci: tw686x: " Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 50/55] media: pci: cx88: " Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 51/55] media: pci: cx23885: " Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 52/55] media: pci: zoran: " Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 53/55] media: pci: cobalt: " Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 54/55] media: meson: vdec: " Benjamin Gaignard
2023-11-27 16:54 ` [PATCH 55/55] media: videobuf2: core: Remove 'min_buffers_needed' field Benjamin Gaignard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox