mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drm/stm: ltdc: disable hw interrupts before its handler init
@ 2019-03-29 15:48 Yannick Fertré
  2019-04-01  9:18 ` Philippe CORNU
  0 siblings, 1 reply; 3+ messages in thread
From: Yannick Fertré @ 2019-03-29 15:48 UTC (permalink / raw)
  To: Yannick Fertre, Philippe Cornu, Vincent Abriou, David Airlie,
	Daniel Vetter, Maxime Coquelin, Alexandre Torgue, dri-devel,
	linux-stm32, linux-arm-kernel, linux-kernel

Interrupt register must be disabled before call of
devm_request_threaded_irq function to avoid dummy interruption.

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

diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
index b1741a9..ef5b4d6 100644
--- a/drivers/gpu/drm/stm/ltdc.c
+++ b/drivers/gpu/drm/stm/ltdc.c
@@ -1118,6 +1118,10 @@ int ltdc_load(struct drm_device *ddev)
 		goto err;
 	}
 
+	/* Disable interrupts */
+	reg_clear(ldev->regs, LTDC_IER,
+		  IER_LIE | IER_RRIE | IER_FUIE | IER_TERRIE);
+
 	for (i = 0; i < MAX_IRQ; i++) {
 		irq = platform_get_irq(pdev, i);
 		if (irq < 0)
@@ -1138,10 +1142,6 @@ int ltdc_load(struct drm_device *ddev)
 		reset_control_deassert(rstc);
 	}
 
-	/* Disable interrupts */
-	reg_clear(ldev->regs, LTDC_IER,
-		  IER_LIE | IER_RRIE | IER_FUIE | IER_TERRIE);
-
 	ret = ltdc_get_caps(ddev);
 	if (ret) {
 		DRM_ERROR("hardware identifier (0x%08x) not supported!\n",
-- 
2.7.4


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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-29 15:48 [PATCH] drm/stm: ltdc: disable hw interrupts before its handler init Yannick Fertré
2019-04-01  9:18 ` Philippe CORNU
2019-04-24 12:27   ` Benjamin Gaignard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®