]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drm: use page flip event to signal flip completion
authorJesse Barnes <jbarnes@virtuousgeek.org>
Thu, 19 Nov 2009 18:50:22 +0000 (10:50 -0800)
committerEric Anholt <eric@anholt.net>
Tue, 1 Dec 2009 17:11:53 +0000 (09:11 -0800)
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@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Kristian Høgsberg <krh@bitplanet.net>
drivers/gpu/drm/drm_crtc.c
include/drm/drm.h

index ac2fa193072bae8fb6eb853288a3e3f5db8fcbd4..3bc870d38a97f7b4656341ae7851e00a0f7e1743 100644 (file)
@@ -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;
index 3919a4f792ae919fc08835fa87ed3a23476aec88..309d0a5ed68d5b0bc13f76be032790bd76548dea 100644 (file)
@@ -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;