Skip to content

Commit 039cf36

Browse files
Mark Yacoubckhu-mediatek
authored andcommitted
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]>
1 parent 84abcf1 commit 039cf36

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/gpu/drm/mediatek/mtk_disp_ovl.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,10 @@ static void mtk_ovl_layer_config(struct mtk_ddp_comp *comp, unsigned int idx,
260260
unsigned int src_size = (pending->height << 16) | pending->width;
261261
unsigned int con;
262262

263-
if (!pending->enable)
263+
if (!pending->enable) {
264264
mtk_ovl_layer_off(comp, idx, cmdq_pkt);
265+
return;
266+
}
265267

266268
con = ovl_fmt_convert(ovl, fmt);
267269
if (idx != 0)
@@ -288,8 +290,7 @@ static void mtk_ovl_layer_config(struct mtk_ddp_comp *comp, unsigned int idx,
288290
mtk_ddp_write_relaxed(cmdq_pkt, addr, comp,
289291
DISP_REG_OVL_ADDR(ovl, idx));
290292

291-
if (pending->enable)
292-
mtk_ovl_layer_on(comp, idx, cmdq_pkt);
293+
mtk_ovl_layer_on(comp, idx, cmdq_pkt);
293294
}
294295

295296
static void mtk_ovl_bgclr_in_on(struct mtk_ddp_comp *comp)

0 commit comments

Comments
 (0)