[PATCH] drm/stm: ltdc: check crtc state before enabling LIE

Benjamin Gaignard benjamin.gaignard at linaro.org
Tue Feb 4 10:58:30 UTC 2020


Le jeu. 23 janv. 2020 à 10:50, Philippe CORNU <philippe.cornu at st.com> a écrit :
>
> Dear Yannick,
> Thank you for your patch,
>
> Acked-by: Philippe Cornu <philippe.cornu at st.com>
>
> Philippe :-)
>
> On 1/21/20 11:14 AM, Yannick Fertre wrote:
> > Following investigations of a hardware bug, the LIE interrupt
> > can occur while the display controller is not activated.
> > LIE interrupt (vblank) don't have to be set if the CRTC is not
> > enabled.
> >

Applied on drm-misc-next.

Thanks
Benjamin

> > Signed-off-by: Yannick Fertre <yannick.fertre at st.com>
> > ---
> >   drivers/gpu/drm/stm/ltdc.c | 7 ++++++-
> >   1 file changed, 6 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
> > index c2815e8..ea654c7 100644
> > --- a/drivers/gpu/drm/stm/ltdc.c
> > +++ b/drivers/gpu/drm/stm/ltdc.c
> > @@ -648,9 +648,14 @@ static const struct drm_crtc_helper_funcs ltdc_crtc_helper_funcs = {
> >   static int ltdc_crtc_enable_vblank(struct drm_crtc *crtc)
> >   {
> >       struct ltdc_device *ldev = crtc_to_ltdc(crtc);
> > +     struct drm_crtc_state *state = crtc->state;
> >
> >       DRM_DEBUG_DRIVER("\n");
> > -     reg_set(ldev->regs, LTDC_IER, IER_LIE);
> > +
> > +     if (state->enable)
> > +             reg_set(ldev->regs, LTDC_IER, IER_LIE);
> > +     else
> > +             return -EPERM;
> >
> >       return 0;
> >   }
> >
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel


More information about the dri-devel mailing list