[PATCH 2/2] Turn off Alpha bit when plane format has no alpha
CK Hu
ck.hu at mediatek.com
Thu Dec 12 04:45:28 UTC 2019
Hi, Mark:
On Wed, 2019-12-11 at 10:49 -0500, Mark Yacoub wrote:
> drm/mediatek: Add OVL_CON_ALPHA only when the plane format has_alpha.
>
> This change enables XR24 format to be displayed as an overlay on top of
> the primary plane.
Reviewed-by: CK Hu <ck.hu at mediatek.com>
>
> Suggested-by: Sean Paul <seanpaul at chromium.org>
> To: CK Hu <ck.hu at mediatek.com>
> To: dri-devel at lists.freedesktop.org
> Cc: Daniele Castagna <dcastagna at chromium.org>
> Cc: Philipp Zabel <p.zabel at pengutronix.de>
> Cc: David Airlie <airlied at linux.ie>
> Cc: Daniel Vetter <daniel at ffwll.ch>
> Cc: Matthias Brugger <matthias.bgg at gmail.com>
> Cc: linux-arm-kernel at lists.infradead.org
> Cc: linux-mediatek at lists.infradead.org
> Signed-off-by: Mark Yacoub <markyacoub at google.com>
> ---
> drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c
> index 526b595eeff9..a7851756dddf 100644
> --- a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c
> +++ b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c
> @@ -266,7 +266,7 @@ static void mtk_ovl_layer_config(struct mtk_ddp_comp *comp, unsigned int idx,
> }
>
> con = ovl_fmt_convert(ovl, fmt);
> - if (idx != 0)
> + if (state->base.fb->format->has_alpha)
> con |= OVL_CON_AEN | OVL_CON_ALPHA;
>
> if (pending->rotation & DRM_MODE_REFLECT_Y) {
More information about the dri-devel
mailing list