Linux Media Controller development
 help / color / mirror / Atom feed
From: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
To: Prabhakar <prabhakar.csengg@gmail.com>
Cc: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	 Jacopo Mondi <jacopo.mondi@ideasonboard.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	 linux-renesas-soc@vger.kernel.org, linux-media@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	 Biju Das <biju.das.jz@bp.renesas.com>,
	Fabrizio Castro <fabrizio.castro.jz@renesas.com>,
	 Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
Subject: Re: [PATCH] media: rzg2l-cru: Remove height alignment restriction
Date: Fri, 5 Jun 2026 09:33:35 +0200	[thread overview]
Message-ID: <aiJ4b9Js8XjWvl6P@zed> (raw)
In-Reply-To: <20260521131911.92845-1-prabhakar.mahadev-lad.rj@bp.renesas.com>

Hello Prabhakar

On Thu, May 21, 2026 at 02:19:11PM +0100, Prabhakar wrote:
> From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
>
> 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@bp.renesas.com>
> ---
>  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
>
>

      reply	other threads:[~2026-06-05  7:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-21 13:19 [PATCH] media: rzg2l-cru: Remove height alignment restriction Prabhakar
2026-06-05  7:33 ` Jacopo Mondi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aiJ4b9Js8XjWvl6P@zed \
    --to=jacopo.mondi@ideasonboard.com \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=fabrizio.castro.jz@renesas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=prabhakar.csengg@gmail.com \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=tommaso.merciai.xr@bp.renesas.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox