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

Nicolas Dufresne nicolas.dufresne at collabora.com
Tue Nov 24 08:38:00 PST 2026


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 at gmail.com>

Reviewed-by: Nicolas Dufresne <nicolas.dufresne at collabora.com>

> ---
>  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,
>  };
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20261124/f76786dd/attachment.sig>


More information about the linux-arm-kernel mailing list