Commit 039cf36c authored by Mark Yacoub's avatar Mark Yacoub Committed by CK Hu

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: default avatarSean Paul <seanpaul@chromium.org>
To: CK Hu <ck.hu@mediatek.com>
To: dri-devel@lists.freedesktop.org
Cc: Daniele Castagna <dcastagna@chromium.org>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-mediatek@lists.infradead.org
Signed-off-by: default avatarMark Yacoub <markyacoub@google.com>
Reviewed-by: default avatarSean Paul <seanpaul@chromium.org>
Signed-off-by: default avatarCK Hu <ck.hu@mediatek.com>
parent 84abcf12
...@@ -260,8 +260,10 @@ static void mtk_ovl_layer_config(struct mtk_ddp_comp *comp, unsigned int idx, ...@@ -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 src_size = (pending->height << 16) | pending->width;
unsigned int con; unsigned int con;
if (!pending->enable) if (!pending->enable) {
mtk_ovl_layer_off(comp, idx, cmdq_pkt); mtk_ovl_layer_off(comp, idx, cmdq_pkt);
return;
}
con = ovl_fmt_convert(ovl, fmt); con = ovl_fmt_convert(ovl, fmt);
if (idx != 0) if (idx != 0)
...@@ -288,8 +290,7 @@ static void mtk_ovl_layer_config(struct mtk_ddp_comp *comp, unsigned int idx, ...@@ -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, mtk_ddp_write_relaxed(cmdq_pkt, addr, comp,
DISP_REG_OVL_ADDR(ovl, idx)); 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) static void mtk_ovl_bgclr_in_on(struct mtk_ddp_comp *comp)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment