Re: [PATCH 3/3] media: rzg2l-cru: Drop redundant buffer address clearing

From: Jacopo Mondi

Date: Mon Feb 09 2026 - 10:42:51 EST


Hi Tommaso

On Tue, Dec 30, 2025 at 06:09:17PM +0100, Tommaso Merciai wrote:
> Remove the clearing of cru->buf_addr[slot] in rzg3e_cru_irq().
>
> The buffer address is already managed by rzg2l_cru_set_slot_addr(),
> and explicitly setting it to zero here has no effect on the driver
> behavior. Removing this assignment simplifies the code and avoids
> unnecessary operations.

The CRU driver in mainline is already unstable enough. I can capture
up to a few K of frames before hitting:

rzg2l-cru 16010000.cru1: Invalid MB address 0xf2793e00 (out of range)

With this change I can capture up to a few hundred of frames before
hitting that.

I still have to investigate the actual reasons for the above error,
but before piling up more changes for this driver I think we should
try to fix it.

>
> Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@xxxxxxxxxxxxxx>
> ---
> drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c
> index 34e74e5796e8..8ae6ef82a0da 100644
> --- a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c
> +++ b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c
> @@ -709,7 +709,6 @@ irqreturn_t rzg3e_cru_irq(int irq, void *data)
> return IRQ_HANDLED;
>
> dev_dbg(cru->dev, "Current written slot: %d\n", slot);
> - cru->buf_addr[slot] = 0;
>
> /*
> * To hand buffers back in a known order to userspace start
> --
> 2.43.0
>
>