summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/stm
diff options
context:
space:
mode:
authorYannick Fertré <yannick.fertre@st.com>2019-03-29 18:48:05 +0300
committerBenjamin Gaignard <benjamin.gaignard@linaro.org>2019-04-24 14:50:46 +0300
commit798e5b2a4f1dad93b193fb16bfd7e78eed22f22b (patch)
tree954b8935b99d609bf6a9d7b52dbaebcb82c5f3be /drivers/gpu/drm/stm
parent12d7a93c8689c818a8d96733a0e1c2cfa42e60af (diff)
downloadlinux-798e5b2a4f1dad93b193fb16bfd7e78eed22f22b.tar.xz
drm/stm: ltdc: disable hw interrupts before its handler init
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> Acked-by: Philippe Cornu <philippe.cornu@st.com> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Link: https://patchwork.freedesktop.org/patch/msgid/1553874485-31259-1-git-send-email-yannick.fertre@st.com
Diffstat (limited to 'drivers/gpu/drm/stm')
-rw-r--r--drivers/gpu/drm/stm/ltdc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
index 32fd6a3b37fb..9b4883bdbf4f 100644
--- a/drivers/gpu/drm/stm/ltdc.c
+++ b/drivers/gpu/drm/stm/ltdc.c
@@ -1142,6 +1142,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)
@@ -1162,10 +1166,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",