xf86-video-intel: src/intel_dri.c

Chris Wilson ickle at kemper.freedesktop.org
Mon Apr 11 07:28:51 PDT 2011


 src/intel_dri.c |   20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

New commits:
commit 3d2b79098ccb3fed86be66f619f4ed338741d454
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Mon Apr 11 15:20:16 2011 +0100

    dri: Rearrange code to compile against xorg-server-1.7
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/intel_dri.c b/src/intel_dri.c
index 720820f..a39b512 100644
--- a/src/intel_dri.c
+++ b/src/intel_dri.c
@@ -398,14 +398,6 @@ static void I830DRI2DestroyBuffer(DrawablePtr drawable, DRI2Buffer2Ptr buffer)
 
 #endif
 
-static void I830DRI2ReferenceBuffer(DRI2Buffer2Ptr buffer)
-{
-	if (buffer) {
-		I830DRI2BufferPrivatePtr private = buffer->driverPrivate;
-		private->refcnt++;
-	}
-}
-
 static void
 I830DRI2CopyRegion(DrawablePtr drawable, RegionPtr pRegion,
 		   DRI2BufferPtr destBuffer, DRI2BufferPtr sourceBuffer)
@@ -553,6 +545,13 @@ I830DRI2CopyRegion(DrawablePtr drawable, RegionPtr pRegion,
 
 #if DRI2INFOREC_VERSION >= 4
 
+static void I830DRI2ReferenceBuffer(DRI2Buffer2Ptr buffer)
+{
+	if (buffer) {
+		I830DRI2BufferPrivatePtr private = buffer->driverPrivate;
+		private->refcnt++;
+	}
+}
 
 static int
 I830DRI2DrawablePipe(DrawablePtr pDraw)
@@ -1291,9 +1290,9 @@ out_complete:
 	DRI2WaitMSCComplete(client, draw, target_msc, 0, 0);
 	return TRUE;
 }
-#endif
 
 static int dri2_server_generation;
+#endif
 
 Bool I830DRI2ScreenInit(ScreenPtr screen)
 {
@@ -1321,6 +1320,7 @@ Bool I830DRI2ScreenInit(ScreenPtr screen)
 		return FALSE;
 	}
 
+#if DRI2INFOREC_VERSION >= 4
 	if (serverGeneration != dri2_server_generation) {
 	    dri2_server_generation = serverGeneration;
 	    if (!i830_dri2_register_frame_event_resource_types()) {
@@ -1329,6 +1329,8 @@ Bool I830DRI2ScreenInit(ScreenPtr screen)
 		return FALSE;
 	    }
 	}
+#endif
+
 	intel->deviceName = drmGetDeviceNameFromFd(intel->drmSubFD);
 	memset(&info, '\0', sizeof(info));
 	info.fd = intel->drmSubFD;


More information about the xorg-commit mailing list