All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] Return from mtk_ovl_layer_config after mtk_ovl_layer_off
@ 2019-12-11 15:49 ` Mark Yacoub
  0 siblings, 0 replies; 22+ messages in thread
From: Mark Yacoub @ 2019-12-11 15:49 UTC (permalink / raw)
  To: CK Hu, dri-devel
  Cc: Daniele Castagna, Philipp Zabel, David Airlie, Sean Paul,
	Daniel Vetter, Matthias Brugger, linux-mediatek,
	linux-arm-kernel, Mark Yacoub

drm/mediatek: return if plane pending state is disabled.

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 <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: Mark Yacoub <markyacoub@google.com>
---
 drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 7 ++++---
 1 file 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 4a55bb6e2213..526b595eeff9 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);
+		return;
+	}
 
 	con = ovl_fmt_convert(ovl, fmt);
 	if (idx != 0)
@@ -283,8 +285,7 @@ static void mtk_ovl_layer_config(struct mtk_ddp_comp *comp, unsigned int idx,
 	writel_relaxed(offset, comp->regs + DISP_REG_OVL_OFFSET(idx));
 	writel_relaxed(addr, comp->regs + DISP_REG_OVL_ADDR(ovl, idx));
 
-	if (pending->enable)
-		mtk_ovl_layer_on(comp, idx);
+	mtk_ovl_layer_on(comp, idx);
 }
 
 static void mtk_ovl_bgclr_in_on(struct mtk_ddp_comp *comp)
-- 
2.24.0.525.g8f36a354ae-goog


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2019-12-25 10:19 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-11 15:49 [PATCH 1/2] Return from mtk_ovl_layer_config after mtk_ovl_layer_off Mark Yacoub
2019-12-11 15:49 ` Mark Yacoub
2019-12-11 15:49 ` Mark Yacoub
2019-12-11 15:49 ` [PATCH 2/2] Turn off Alpha bit when plane format has no alpha Mark Yacoub
2019-12-11 15:49   ` Mark Yacoub
2019-12-11 15:49   ` Mark Yacoub
2019-12-12  4:45   ` CK Hu
2019-12-12  4:45     ` CK Hu
2019-12-12  4:45     ` CK Hu
2019-12-12  4:45 ` [PATCH 1/2] Return from mtk_ovl_layer_config after mtk_ovl_layer_off CK Hu
2019-12-12  4:45   ` CK Hu
2019-12-12  4:45   ` CK Hu
2019-12-12 14:13   ` Sean Paul
2019-12-12 14:13     ` Sean Paul
2019-12-12 14:13     ` Sean Paul
2019-12-13  2:34     ` CK Hu
2019-12-13  2:34       ` CK Hu
2019-12-13  2:34       ` CK Hu
2019-12-25  2:25 ` CK Hu
2019-12-25  2:25   ` CK Hu
2019-12-25  2:25   ` CK Hu
2019-12-25  2:43   ` Mark Yacoub

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.