drm/stm: ltdc: disable hw interrupts before its handler init
diff mbox series

Message ID 1553874485-31259-1-git-send-email-yannick.fertre@st.com
State New
Headers show
Series
  • drm/stm: ltdc: disable hw interrupts before its handler init
Related show

Commit Message

Yannick Fertre March 29, 2019, 3:48 p.m. UTC
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(-)

Comments

Philippe CORNU April 1, 2019, 9:18 a.m. UTC | #1
On 3/29/19 4:48 PM, Yannick Fertré wrote:
> 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);
> -

Dear Yannick,
Thank you for your patch,

Acked-by: Philippe Cornu <philippe.cornu@st.com>

Philippe :-)

>   	ret = ltdc_get_caps(ddev);
>   	if (ret) {
>   		DRM_ERROR("hardware identifier (0x%08x) not supported!\n",
>
Benjamin Gaignard April 24, 2019, 12:27 p.m. UTC | #2
Le lun. 1 avr. 2019 à 11:19, Philippe CORNU <philippe.cornu@st.com> a écrit :
>
>
> On 3/29/19 4:48 PM, Yannick Fertré wrote:
> > 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);
> > -
>
> Dear Yannick,
> Thank you for your patch,
>
> Acked-by: Philippe Cornu <philippe.cornu@st.com>
>

Applied on drm-misc-next,
Thanks,
Benjamin

> Philippe :-)
>
> >       ret = ltdc_get_caps(ddev);
> >       if (ret) {
> >               DRM_ERROR("hardware identifier (0x%08x) not supported!\n",
> >
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

Patch
diff mbox series

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",