summaryrefslogtreecommitdiff
path: root/libdrm/xf86drmMode.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdrm/xf86drmMode.c')
-rw-r--r--libdrm/xf86drmMode.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/libdrm/xf86drmMode.c b/libdrm/xf86drmMode.c
index 6d85113a..e9516851 100644
--- a/libdrm/xf86drmMode.c
+++ b/libdrm/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);
+}