[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f925ddf5-3265-638b-14b9-71b549b5a9ad@st.com>
Date: Thu, 23 Jan 2020 09:50:15 +0000
From: Philippe CORNU <philippe.cornu@...com>
To: Yannick FERTRE <yannick.fertre@...com>,
Benjamin GAIGNARD <benjamin.gaignard@...com>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
"Alexandre TORGUE" <alexandre.torgue@...com>,
"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
"linux-stm32@...md-mailman.stormreply.com"
<linux-stm32@...md-mailman.stormreply.com>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drm/stm: ltdc: check crtc state before enabling LIE
Dear Yannick,
Thank you for your patch,
Acked-by: Philippe Cornu <philippe.cornu@...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.
>
> Signed-off-by: Yannick Fertre <yannick.fertre@...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;
> }
>
Powered by blists - more mailing lists