]> git.baikalelectronics.ru Git - kernel.git/commit
drm: rcar-du: Wait for flip completion instead of vblank in commit tail
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Thu, 13 Jul 2017 22:26:52 +0000 (01:26 +0300)
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Thu, 3 Aug 2017 13:17:26 +0000 (16:17 +0300)
commit49fab4ba6fbfaeb6f28a8272f1089b9756c75927
treea3b1b118e8f1889ee886df6555fbc72ad923f30b
parent03c2658f1c0a165adfc69a6a0bf363b54ee1ffbb
drm: rcar-du: Wait for flip completion instead of vblank in commit tail

Page flips can take more than one vertical blanking to complete if
arming the page flips races with the vertical blanking interrupt.
Waiting for one vblank to complete the atomic commit in the commit tail
handler is thus incorrect, and can lead to framebuffers being released
while still being scanned out.

Fix this by waiting for flip completion instead, using the
drm_atomic_helper_wait_for_flip_done() helper.

Fixes: 0d230422d256 ("drm: rcar-du: Register a completion callback with VSP1")
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_kms.c