xf86-video-intel: Branch 'dri2-swapbuffers' - src/drmmode_display.c
Jesse Barnes
jbarnes at kemper.freedesktop.org
Fri May 1 15:03:20 PDT 2009
src/drmmode_display.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit 24537a01635fc393421910eac91e9514c22e6498
Author: Jesse Barnes <jbarnes at virtuousgeek.org>
Date: Fri May 1 15:02:40 2009 -0700
Fix page flip detection
Need to check for ENOENT not -EBADF.
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 8d27d48..aeb9af5 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -962,6 +962,7 @@ Bool drmmode_pre_init(ScrnInfoPtr pScrn, int fd, int cpp)
I830Ptr pI830 = I830PTR(pScrn);
drmmode_ptr drmmode;
unsigned int i, bad_crtc = 0;
+ int ret;
drmmode = xnfalloc(sizeof *drmmode);
drmmode->fd = fd;
@@ -986,8 +987,8 @@ Bool drmmode_pre_init(ScrnInfoPtr pScrn, int fd, int cpp)
xf86InitialConfiguration(pScrn, TRUE);
/* Check for swapbuffers support */
- drmModePageFlip(drmmode->fd, &bad_crtc, 1, -1);
- if (errno != -EBADF) { /* bad CRTC or FB number */
+ ret = drmModePageFlip(drmmode->fd, &bad_crtc, 1, -1);
+ if (ret < 0 && errno == ENOENT) { /* bad CRTC or FB number */
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Kernel page flipping support detected, enabling\n");
pI830->use_swap_buffers = TRUE;
More information about the xorg-commit
mailing list