Re: [PATCH v2] drm/mediatek: ovl: Report coverage blending on older SoCs
From: Chun-Kuang Hu
Date: Thu Dec 03 2026 - 08:29:47 EST
Ryan Brue <ryanbrue.dev@xxxxxxxxx> 於 2026年11月24日週二 上午12:36寫道:
>
> Since commit 860e748bddcc ("drm: ensure blend mode supported if pixel
> format with alpha exposed"), every OVL plane on MT2701, MT8167, MT8173
> and MT8183 warns at boot:
>
> [drm] [PLANE:37:plane-0] pixel format with alpha exposed but blend
> mode not setup. Please fix.
>
> These OVLs expose ARGB formats but don't have blend_modes in their driver
> data, so no "pixel blend mode" property is created. They can't blend
> premultiplied pixels: mtk_ovl_fmt_convert() always selects the
> non-premultiplied color formats for them, which is the DRM "Coverage"
> equation. Since commit 9813e158d13d ("drm/drm_blend: allow blend mode
> property without PREMULTI") a coverage-only property is allowed, so
> advertise it and drop the comment saying it couldn't be created.
>
> The plane state then defaults to Coverage (1) instead of Pre-multiplied
> (0), and mtk_ovl_layer_config() enables alpha blending for any non-zero
> blend mode. On these SoCs that would set OVL_CON_AEN for XRGB formats
> too, which they can't ignore the pixel alpha of, the breakage fixed by
> commit 995d4d558eea ("drm/mediatek: ovl: Fix XRGB format breakage for
> blend_modes unsupported SoCs"). Only look at the blend mode on SoCs that
> support premultiplied blending, as mtk_ovl_fmt_convert() does, so these
> SoCs keep enabling alpha blending for formats with alpha only.
>
> Tested on MT8173 (Amazon Fire HD 10 2017). The warning is gone, every
> plane reports a "pixel blend mode" of Coverage, and the OVL0 layer
> registers are unchanged.
Applied to mediatek-drm-fixes [1], thanks.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git/log/?h=mediatek-drm-fixes
Regards,
Chun-Kuang.
>
> Signed-off-by: Ryan Brue <ryanbrue.dev@xxxxxxxxx>
> ---