xf86-video-intel: src/sna/sna_present.c

Chris Wilson ickle at kemper.freedesktop.org
Sun Mar 12 09:30:36 UTC 2017


 src/sna/sna_present.c |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

New commits:
commit be913a3336bcc1c933ad448224f09da138f16c0a
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Mar 12 09:28:56 2017 +0000

    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 at chris-wilson.co.uk>

diff --git a/src/sna/sna_present.c b/src/sna/sna_present.c
index 7c536ab..2796d97 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);


More information about the xorg-commit mailing list