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

Chris Wilson ickle at kemper.freedesktop.org
Mon Jan 25 13:44:32 PST 2016


 src/sna/sna_dri2.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 8ab71cd3293ad420b0cdf487e8d5c66170ddc13c
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon Jan 25 21:41:57 2016 +0000

    sna/dri2: Guard signalling swap completion after a FLIP
    
    Before sending the frame swap complete signal after a FLIP, make sure
    the client didn't die in the meantime.
    
    Reported-by: Diego Viola <diego.viola at gmail.com>
    References: https://bugs.freedesktop.org/show_bug.cgi?id=93844
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_dri2.c b/src/sna/sna_dri2.c
index 5450434..f2f4908 100644
--- a/src/sna/sna_dri2.c
+++ b/src/sna/sna_dri2.c
@@ -2873,8 +2873,10 @@ static void sna_dri2_flip_event(struct sna_dri2_event *flip)
 	/* We assume our flips arrive in order, so we don't check the frame */
 	switch (flip->type) {
 	case FLIP:
-		DBG(("%s: swap complete, unblocking client\n", __FUNCTION__));
-		frame_swap_complete(flip, DRI2_FLIP_COMPLETE);
+		if (flip->signal) {
+			DBG(("%s: swap complete, unblocking client\n", __FUNCTION__));
+			frame_swap_complete(flip, DRI2_FLIP_COMPLETE);
+		}
 		sna_dri2_event_free(flip);
 
 		if (sna->dri2.flip_pending)


More information about the xorg-commit mailing list