All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Cho <stevecho@google.com>
To: Yunfei Dong <yunfei.dong@mediatek.com>
Cc: Andrew-CT Chen <andrew-ct.chen@mediatek.com>,
	Dafna Hirschfeld <dafna.hirschfeld@collabora.com>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Irui Wang <irui.wang@mediatek.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Benjamin Gaignard <benjamin.gaignard@collabora.com>,
	Project_Global_Chrome_Upstream_Group@mediatek.com,
	Fritz Koenig <frkoenig@chromium.org>,
	linux-media@vger.kernel.org, devicetree@vger.kernel.org,
	Tzung-Bi Shih <tzungbi@chromium.org>,
	Tomasz Figa <tfiga@google.com>, Rob Herring <robh+dt@kernel.org>,
	linux-mediatek@lists.infradead.org,
	Hsin-Yi Wang <hsinyi@chromium.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Tiffany Lin <tiffany.lin@mediatek.com>,
	linux-arm-kernel@lists.infradead.org,
	Alexandre Courbot <acourbot@chromium.org>,
	srv_heupstream@mediatek.com, linux-kernel@vger.kernel.org,
	Hans Verkuil <hverkuil-cisco@xs4all.nl>
Subject: Re: [PATCH v1] media: mtk-vcodec: Align width and height to 64
Date: Tue, 2 Nov 2021 09:43:29 -0700	[thread overview]
Message-ID: <CAN0yncGtLC0D_MeNxu7nKBoixquwv+OKvrmo+izqLRWxiGWFJQ@mail.gmail.com> (raw)
In-Reply-To: <20211029094510.2411-1-yunfei.dong@mediatek.com>

[-- Attachment #1: Type: text/plain, Size: 1855 bytes --]

Thank you Yunfei for following up with this change.

This change is the last missing piece to enable VD on Kukui with Chromium.
This patch fixed the corruption we were seeing on Kukui with certain tests.

One comment from me is just to use defined macro or variable instead of
hard coding 64.

"User get width and height are 64 align when set format."

This sentence might need to be reworded. It is not clear to me.

Maybe something like "Width and height need to be 64 bytes aligned when
setting the format."

Thanks,
Steve

On Fri, Oct 29, 2021 at 2:45 AM Yunfei Dong <yunfei.dong@mediatek.com>
wrote:

> User get width and height are 64 align when set format. Need to make
> sure all is 64 align when use width and height to calculate buffer size.
>
> Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com>
> ---
>  drivers/media/platform/mtk-vcodec/vdec/vdec_h264_req_if.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/platform/mtk-vcodec/vdec/vdec_h264_req_if.c
> b/drivers/media/platform/mtk-vcodec/vdec/vdec_h264_req_if.c
> index 946c23088308..28c17204f9a1 100644
> --- a/drivers/media/platform/mtk-vcodec/vdec/vdec_h264_req_if.c
> +++ b/drivers/media/platform/mtk-vcodec/vdec/vdec_h264_req_if.c
> @@ -562,8 +562,8 @@ static void get_pic_info(struct vdec_h264_slice_inst
> *inst,
>  {
>         struct mtk_vcodec_ctx *ctx = inst->ctx;
>
> -       ctx->picinfo.buf_w = (ctx->picinfo.pic_w + 15) & 0xFFFFFFF0;
> -       ctx->picinfo.buf_h = (ctx->picinfo.pic_h + 31) & 0xFFFFFFE0;
> +       ctx->picinfo.buf_w = ALIGN(ctx->picinfo.pic_w, 64);
> +       ctx->picinfo.buf_h = ALIGN(ctx->picinfo.pic_h, 64);
>         ctx->picinfo.fb_sz[0] = ctx->picinfo.buf_w * ctx->picinfo.buf_h;
>         ctx->picinfo.fb_sz[1] = ctx->picinfo.fb_sz[0] >> 1;
>         inst->vsi_ctx.dec.cap_num_planes =
> --
> 2.25.1
>
>

[-- Attachment #2: Type: text/html, Size: 2691 bytes --]

  reply	other threads:[~2021-11-02 21:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-29  9:45 [PATCH v1] media: mtk-vcodec: Align width and height to 64 Yunfei Dong
2021-10-29  9:45 ` Yunfei Dong
2021-10-29  9:45 ` Yunfei Dong
2021-11-02 16:43 ` Steve Cho [this message]
2021-11-03  3:36   ` yunfei.dong

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=CAN0yncGtLC0D_MeNxu7nKBoixquwv+OKvrmo+izqLRWxiGWFJQ@mail.gmail.com \
    --to=stevecho@google.com \
    --cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
    --cc=acourbot@chromium.org \
    --cc=andrew-ct.chen@mediatek.com \
    --cc=benjamin.gaignard@collabora.com \
    --cc=dafna.hirschfeld@collabora.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=frkoenig@chromium.org \
    --cc=hsinyi@chromium.org \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=irui.wang@mediatek.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=mchehab@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=srv_heupstream@mediatek.com \
    --cc=tfiga@google.com \
    --cc=tiffany.lin@mediatek.com \
    --cc=tzungbi@chromium.org \
    --cc=yunfei.dong@mediatek.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.