summaryrefslogtreecommitdiff
path: root/src/sna
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2017-03-12 09:28:56 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2017-03-12 09:28:56 +0000
commitbe913a3336bcc1c933ad448224f09da138f16c0a (patch)
tree7c28e5d693fa9851d80fea0eedc8f2002fd11480 /src/sna
parentead1a0a0876bd416332122be81f6498b2b5dedfe (diff)
sna: Don't stall indefinitely for a missing flip event
If we don't see the flip event completion in time for the next Present flip, just report failure - rather than block indefinitely. References: https://bugs.freedesktop.org/show_bug.cgi?id=100162 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna')
-rw-r--r--src/sna/sna_present.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/sna/sna_present.c b/src/sna/sna_present.c
index 7c536ab6..2796d972 100644
--- a/src/sna/sna_present.c
+++ b/src/sna/sna_present.c
@@ -862,12 +862,10 @@ sna_present_flip(RRCrtcPtr crtc,
DBG(("%s: flips still pending, stalling\n", __FUNCTION__));
pfd.fd = sna->kgem.fd;
pfd.events = POLLIN;
- do {
- if (poll(&pfd, 1, -1) != 1)
- return FALSE;
-
+ while (poll(&pfd, 1, 0) == 1)
sna_mode_wakeup(sna);
- } while (sna->mode.flip_active);
+ if (sna->mode.flip_active)
+ return FALSE;
}
bo = get_flip_bo(pixmap);