]> git.baikalelectronics.ru Git - kernel.git/commit
drm/radeon: Make classic pageflip completion path less racy.
authorMario Kleiner <mario.kleiner.de@gmail.com>
Thu, 17 Jul 2014 00:24:45 +0000 (02:24 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 17 Jul 2014 13:04:03 +0000 (09:04 -0400)
commit27b3cd6d259887c35e61854d62a275a8cd7c9955
tree54db7617658560a8a13e5cb87ef135c4a05b35f2
parent9bd4f499e5feff5c36f641087575a855fe16545e
drm/radeon: Make classic pageflip completion path less racy.

Need to protect mmio flip programming by event lock as well.

Need to also first enable pflip irq, then mmio program,
otherwise a flip completion may get unnoticed in the vblank
of actual completion if the flip is programmed, but
radeon_flip_work_func gets preempted immediately after
mmio programming and before vblank. In that case the
vblank irq handler wouldn't run radeon_crtc_handle_vblank()
with the completion check routine, miss the completed flip,
and only notice one vblank after actual completion, causing
a false/delayed report of flip completion.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/radeon_display.c