aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Yacoub <[email protected]>2019-12-11 10:49:00 -0500
committerCK Hu <[email protected]>2020-01-10 14:10:49 +0800
commit039cf36cbff95d19673699a6ce6f019908de1ce8 (patch)
treeee2bf6efc4a0b71623685299187201496c335ca4
parent84abcf1234bbfbcc0b8749bcf9c9ca01525eea50 (diff)
drm/mediatek: Return from mtk_ovl_layer_config after mtk_ovl_layer_off
If the plane pending state is disabled, call mtk_ovl_layer_off then return. This guarantees that that the state is valid for all operations when the pending state is enabled. 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]> Reviewed-by: Sean Paul <[email protected]> Signed-off-by: CK Hu <[email protected]>
-rw-r--r--drivers/gpu/drm/mediatek/mtk_disp_ovl.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c
index b7a7c2f1d26d..ec4c4952aa5f 100644
--- a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c
+++ b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c
@@ -260,8 +260,10 @@ static void mtk_ovl_layer_config(struct mtk_ddp_comp *comp, unsigned int idx,
unsigned int src_size = (pending->height << 16) | pending->width;
unsigned int con;
- if (!pending->enable)
+ if (!pending->enable) {
mtk_ovl_layer_off(comp, idx, cmdq_pkt);
+ return;
+ }
con = ovl_fmt_convert(ovl, fmt);
if (idx != 0)
@@ -288,8 +290,7 @@ static void mtk_ovl_layer_config(struct mtk_ddp_comp *comp, unsigned int idx,
mtk_ddp_write_relaxed(cmdq_pkt, addr, comp,
DISP_REG_OVL_ADDR(ovl, idx));
- if (pending->enable)
- mtk_ovl_layer_on(comp, idx, cmdq_pkt);
+ mtk_ovl_layer_on(comp, idx, cmdq_pkt);
}
static void mtk_ovl_bgclr_in_on(struct mtk_ddp_comp *comp)