<html dir="ltr"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="text-align:left; direction:ltr;"><div>Hi steve,</div><div><br></div><div>Thanks for your suggestion.</div><div>On Tue, 2021-11-02 at 09:43 -0700, Steve Cho wrote:</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div dir="ltr">Thank you Yunfei for following up with this change. <div><br></div><div>This change is the last missing piece to enable VD on Kukui with Chromium. </div><div>This patch fixed the corruption we were seeing on Kukui with certain tests.</div><div><br></div><div>One comment from me is just to use defined macro or variable instead of hard coding 64. </div><div><br></div><div>"User get width and height are 64 align when set format."<br></div><div><br></div><div>This sentence might need to be reworded. It is not clear to me. </div><div><br></div><div>Maybe something like "Width and height need to be 64 bytes aligned when setting the format."<br></div><div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Thanks,<div>Steve</div></div></div></div></div></div><br><div class="gmail_quote"></div></blockquote><div>Fix it and send patch v2.</div><div><br></div><div>Thanks,</div><div>Yunfei Dong</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Oct 29, 2021 at 2:45 AM Yunfei Dong <<a href="mailto:yunfei.dong@mediatek.com">yunfei.dong@mediatek.com</a>> wrote:<br></div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex">User get width and height are 64 align when set format. Need to make<br>
sure all is 64 align when use width and height to calculate buffer size.<br>
<br>
Signed-off-by: Yunfei Dong <<a href="mailto:yunfei.dong@mediatek.com" target="_blank">yunfei.dong@mediatek.com</a>><br>
---<br>
drivers/media/platform/mtk-vcodec/vdec/vdec_h264_req_if.c | 4 ++--<br>
1 file changed, 2 insertions(+), 2 deletions(-)<br>
<br>
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<br>
index 946c23088308..28c17204f9a1 100644<br>
--- a/drivers/media/platform/mtk-vcodec/vdec/vdec_h264_req_if.c<br>
+++ b/drivers/media/platform/mtk-vcodec/vdec/vdec_h264_req_if.c<br>
@@ -562,8 +562,8 @@ static void get_pic_info(struct vdec_h264_slice_inst *inst,<br>
{<br>
struct mtk_vcodec_ctx *ctx = inst->ctx;<br>
<br>
- ctx->picinfo.buf_w = (ctx->picinfo.pic_w + 15) & 0xFFFFFFF0;<br>
- ctx->picinfo.buf_h = (ctx->picinfo.pic_h + 31) & 0xFFFFFFE0;<br>
+ ctx->picinfo.buf_w = ALIGN(ctx->picinfo.pic_w, 64);<br>
+ ctx->picinfo.buf_h = ALIGN(ctx->picinfo.pic_h, 64);<br>
ctx->picinfo.fb_sz[0] = ctx->picinfo.buf_w * ctx->picinfo.buf_h;<br>
ctx->picinfo.fb_sz[1] = ctx->picinfo.fb_sz[0] >> 1;<br>
inst->vsi_ctx.dec.cap_num_planes =<br>
</blockquote></div></blockquote></body></html>