drm/stm: ltdc: check crtc state before enabling LIE
Subsystems (4)
PATCH 1/1 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.
--- drivers/gpu/drm/stm/ltdc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/stm/ltdc.c +6 -1
@@ -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 ; }
Signature · 6 lines
2.7.4 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Dear Yannick,
Thank you for your patch,
Philippe :-)
Quoted 21 lines · Yannick Fertre
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 <[email protected]>--- drivers/gpu/drm/stm/ltdc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)drivers/gpu/drm/stm/ltdc.c +1
-0@@ -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;
drivers/gpu/drm/stm/ltdc.c static const struct drm_crtc_helper_funcs ltdc_crtc_helper_funcs = { · line 661
Quoted 10 lines
drivers/gpu/drm/stm/ltdc.c +5
-1DRM_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
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 14 lines · Philippe CORNU
Dear Yannick,
Thank you for your patch,Acked-by Philippe Cornu <[email protected]>Philippe :-)
Quoted 5 lines · Yannick Fertre
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
Quoted 23 lines
Quoted 23 lines
Signed-off-by Yannick Fertre <[email protected]>--- drivers/gpu/drm/stm/ltdc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)drivers/gpu/drm/stm/ltdc.c +6
-1@@ -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 ;
Quoted 7 lines
drivers/gpu/drm/stm/ltdc.c static const struct drm_crtc_helper_funcs ltdc_crtc_helper_funcs = { · line 661
Quoted 3 lines
drivers/gpu/drm/stm/ltdc.c +0
-0return 0 ; }_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel