aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Yacoub <[email protected]>2019-12-11 10:49:01 -0500
committerCK Hu <[email protected]>2020-01-10 14:10:49 +0800
commitb6b1bb980ec4e82bbef9b4c98efbb0df6740bb53 (patch)
tree0a2ffa6e0325f73691ea17cd8e4ae68752099c56
parent039cf36cbff95d19673699a6ce6f019908de1ce8 (diff)
drm/mediatek: Turn off Alpha bit when plane format has no alpha
This change enables XR24 format to be displayed as an overlay on top of the primary plane. Suggested-by: Sean Paul <[email protected]> To: CK Hu <[email protected]> To: [email protected] Cc: Daniele Castagna <[email protected]> Cc: Philipp Zabel <[email protected]> Cc: David Airlie <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: Matthias Brugger <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Mark Yacoub <[email protected]> Signed-off-by: CK Hu <[email protected]>
-rw-r--r--drivers/gpu/drm/mediatek/mtk_disp_ovl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c
index ec4c4952aa5f..891d80c73e04 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) {