Re: [PATCH] media: rzg2l-cru: Remove height alignment restriction
From: Jacopo Mondi
Date: Fri Jun 05 2026 - 03:42:33 EST
Hello Prabhakar
On Thu, May 21, 2026 at 02:19:11PM +0100, Prabhakar wrote:
> From: Lad Prabhakar <prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx>
>
> The CRU hardware found on RZ/G2L and RZ/G3E SoCs does not impose any
> height alignment requirement, so enforcing power-of-two alignment on
> the frame height is unnecessary.
>
> Remove the power-of-two height alignment restriction in the call to
> v4l_bound_align_image() by changing the height alignment argument
> from 2 to 0.
>
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx>
> ---
> drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c | 2 +-
> 1 file changed, 1 insertion(+), 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 1ab4b4c1745e..8d8103c51f29 100644
> --- a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c
> +++ b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c
> @@ -843,7 +843,7 @@ static void rzg2l_cru_format_align(struct rzg2l_cru_dev *cru,
>
> /* Limit to CRU capabilities */
> v4l_bound_align_image(&pix->width, 320, info->max_width, 1,
> - &pix->height, 240, info->max_height, 2, 0);
> + &pix->height, 240, info->max_height, 0, 0);
Where does this setting ends up being written to which register ? I
had a quick look and I couldn't find it o_o
To be honest I didn't even find any register where the expected frame
dimensions have to be programmed, so I assume we only set the memory
destination address and the stride and the rest is handled
automatically ?
The peripheral supports image clipping which is currently not
implemented as far as I can see. How do we expect to control it ?
Through the TGT_CROP rectangle ? Just as a note, the V2H EPPrC
register reports:
"If an odd number is specified, the CRU operates as if an even number
(the specified number + 1) is specified."
But as far as I understand, clipping is not controlled by the image
format.
btw I think the halign parameter of v4l_bound_align_image() should be
set to 1 and not 0
>
> v4l2_fill_pixfmt(pix, pix->pixelformat, pix->width, pix->height);
>
> --
> 2.54.0
>
>