All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/stm: ltdc: reset controller to avoid partial refresh
@ 2019-04-03  9:24 ` Yannick Fertré
  0 siblings, 0 replies; 9+ messages in thread
From: Yannick Fertré @ 2019-04-03  9:24 UTC (permalink / raw)
  To: Yannick Fertre, Philippe Cornu, Benjamin Gaignard,
	Vincent Abriou, David Airlie, Daniel Vetter, Maxime Coquelin,
	Alexandre Torgue, dri-devel, linux-stm32, linux-arm-kernel,
	linux-kernel

Display controller reset must be done as soon as possible after enable
the clock to avoid partial refresh on screen.

Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
---
 drivers/gpu/drm/stm/ltdc.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
index 32fd6a3..7bbe61c 100644
--- a/drivers/gpu/drm/stm/ltdc.c
+++ b/drivers/gpu/drm/stm/ltdc.c
@@ -1134,6 +1134,12 @@ int ltdc_load(struct drm_device *ddev)
 		return -ENODEV;
 	}
 
+	if (!IS_ERR(rstc)) {
+		reset_control_assert(rstc);
+		usleep_range(10, 20);
+		reset_control_deassert(rstc);
+	}
+
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	ldev->regs = devm_ioremap_resource(dev, res);
 	if (IS_ERR(ldev->regs)) {
@@ -1156,12 +1162,6 @@ int ltdc_load(struct drm_device *ddev)
 		}
 	}
 
-	if (!IS_ERR(rstc)) {
-		reset_control_assert(rstc);
-		usleep_range(10, 20);
-		reset_control_deassert(rstc);
-	}
-
 	/* Disable interrupts */
 	reg_clear(ldev->regs, LTDC_IER,
 		  IER_LIE | IER_RRIE | IER_FUIE | IER_TERRIE);
-- 
2.7.4


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

end of thread, other threads:[~2019-04-24 12:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-03  9:24 [PATCH] drm/stm: ltdc: reset controller to avoid partial refresh Yannick Fertré
2019-04-03  9:24 ` Yannick Fertré
2019-04-03  9:24 ` Yannick Fertré
2019-04-05 16:31 ` Philippe CORNU
2019-04-05 16:31   ` Philippe CORNU
2019-04-05 16:31   ` Philippe CORNU
2019-04-24 12:29   ` Benjamin Gaignard
2019-04-24 12:29     ` Benjamin Gaignard
2019-04-24 12:29     ` Benjamin Gaignard

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.