[PATCH] media: rcar-vin: Drop min_queued_buffers

Jacopo Mondi posted 1 patch 1 month, 1 week ago
drivers/media/platform/renesas/rcar-vin/rcar-dma.c | 1 -
1 file changed, 1 deletion(-)
[PATCH] media: rcar-vin: Drop min_queued_buffers
Posted by Jacopo Mondi 1 month, 1 week ago
From: Jacopo Mondi <jacopo.mondi+renesas@ideasonboard.com>

The R-Car VIN driver already uses a scratch buffer to sustain capture
operations in absence of a frame buffer provided by userspace.

There is no reason to require 4 buffers queued at all times for the
driver to operate. Drop min_queued_buffers from the VIN driver to allow
single-frame capture operations.

Signed-off-by: Jacopo Mondi <jacopo.mondi+renesas@ideasonboard.com>
---
This allows to capture a single frame when the R-Car VIN is used
to feed the R-Car ISP on R-Car V4H.

Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
---
 drivers/media/platform/renesas/rcar-vin/rcar-dma.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/media/platform/renesas/rcar-vin/rcar-dma.c b/drivers/media/platform/renesas/rcar-vin/rcar-dma.c
index f9af9177e02f..73cda0e2d45a 100644
--- a/drivers/media/platform/renesas/rcar-vin/rcar-dma.c
+++ b/drivers/media/platform/renesas/rcar-vin/rcar-dma.c
@@ -1494,7 +1494,6 @@ 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_queued_buffers = 4;
 	q->dev = vin->dev;
 
 	ret = vb2_queue_init(q);

---
base-commit: d9c8c4adf23d17549c0ec9c85b99d85a0ee6cf18
change-id: 20260504-rcar-vin-min-queued-buffs-31891f226fe6

Best regards,
-- 
Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Re: [PATCH] media: rcar-vin: Drop min_queued_buffers
Posted by Laurent Pinchart 2 weeks, 4 days ago
Hi Jacopo,

Thank you for the patch.

On Mon, May 04, 2026 at 02:43:14PM +0200, Jacopo Mondi wrote:
> From: Jacopo Mondi <jacopo.mondi+renesas@ideasonboard.com>
> 
> The R-Car VIN driver already uses a scratch buffer to sustain capture
> operations in absence of a frame buffer provided by userspace.
> 
> There is no reason to require 4 buffers queued at all times for the
> driver to operate. Drop min_queued_buffers from the VIN driver to allow
> single-frame capture operations.
> 
> Signed-off-by: Jacopo Mondi <jacopo.mondi+renesas@ideasonboard.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

> ---
> This allows to capture a single frame when the R-Car VIN is used
> to feed the R-Car ISP on R-Car V4H.
> 
> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
> ---
>  drivers/media/platform/renesas/rcar-vin/rcar-dma.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/media/platform/renesas/rcar-vin/rcar-dma.c b/drivers/media/platform/renesas/rcar-vin/rcar-dma.c
> index f9af9177e02f..73cda0e2d45a 100644
> --- a/drivers/media/platform/renesas/rcar-vin/rcar-dma.c
> +++ b/drivers/media/platform/renesas/rcar-vin/rcar-dma.c
> @@ -1494,7 +1494,6 @@ 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_queued_buffers = 4;
>  	q->dev = vin->dev;
>  
>  	ret = vb2_queue_init(q);
> 
> ---
> base-commit: d9c8c4adf23d17549c0ec9c85b99d85a0ee6cf18
> change-id: 20260504-rcar-vin-min-queued-buffs-31891f226fe6

-- 
Regards,

Laurent Pinchart
Re: [PATCH] media: rcar-vin: Drop min_queued_buffers
Posted by Niklas Söderlund 1 month, 1 week ago
Hi Jacopo,

Thanks for your work.

On 2026-05-04 14:43:14 +0200, Jacopo Mondi wrote:
> From: Jacopo Mondi <jacopo.mondi+renesas@ideasonboard.com>
> 
> The R-Car VIN driver already uses a scratch buffer to sustain capture
> operations in absence of a frame buffer provided by userspace.
> 
> There is no reason to require 4 buffers queued at all times for the
> driver to operate. Drop min_queued_buffers from the VIN driver to allow
> single-frame capture operations.
> 
> Signed-off-by: Jacopo Mondi <jacopo.mondi+renesas@ideasonboard.com>

Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Tested-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

> ---
> This allows to capture a single frame when the R-Car VIN is used
> to feed the R-Car ISP on R-Car V4H.
> 
> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
> ---
>  drivers/media/platform/renesas/rcar-vin/rcar-dma.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/media/platform/renesas/rcar-vin/rcar-dma.c b/drivers/media/platform/renesas/rcar-vin/rcar-dma.c
> index f9af9177e02f..73cda0e2d45a 100644
> --- a/drivers/media/platform/renesas/rcar-vin/rcar-dma.c
> +++ b/drivers/media/platform/renesas/rcar-vin/rcar-dma.c
> @@ -1494,7 +1494,6 @@ 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_queued_buffers = 4;
>  	q->dev = vin->dev;
>  
>  	ret = vb2_queue_init(q);
> 
> ---
> base-commit: d9c8c4adf23d17549c0ec9c85b99d85a0ee6cf18
> change-id: 20260504-rcar-vin-min-queued-buffs-31891f226fe6
> 
> Best regards,
> -- 
> Jacopo Mondi <jacopo.mondi@ideasonboard.com>
> 

-- 
Kind Regards,
Niklas Söderlund
Re: [PATCH] media: rcar-vin: Drop min_queued_buffers
Posted by Jai Luthra 1 month, 1 week ago
Hi Jacopo,

Quoting Jacopo Mondi (2026-05-04 18:13:14)
> From: Jacopo Mondi <jacopo.mondi+renesas@ideasonboard.com>
> 
> The R-Car VIN driver already uses a scratch buffer to sustain capture
> operations in absence of a frame buffer provided by userspace.
> 
> There is no reason to require 4 buffers queued at all times for the
> driver to operate. Drop min_queued_buffers from the VIN driver to allow
> single-frame capture operations.
> 
> Signed-off-by: Jacopo Mondi <jacopo.mondi+renesas@ideasonboard.com>

Thanks for the patch,

Reviewed-by: Jai Luthra <jai.luthra+renesas@ideasonboard.com>

--
Jai

> ---
> This allows to capture a single frame when the R-Car VIN is used
> to feed the R-Car ISP on R-Car V4H.
> 
> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
> ---
>  drivers/media/platform/renesas/rcar-vin/rcar-dma.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/media/platform/renesas/rcar-vin/rcar-dma.c b/drivers/media/platform/renesas/rcar-vin/rcar-dma.c
> index f9af9177e02f..73cda0e2d45a 100644
> --- a/drivers/media/platform/renesas/rcar-vin/rcar-dma.c
> +++ b/drivers/media/platform/renesas/rcar-vin/rcar-dma.c
> @@ -1494,7 +1494,6 @@ 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_queued_buffers = 4;
>         q->dev = vin->dev;
>  
>         ret = vb2_queue_init(q);
> 
> ---
> base-commit: d9c8c4adf23d17549c0ec9c85b99d85a0ee6cf18
> change-id: 20260504-rcar-vin-min-queued-buffs-31891f226fe6
> 
> Best regards,
> -- 
> Jacopo Mondi <jacopo.mondi@ideasonboard.com>
>