xf86-video-intel: src/intel_dri.c src/sna/sna_dri.c

Chris Wilson ickle at kemper.freedesktop.org
Tue Jul 12 03:52:54 PDT 2011


 src/intel_dri.c   |    6 ++++++
 src/sna/sna_dri.c |   14 ++++++++++++++
 2 files changed, 20 insertions(+)

New commits:
commit 644b1a903301531e1fb59f27952c15e87888c4c6
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Tue Jul 12 11:50:24 2011 +0100

    dri: Always initialise resource members of DRI2FrameEvent
    
    As we now attempt to always decouple the lists upon freeing the frame
    event, we need to initialise them along all code paths.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/intel_dri.c b/src/intel_dri.c
index 0b28452..5ea7c2c 100644
--- a/src/intel_dri.c
+++ b/src/intel_dri.c
@@ -1336,6 +1336,12 @@ I830DRI2ScheduleWaitMSC(ClientPtr client, DrawablePtr draw, CARD64 target_msc,
 	wait_info->client = client;
 	wait_info->type = DRI2_WAITMSC;
 
+	if (!i830_dri2_add_frame_event(wait_info)) {
+	    free(wait_info);
+	    wait_info = NULL;
+	    goto out_complete;
+	}
+
 	/* Get current count */
 	vbl.request.type = DRM_VBLANK_RELATIVE;
 	if (pipe > 0)
diff --git a/src/sna/sna_dri.c b/src/sna/sna_dri.c
index 30233ac..40c9875 100644
--- a/src/sna/sna_dri.c
+++ b/src/sna/sna_dri.c
@@ -1395,6 +1395,14 @@ blit:
 		info->sna = sna;
 		info->type = DRI2_ASYNC_FLIP;
 		info->pipe = pipe;
+		info->client = client;
+
+		if (!sna_dri_add_frame_event(info)) {
+			DBG(("%s: failed to hook up frame event\n", __FUNCTION__));
+			free(info);
+			info = NULL;
+			goto exchange;
+		}
 
 		info->count = sna_do_pageflip(sna, back_priv->pixmap,
 					      info, pipe,
@@ -1565,6 +1573,12 @@ sna_dri_schedule_wait_msc(ClientPtr client, DrawablePtr draw, CARD64 target_msc,
 	info->drawable_id = draw->id;
 	info->client = client;
 	info->type = DRI2_WAITMSC;
+	if (!sna_dri_add_frame_event(info)) {
+		DBG(("%s: failed to hook up frame event\n", __FUNCTION__));
+		free(info);
+		info = NULL;
+		goto out_complete;
+	}
 
 	/*
 	 * If divisor is zero, or current_msc is smaller than target_msc,


More information about the xorg-commit mailing list