]> git.baikalelectronics.ru Git - kernel.git/commit
drm: rcar-du: Fix race condition when disabling planes at CRTC stop
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Fri, 28 Jul 2017 23:31:33 +0000 (02:31 +0300)
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Thu, 3 Aug 2017 13:17:27 +0000 (16:17 +0300)
commit5c2ba315442cf978041b29f212e02d8e1c0b6b17
treee67af091860fae6e9ca454db8ba0a1e50a2699bb
parentb1e9efdf1564a4dd92ab4d8caa123be980495f07
drm: rcar-du: Fix race condition when disabling planes at CRTC stop

When stopping the CRTC the driver must disable all planes and wait for
the change to take effect at the next vblank. Merely calling
drm_crtc_wait_one_vblank() is not enough, as the function doesn't
include any mechanism to handle the race with vblank interrupts.

Replace the drm_crtc_wait_one_vblank() call with a manual mechanism that
handles the vblank interrupt race.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
drivers/gpu/drm/rcar-du/rcar_du_crtc.c
drivers/gpu/drm/rcar-du/rcar_du_crtc.h