From: Michel Dänzer <michel.daenzer@xxxxxxx> No need to process any events in that case. v2: * Re-check drmmode_crtc->flip_pending after processing each event Signed-off-by: Michel Dänzer <michel.daenzer at amd.com> --- src/amdgpu_drm_queue.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/amdgpu_drm_queue.c b/src/amdgpu_drm_queue.c index ba841d1ef..035356234 100644 --- a/src/amdgpu_drm_queue.c +++ b/src/amdgpu_drm_queue.c @@ -284,7 +284,8 @@ void amdgpu_drm_wait_pending_flip(xf86CrtcPtr crtc) drmmode_crtc->wait_flip_nesting_level++; - while (!xorg_list_is_empty(&amdgpu_drm_flip_signalled)) { + while (drmmode_crtc->flip_pending && + !xorg_list_is_empty(&amdgpu_drm_flip_signalled)) { e = xorg_list_first_entry(&amdgpu_drm_flip_signalled, struct amdgpu_drm_queue_entry, list); amdgpu_drm_queue_handle_one(e); -- 2.19.0.rc1