diff mbox series

[v2,14/36] media: ti: omap: Remove useless setting of min_buffers_needed

Message ID 20231204132323.22811-15-benjamin.gaignard@collabora.com
State New
Headers show
Series Clean up min_buffers_needed misusages | expand

Commit Message

Benjamin Gaignard Dec. 4, 2023, 1:23 p.m. UTC
This driver uses min_buffers_needed which vb2 uses to ensure
start_streaming is called when at least 'min_buffers_needed'
buffers are queued. However, this driver doesn't need this,
it can stream fine without any buffers queued.
Just drop this unnecessary restriction.

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
---
 drivers/media/platform/ti/omap/omap_vout.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Hans Verkuil Dec. 4, 2023, 2:32 p.m. UTC | #1
On 04/12/2023 14:23, Benjamin Gaignard wrote:
> This driver uses min_buffers_needed which vb2 uses to ensure
> start_streaming is called when at least 'min_buffers_needed'
> buffers are queued. However, this driver doesn't need this,
> it can stream fine without any buffers queued.
> Just drop this unnecessary restriction.
> 
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
> ---
>  drivers/media/platform/ti/omap/omap_vout.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/media/platform/ti/omap/omap_vout.c b/drivers/media/platform/ti/omap/omap_vout.c
> index 72ce903717d3..f67a45f1441b 100644
> --- a/drivers/media/platform/ti/omap/omap_vout.c
> +++ b/drivers/media/platform/ti/omap/omap_vout.c
> @@ -1404,7 +1404,6 @@ 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;
>  	vfd->queue = vq;
>  
>  	ret = vb2_queue_init(vq);

Drop this patch, this is needed.

Regards,

	Hans
diff mbox series

Patch

diff --git a/drivers/media/platform/ti/omap/omap_vout.c b/drivers/media/platform/ti/omap/omap_vout.c
index 72ce903717d3..f67a45f1441b 100644
--- a/drivers/media/platform/ti/omap/omap_vout.c
+++ b/drivers/media/platform/ti/omap/omap_vout.c
@@ -1404,7 +1404,6 @@  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;
 	vfd->queue = vq;
 
 	ret = vb2_queue_init(vq);