[PATCH v4] media: mtk-vpu: Ensure alignment of 8 for DTCM buffer

AngeloGioacchino Del Regno angelogioacchino.delregno at collabora.com
Tue Feb 15 01:41:21 PST 2022


Il 20/09/21 19:04, Dafna Hirschfeld ha scritto:
> From: Alexandre Courbot <acourbot at chromium.org>
> 
> When running memcpy_toio:
> memcpy_toio(send_obj->share_buf, buf, len);
> it was found that errors appear if len is not a multiple of 8:
> 
> [58.350841] mtk-mdp 14001000.rdma: processing failed: -22
> 
> This patch ensures the copy of a multiple of 8 size by calling
> round_up(len, 8) when copying
> 
> Fixes: e6599adfad30 ("media: mtk-vpu: avoid unaligned access to DTCM buffer.")
> Signed-off-by: Alexandre Courbot <acourbot at chromium.org>
> Signed-off-by: Enric Balletbo i Serra <enric.balletbo at collabora.com>
> Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld at collabora.com>
> Reviewed-by: Houlong Wei <houlong.wei at mediatek.com>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>

I acknowledge that this patch is getting very old and stale, but after some
testing on MT8173, we were able to verify that it is essential for MediaTek MDP
functionality, along with some other patches.

Without this one, it won't work.

Keeping this in mind, I would propose to get this one picked before it gets
completely stale and requiring a rewrite.

Cheers,
Angelo



More information about the Linux-mediatek mailing list