xf86-video-intel: src/i830_dri.c

Jesse Barnes jbarnes at kemper.freedesktop.org
Fri Feb 5 17:19:37 PST 2010


 src/i830_dri.c |   16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

New commits:
commit 6610bcbac51c9ac970128012f0d4566d8cfba000
Author: Jesse Barnes <jbarnes at virtuousgeek.org>
Date:   Fri Feb 5 17:18:50 2010 -0800

    DRI2: only use version 4 APIs if kernel support exists
    
    Check for page flipping support before enabling flip and vblank event
    support needed for the new DRI2 APIs.
    
    Signed-off-by: Jesse Barnes <jbarnes at virtuousgeek.org>

diff --git a/src/i830_dri.c b/src/i830_dri.c
index 0996629..d08beec 100644
--- a/src/i830_dri.c
+++ b/src/i830_dri.c
@@ -907,13 +907,15 @@ Bool I830DRI2ScreenInit(ScreenPtr screen)
 
 	info.CopyRegion = I830DRI2CopyRegion;
 #if DRI2INFOREC_VERSION >= 4
-	info.version = 4;
-	info.ScheduleSwap = I830DRI2ScheduleSwap;
-	info.GetMSC = I830DRI2GetMSC;
-	info.ScheduleWaitMSC = I830DRI2ScheduleWaitMSC;
-	info.numDrivers = 1;
-	info.driverNames = driverNames;
-	driverNames[0] = info.driverName;
+	if (intel->use_pageflipping) {
+	    info.version = 4;
+	    info.ScheduleSwap = I830DRI2ScheduleSwap;
+	    info.GetMSC = I830DRI2GetMSC;
+	    info.ScheduleWaitMSC = I830DRI2ScheduleWaitMSC;
+	    info.numDrivers = 1;
+	    info.driverNames = driverNames;
+	    driverNames[0] = info.driverName;
+	}
 #endif
 
 	return DRI2ScreenInit(screen, &info);


More information about the xorg-commit mailing list