summaryrefslogtreecommitdiff
path: root/src/amdgpu_drm_queue.c
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2018-08-29 18:50:45 +0200
committerMichel Dänzer <michel@daenzer.net>2018-09-05 10:54:56 +0200
commitca5eb9894fff153c0a1df7bdc4a4745713309e27 (patch)
tree0faaf556d38327a5b0190c381de780c110f0cdc5 /src/amdgpu_drm_queue.c
parenta923bedfd91d39977dbf95f296cf9b68439490f2 (diff)
Bail early from drm_wait_pending_flip if there's no pending flip
No need to process any events in that case. v2: * Re-check drmmode_crtc->flip_pending after processing each event
Diffstat (limited to 'src/amdgpu_drm_queue.c')
-rw-r--r--src/amdgpu_drm_queue.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/amdgpu_drm_queue.c b/src/amdgpu_drm_queue.c
index ba841d1..0353562 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);