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

Chris Wilson ickle at kemper.freedesktop.org
Wed Jan 6 02:05:15 PST 2016


 src/sna/sna_dri2.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 5c735befdcc40f94bd740be9fc0df54ad53aa174
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Jan 6 10:00:19 2016 +0000

    sna/dri2: Ignore pending SwapComplete events when the window is destroyed
    
    Since we need the drawable to call DRI2SwapComplete/DRI2WakeClient, if
    the window is destroyed that becomes inoperable (as we are called late
    in the chain). Let's hope the client isn't blocked.
    
    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 33cf3d9..63c4932 100644
--- a/src/sna/sna_dri2.c
+++ b/src/sna/sna_dri2.c
@@ -1837,20 +1837,20 @@ void sna_dri2_destroy_window(WindowPtr win)
 
 		chain = priv->chain;
 		while ((info = chain)) {
+			DBG(("%s: freeing event, pending signal? %d, pending swap? handle=%d\n",
+			     __FUNCTION__, info->signal,
+			     info->pending.bo ? info->pending.bo->handle : 0));
 			assert(info->draw == &win->drawable);
-			if (info->signal)
-				frame_swap_complete(info, DRI2_EXCHANGE_COMPLETE);
+
 			if (info->pending.bo) {
 				assert(info->pending.bo->active_scanout > 0);
 				info->pending.bo->active_scanout--;
 
-				info->signal = true;
-				frame_swap_complete(info, DRI2_EXCHANGE_COMPLETE);
-
 				kgem_bo_destroy(&sna->kgem, info->pending.bo);
 				info->pending.bo = NULL;
 			}
 
+			info->signal = false;
 			info->draw = NULL;
 			list_del(&info->link);
 


More information about the xorg-commit mailing list