[Intel-gfx] [PATCH 2/2] drm: use page flip event to signal flip completion

Jesse Barnes jbarnes at virtuousgeek.org
Thu Nov 19 19:50:22 CET 2009


From fa621056b43d24ca97b61863c8566ac12696ce25 Mon Sep 17 00:00:00 2001
From: Jesse Barnes <jbarnes at virtuousgeek.org>
Date: Thu, 19 Nov 2009 10:25:46 -0800
Subject: [PATCH 2/2] drm: use page flip event to signal flip completion

We don't actually know which frame number the flip will complete on, so
userspace needs a specific flip notification to tell it when the last flip
completed.

Signed-off-by: Jesse Barnes <jbarnes at virtuousgeek.org>
---
 drivers/gpu/drm/drm_crtc.c |    2 +-
 include/drm/drm.h          |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index ac2fa19..3bc870d 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -2527,7 +2527,7 @@ int drm_mode_page_flip_ioctl(struct drm_device *dev,
 			goto out;
 		}
 
-		e->event.base.type = DRM_EVENT_VBLANK;
+		e->event.base.type = DRM_EVENT_FLIP_COMPLETE;
 		e->event.base.length = sizeof e->event;
 		e->event.user_data = page_flip->user_data;
 		e->base.event = &e->event.base;
diff --git a/include/drm/drm.h b/include/drm/drm.h
index 3919a4f..309d0a5 100644
--- a/include/drm/drm.h
+++ b/include/drm/drm.h
@@ -718,6 +718,7 @@ struct drm_event {
 };
 
 #define DRM_EVENT_VBLANK 0x01
+#define DRM_EVENT_FLIP_COMPLETE 0x02
 
 struct drm_event_vblank {
 	struct drm_event base;
-- 
1.6.1.3




More information about the Intel-gfx mailing list