Commit a6bd58c5 authored by Yannick Fertre's avatar Yannick Fertre Committed by Benjamin Gaignard

drm/stm: ltdc: check crtc state before enabling LIE

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: default avatarYannick Fertre <yannick.fertre@st.com>
Acked-by: default avatarPhilippe Cornu <philippe.cornu@st.com>
Signed-off-by: default avatarBenjamin Gaignard <benjamin.gaignard@st.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1579601650-7055-1-git-send-email-yannick.fertre@st.com
parent 544aa6ce
...@@ -648,9 +648,14 @@ static const struct drm_crtc_helper_funcs ltdc_crtc_helper_funcs = { ...@@ -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) static int ltdc_crtc_enable_vblank(struct drm_crtc *crtc)
{ {
struct ltdc_device *ldev = crtc_to_ltdc(crtc); struct ltdc_device *ldev = crtc_to_ltdc(crtc);
struct drm_crtc_state *state = crtc->state;
DRM_DEBUG_DRIVER("\n"); DRM_DEBUG_DRIVER("\n");
if (state->enable)
reg_set(ldev->regs, LTDC_IER, IER_LIE); reg_set(ldev->regs, LTDC_IER, IER_LIE);
else
return -EPERM;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment