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>,
"Mehdi Djait" <mehdi.djait@linux.intel.com>,
"Sven Püschel" <s.pueschel@pengutronix.de>,
"Marek Szyprowski" <m.szyprowski@samsung.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 v3 1/4] media: v4l2-common: Convert v4l2_fill_pixfmt_mp() to static inline wrapper
Date: Thu, 9 Jul 2026 11:24:41 +0200 [thread overview]
Message-ID: <ak9oDISHgAzIfqjE@zed> (raw)
In-Reply-To: <20260708161406.396183-2-tommaso.merciai.xr@bp.renesas.com>
Hi Tommaso
On Wed, Jul 08, 2026 at 06:14:02PM +0200, Tommaso Merciai wrote:
> Convert v4l2_fill_pixfmt_mp() to static inline wrapper: drop the exported
> v4l2_fill_pixfmt_mp() function from v4l2-common.c and replace it with
> an equivalent static inline in the header that delegates to
> v4l2_fill_pixfmt_mp_aligned() with stride_alignment=1.
>
> Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
> ---
> v2->v3:
> - No changes
>
> v1->v2:
> - New patch
>
> drivers/media/v4l2-core/v4l2-common.c | 8 --------
> include/media/v4l2-common.h | 9 +++++++--
> 2 files changed, 7 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/media/v4l2-core/v4l2-common.c b/drivers/media/v4l2-core/v4l2-common.c
> index 65db7340ad38..54995ba8c20d 100644
> --- a/drivers/media/v4l2-core/v4l2-common.c
> +++ b/drivers/media/v4l2-core/v4l2-common.c
> @@ -537,14 +537,6 @@ int v4l2_fill_pixfmt_mp_aligned(struct v4l2_pix_format_mplane *pixfmt,
> }
> EXPORT_SYMBOL_GPL(v4l2_fill_pixfmt_mp_aligned);
>
> -int v4l2_fill_pixfmt_mp(struct v4l2_pix_format_mplane *pixfmt,
> - u32 pixelformat, u32 width, u32 height)
> -{
> - return v4l2_fill_pixfmt_mp_aligned(pixfmt, pixelformat,
> - width, height, 1);
> -}
> -EXPORT_SYMBOL_GPL(v4l2_fill_pixfmt_mp);
> -
> int v4l2_fill_pixfmt(struct v4l2_pix_format *pixfmt, u32 pixelformat,
> u32 width, u32 height)
> {
> diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h
> index edd416178c33..749fe38c134e 100644
> --- a/include/media/v4l2-common.h
> +++ b/include/media/v4l2-common.h
> @@ -556,13 +556,18 @@ void v4l2_apply_frmsize_constraints(u32 *width, u32 *height,
> const struct v4l2_frmsize_stepwise *frmsize);
> int v4l2_fill_pixfmt(struct v4l2_pix_format *pixfmt, u32 pixelformat,
> u32 width, u32 height);
> -int v4l2_fill_pixfmt_mp(struct v4l2_pix_format_mplane *pixfmt, u32 pixelformat,
> - u32 width, u32 height);
> +
> /* @stride_alignment is a power of 2 value in bytes */
Well, 1 is certainly a power of 2 :)
> int v4l2_fill_pixfmt_mp_aligned(struct v4l2_pix_format_mplane *pixfmt,
> u32 pixelformat, u32 width, u32 height,
> u8 stride_alignment);
>
> +static inline int v4l2_fill_pixfmt_mp(struct v4l2_pix_format_mplane *pixfmt,
> + u32 pixelformat, u32 width, u32 height)
> +{
> + return v4l2_fill_pixfmt_mp_aligned(pixfmt, pixelformat, width, height, 1);
> +}
> +
Makes sense
Reviewed-by: Jacopo Mondi <jacopo.mondi+renesas@ideasonboard.com>
> /**
> * v4l2_get_link_freq - Get link rate from transmitter
> *
> --
> 2.54.0
>
>
next prev parent reply other threads:[~2026-07-09 9:24 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-08 16:14 [PATCH v3 0/4] media: rzg2l-cru: Fix DMA stride alignment Tommaso Merciai
2026-07-08 16:14 ` [PATCH v3 1/4] media: v4l2-common: Convert v4l2_fill_pixfmt_mp() to static inline wrapper Tommaso Merciai
2026-07-09 9:24 ` Jacopo Mondi [this message]
2026-07-08 16:14 ` [PATCH v3 2/4] media: v4l2-common: Add v4l2_fill_pixfmt_aligned() helper Tommaso Merciai
2026-07-09 9:35 ` Jacopo Mondi
2026-07-09 15:09 ` Tommaso Merciai
2026-07-10 8:36 ` Sven Püschel
2026-07-10 9:38 ` Jacopo Mondi
2026-07-10 11:54 ` Sven Püschel
2026-07-10 12:15 ` Jacopo Mondi
2026-07-10 12:26 ` Sven Püschel
2026-07-10 13:45 ` Tommaso Merciai
2026-07-10 13:50 ` Sven Püschel
2026-07-08 16:14 ` [PATCH v3 3/4] media: v4l2-common: Add kernel-doc for v4l2_fill_pixfmt_mp_aligned() Tommaso Merciai
2026-07-09 9:51 ` Jacopo Mondi
2026-07-10 8:57 ` Sven Püschel
2026-07-10 9:56 ` Jacopo Mondi
2026-07-08 16:14 ` [PATCH v3 4/4] media: rzg2l-cru: Align bytesperline to hardware DMA stride requirement Tommaso Merciai
2026-07-09 9:19 ` Jacopo Mondi
2026-07-09 10:16 ` Tommaso Merciai
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=ak9oDISHgAzIfqjE@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=m.szyprowski@samsung.com \
--cc=mchehab@kernel.org \
--cc=mehdi.djait@linux.intel.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