summaryrefslogtreecommitdiff
path: root/xf86drmMode.c
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2009-12-03 14:17:26 -0800
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-12-03 14:17:26 -0800
commit53addc5d6ef7406d9fab5ea481cf68fa011870f1 (patch)
treeeb43991923600b5751e04539438e5fffebb61cb3 /xf86drmMode.c
parentdb50f5127421ac8f4e3ce4eb7c27d27475781488 (diff)
parentee746a83cecd99d4c380fbc5d391399a6d9fde9e (diff)
downloadlibdrm-53addc5d6ef7406d9fab5ea481cf68fa011870f1.tar.gz
libdrm-53addc5d6ef7406d9fab5ea481cf68fa011870f1.tar.bz2
libdrm-53addc5d6ef7406d9fab5ea481cf68fa011870f1.zip
Merge branch 'pageflip' of git://people.freedesktop.org/~jbarnes/drm
Conflicts: include/drm/drm.h - RMFB had its signature changed to avoid uint32_t
Diffstat (limited to 'xf86drmMode.c')
-rw-r--r--xf86drmMode.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/xf86drmMode.c b/xf86drmMode.c
index 6d85113a..e9516851 100644
--- a/xf86drmMode.c
+++ b/xf86drmMode.c
@@ -700,7 +700,17 @@ int drmHandleEvent(int fd, drmEventContextPtr evctx)
vblank->tv_usec,
U642VOID (vblank->user_data));
break;
-
+ case DRM_EVENT_FLIP_COMPLETE:
+ if (evctx->version < 1 ||
+ evctx->page_flip_handler == NULL)
+ break;
+ vblank = (struct drm_event_vblank *) e;
+ evctx->page_flip_handler(fd,
+ vblank->sequence,
+ vblank->tv_sec,
+ vblank->tv_usec,
+ U642VOID (vblank->user_data));
+ break;
default:
break;
}
@@ -710,3 +720,16 @@ int drmHandleEvent(int fd, drmEventContextPtr evctx)
return 0;
}
+int drmModePageFlip(int fd, uint32_t crtc_id, uint32_t fb_id,
+ uint32_t flags, void *user_data)
+{
+ struct drm_mode_crtc_page_flip flip;
+
+ flip.fb_id = fb_id;
+ flip.crtc_id = crtc_id;
+ flip.user_data = VOID2U64(user_data);
+ flip.flags = flags;
+ flip.reserved = 0;
+
+ return drmIoctl(fd, DRM_IOCTL_MODE_PAGE_FLIP, &flip);
+}