From: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
To: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
Cc: tomm.merciai@gmail.com, linux-renesas-soc@vger.kernel.org,
biju.das.jz@bp.renesas.com,
"Lad Prabhakar" <prabhakar.mahadev-lad.rj@bp.renesas.com>,
"Jacopo Mondi" <jacopo.mondi@ideasonboard.com>,
"Mauro Carvalho Chehab" <mchehab@kernel.org>,
"Hans Verkuil" <hverkuil+cisco@kernel.org>,
"Nicolas Dufresne" <nicolas.dufresne@collabora.com>,
"Sakari Ailus" <sakari.ailus@linux.intel.com>,
"Laurent Pinchart" <laurent.pinchart@ideasonboard.com>,
"Sven Püschel" <s.pueschel@pengutronix.de>,
"Nas Chung" <nas.chung@chipsnmedia.com>,
"Mehdi Djait" <mehdi.djait@linux.intel.com>,
"Isaac Scott" <isaac.scott@ideasonboard.com>,
"Paul Cercueil" <paul@crapouillou.net>,
"Daniel Scally" <dan.scally+renesas@ideasonboard.com>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 5/5] media: rzg2l-cru: Use v4l2_fill_pixfmt_aligned() for stride alignment
Date: Fri, 31 Jul 2026 17:07:06 +0200 [thread overview]
Message-ID: <amy559iChdLrrMTj@zed> (raw)
In-Reply-To: <20260729105603.1160966-6-tommaso.merciai.xr@bp.renesas.com>
Hi Tommaso
On Wed, Jul 29, 2026 at 12:55:50PM +0200, Tommaso Merciai wrote:
> Replace the open-coded bytesperline/sizeimage rounding with the newly
> added v4l2_fill_pixfmt_aligned().
>
> No functional change intended.
>
> Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
> ---
> v4->v5:
> - Split the fix so it no longer depends on v4l2_fill_pixfmt_aligned()
> and moved it first in the series, so it can be backported to stable
> on its own (This the old v4 PATCH 4/4).
>
> drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c
> index 91eda5034248..27a35ef2a6df 100644
> --- a/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c
> +++ b/drivers/media/platform/renesas/rzg2l-cru/rzg2l-video.c
> @@ -849,12 +849,8 @@ static void rzg2l_cru_format_align(struct rzg2l_cru_dev *cru,
> v4l_bound_align_image(&pix->width, 320, info->max_width, 1,
> &pix->height, 240, info->max_height, 2, 0);
>
> - v4l2_fill_pixfmt(pix, pix->pixelformat, pix->width, pix->height);
> -
> - if (info->has_stride) {
> - pix->bytesperline = ALIGN(pix->bytesperline, RZG2L_CRU_STRIDE_ALIGN);
> - pix->sizeimage = pix->bytesperline * pix->height;
> - }
> + v4l2_fill_pixfmt_aligned(pix, pix->pixelformat, pix->width, pix->height,
> + info->has_stride ? RZG2L_CRU_STRIDE_ALIGN : 1);
this will look very nice with info->stride.
In the meantime
Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Sorry for having missed it yesterday
>
> dev_dbg(cru->dev, "Format %ux%u bpl: %u size: %u\n",
> pix->width, pix->height, pix->bytesperline, pix->sizeimage);
> --
> 2.54.0
>
prev parent reply other threads:[~2026-07-31 15:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-29 10:55 [PATCH v5 0/5] media: rzg2l-cru: Fix DMA stride alignment Tommaso Merciai
2026-07-29 10:55 ` [PATCH v5 1/5] media: rzg2l-cru: Align bytesperline to hardware DMA stride requirement Tommaso Merciai
2026-07-30 19:50 ` Jacopo Mondi
2026-07-31 14:55 ` Tommaso Merciai
2026-07-31 15:06 ` Jacopo Mondi
2026-07-29 10:55 ` [PATCH v5 2/5] media: v4l2-common: Convert v4l2_fill_pixfmt_mp() to static inline wrapper Tommaso Merciai
2026-07-29 10:55 ` [PATCH v5 3/5] media: v4l2-common: Add v4l2_fill_pixfmt_aligned() helper Tommaso Merciai
2026-07-29 10:55 ` [PATCH v5 4/5] media: v4l2-common: Add kernel-doc for v4l2_fill_pixfmt_mp_aligned() Tommaso Merciai
2026-07-29 10:55 ` [PATCH v5 5/5] media: rzg2l-cru: Use v4l2_fill_pixfmt_aligned() for stride alignment Tommaso Merciai
2026-07-31 15:07 ` 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=amy559iChdLrrMTj@zed \
--to=jacopo.mondi@ideasonboard.com \
--cc=biju.das.jz@bp.renesas.com \
--cc=dan.scally+renesas@ideasonboard.com \
--cc=hverkuil+cisco@kernel.org \
--cc=isaac.scott@ideasonboard.com \
--cc=laurent.pinchart@ideasonboard.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=mehdi.djait@linux.intel.com \
--cc=nas.chung@chipsnmedia.com \
--cc=nicolas.dufresne@collabora.com \
--cc=paul@crapouillou.net \
--cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
--cc=s.pueschel@pengutronix.de \
--cc=sakari.ailus@linux.intel.com \
--cc=tomm.merciai@gmail.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