From: Detlev Casanova <detlev.casanova@collabora.com>
To: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Heiko Stuebner <heiko@sntech.de>,
Venkata Atchuta Bheemeswara Sarma Darbha <vdarbha0473@gmail.com>
Cc: linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Nicolas Dufresne <nicolas.dufresne@collabora.com>,
Igor Paunovic <royalnet026@gmail.com>,
Francesco Saverio Pavone <pavone.lawyer@gmail.com>,
Venkata Atchuta Bheemeswara Sarma Darbha <vdarbha0473@gmail.com>
Subject: Re: [PATCH 4/4] media: rkvdec: align bytesperline to 64 bytes in rkvdec_fill_decoded_pixfmt()
Date: Mon, 27 Jul 2026 11:58:15 -0400 [thread overview]
Message-ID: <cb8XVJu6RUmEjMZpl7NA1g@collabora.com> (raw)
In-Reply-To: <20260726-b4-add-rkvdec2-vp9-vdpu381-v1-4-180fb2d1f10c@gmail.com>
Hi !
On Sunday, 26 July 2026 16:25:37 EDT Venkata Atchuta Bheemeswara Sarma Darbha
wrote:
> From: Igor Paunovic <royalnet026@gmail.com>
>
> Ensure bytesperline is 64-byte aligned and scale sizeimage accordingly.
>
> Signed-off-by: Igor Paunovic <royalnet026@gmail.com>
> Signed-off-by: Francesco Saverio Pavone <pavone.lawyer@gmail.com>
> Signed-off-by: Venkata Atchuta Bheemeswara Sarma Darbha
> <vdarbha0473@gmail.com> ---
> drivers/media/platform/rockchip/rkvdec/rkvdec.c | 12 ++++++++++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/platform/rockchip/rkvdec/rkvdec.c
> b/drivers/media/platform/rockchip/rkvdec/rkvdec.c index
> 436bb460f04e..6ab6530b1cc9 100644
> --- a/drivers/media/platform/rockchip/rkvdec/rkvdec.c
> +++ b/drivers/media/platform/rockchip/rkvdec/rkvdec.c
> @@ -102,12 +102,20 @@ static void rkvdec_fill_decoded_pixfmt(struct
> rkvdec_ctx *ctx, struct v4l2_pix_format_mplane *pix_mp)
> {
> const struct rkvdec_variant *variant = ctx->dev->variant;
> + struct v4l2_plane_pix_format *plane = &pix_mp->plane_fmt[0];
> + u32 aligned_bpl;
>
> v4l2_fill_pixfmt_mp(pix_mp, pix_mp->pixelformat, pix_mp->width,
> pix_mp->height);
>
> - ctx->colmv_offset = pix_mp->plane_fmt[0].sizeimage;
> + /* ensure bpl is 64 byte aligned and scale sizeimage accordingly.
*/
> + aligned_bpl = ALIGN(plane->bytesperline, 64);
> + if (aligned_bpl != plane->bytesperline) {
> + plane->sizeimage = plane->sizeimage / plane-
>bytesperline * aligned_bpl;
> + plane->bytesperline = aligned_bpl;
> + }
This shouldn't be needed. As you set step_width to 64,
v4l2_apply_frmsize_constraints() should already do the alignment.
Do you have more context as to when width is not aligned ?
>
> - pix_mp->plane_fmt[0].sizeimage += variant->ops->colmv_size(pix_mp-
>width,
> pix_mp->height); + ctx->colmv_offset = plane->sizeimage;
> + plane->sizeimage += variant->ops->colmv_size(pix_mp->width,
> pix_mp->height); }
>
> static void rkvdec_reset_fmt(struct rkvdec_ctx *ctx, struct v4l2_format *f,
Regards,
Detlev.
next prev parent reply other threads:[~2026-07-27 15:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-26 20:25 [PATCH 0/4] media: rkvdec: Add VP9 support for VDPU381 variant Venkata Atchuta Bheemeswara Sarma Darbha
2026-07-26 20:25 ` [PATCH 1/4] media: rkvdec: vp9: Changing get_ref_buf function name to get_ref_buf_vp9 Venkata Atchuta Bheemeswara Sarma Darbha
2026-07-26 20:25 ` [PATCH 2/4] media: rkvdec: Move vp9 functions to common file Venkata Atchuta Bheemeswara Sarma Darbha
2026-07-26 20:25 ` [PATCH 3/4] media: rkvdec: Add VP9 support for VDPU381 variant Venkata Atchuta Bheemeswara Sarma Darbha
2026-07-26 20:25 ` [PATCH 4/4] media: rkvdec: align bytesperline to 64 bytes in rkvdec_fill_decoded_pixfmt() Venkata Atchuta Bheemeswara Sarma Darbha
2026-07-27 15:58 ` Detlev Casanova [this message]
2026-07-27 17:07 ` Igor Paunovic
2026-07-27 17:42 ` Francesco Saverio Pavone
2026-07-27 17:56 ` Igor Paunovic
2026-07-27 6:44 ` [PATCH 0/4] media: rkvdec: Add VP9 support for VDPU381 variant Francesco Saverio Pavone
2026-07-27 8:25 ` Igor Paunovic
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=cb8XVJu6RUmEjMZpl7NA1g@collabora.com \
--to=detlev.casanova@collabora.com \
--cc=ezequiel@vanguardiasur.com.ar \
--cc=heiko@sntech.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=mchehab@kernel.org \
--cc=nicolas.dufresne@collabora.com \
--cc=pavone.lawyer@gmail.com \
--cc=royalnet026@gmail.com \
--cc=vdarbha0473@gmail.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