Re: [PATCH 4/8] media: mtk-mdp: Round MT21C sources up to whole tiles

From: Nicolas Dufresne

Date: Tue Nov 24 2026 - 11:38:14 EST


Le vendredi 20 novembre 2026 à 13:55 -0600, Ryan Brue a écrit :
> MT21C, the MT8173 decoder's output, is laid out in tiles of 16x32
> pixels, and the MDP firmware refuses a source of a size that is not a
> whole number of them: converting a 1280x720 picture fails with -EINVAL
> for every frame, while 1280x736, the decoder's own buffer size, works.
> The alignment was 16x16, so 720 lines passed the format check.
>
> Align MT21C to 16x32. mtk_mdp_bound_align_image() already rounds a size
> up to the alignment, so a source covers its picture, and the visible
> part is the crop rectangle.
>
> Fixes: c8eb2d7e8202 ("[media] media: Add Mediatek MDP Driver")

Is this commit in stable? If so you should CC stable.

> Signed-off-by: Ryan Brue <ryanbrue.dev@xxxxxxxxx>

Reviewed-by: Nicolas Dufresne <nicolas.dufresne@xxxxxxxxxxxxx>

> ---
> drivers/media/platform/mediatek/mdp/mtk_mdp_m2m.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/mediatek/mdp/mtk_mdp_m2m.c b/drivers/media/platform/mediatek/mdp/mtk_mdp_m2m.c
> index d2813890cceb..34d02de4453d 100644
> --- a/drivers/media/platform/mediatek/mdp/mtk_mdp_m2m.c
> +++ b/drivers/media/platform/mediatek/mdp/mtk_mdp_m2m.c
> @@ -40,7 +40,7 @@ struct mtk_mdp_pix_limit {
>
> static struct mtk_mdp_pix_align mtk_mdp_size_align = {
> .org_w = 16,
> - .org_h = 16,
> + .org_h = 32,
> .target_w = 2,
> .target_h = 2,
> };

Attachment: signature.asc
Description: This is a digitally signed message part