xf86-video-intel: tools/virtual.c

Chris Wilson ickle at kemper.freedesktop.org
Fri Nov 8 04:56:23 PST 2013


 tools/virtual.c |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

New commits:
commit 969b064f74e0058a49afa17287184005d1e11402
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Fri Nov 8 12:54:01 2013 +0000

    intel-virtual-output: Perform an explicit sync
    
    If we fail to track rendering using ShmCompletionEvents and begin to
    drop frames, insert an explicit XSync.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/tools/virtual.c b/tools/virtual.c
index 71d18f5..74a03e8 100644
--- a/tools/virtual.c
+++ b/tools/virtual.c
@@ -1359,8 +1359,14 @@ static int clone_paint(struct clone *c)
 		while (XPending(c->dst.dpy))
 			;
 
-		if (c->dst.serial > LastKnownRequestProcessed(c->dst.dpy))
-			return EAGAIN;
+		if (c->dst.serial > LastKnownRequestProcessed(c->dst.dpy)) {
+			if (c->dst.display->send++ == 0)
+				return EAGAIN;
+
+			XSync(c->dst.dpy, False);
+			c->dst.display->flush = 0;
+			c->dst.display->send = 0;
+		}
 	}
 
 	if (FORCE_FULL_REDRAW) {


More information about the xorg-commit mailing list