summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2010-02-05 17:18:50 -0800
committerJesse Barnes <jbarnes@virtuousgeek.org>2010-02-05 17:18:50 -0800
commit6610bcbac51c9ac970128012f0d4566d8cfba000 (patch)
tree8f746c9d9b4e1ec5d332333090bf7dd82b5c3672
parent1a76fa5574e8e8f88ac3518a4e4494e1af301dc1 (diff)
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@virtuousgeek.org>
-rw-r--r--src/i830_dri.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/i830_dri.c b/src/i830_dri.c
index 0996629e..d08beecc 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);