From: Chris Wilson Date: Fri, 8 Nov 2013 12:54:01 +0000 (+0000) Subject: intel-virtual-output: Perform an explicit sync X-Git-Tag: 2.99.906~16^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=969b064f74e0058a49afa17287184005d1e11402;p=platform%2Fupstream%2Fxf86-video-intel.git 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 --- 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) {