diff options
author | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-11-19 13:50:22 -0500 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2009-12-01 12:11:53 -0500 |
commit | 7bd4d7be5c8c35a401b1589201e5d43a64d3f05b (patch) | |
tree | 52b997780ce81907238d700f8cd1424013267275 | |
parent | 6b95a207c1fd552e7d017837c5eaf1b0173a48c9 (diff) |
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@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Kristian Høgsberg <krh@bitplanet.net>
-rw-r--r-- | drivers/gpu/drm/drm_crtc.c | 2 | ||||
-rw-r--r-- | 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 ac2fa193072b..3bc870d38a97 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, | |||
2527 | goto out; | 2527 | goto out; |
2528 | } | 2528 | } |
2529 | 2529 | ||
2530 | e->event.base.type = DRM_EVENT_VBLANK; | 2530 | e->event.base.type = DRM_EVENT_FLIP_COMPLETE; |
2531 | e->event.base.length = sizeof e->event; | 2531 | e->event.base.length = sizeof e->event; |
2532 | e->event.user_data = page_flip->user_data; | 2532 | e->event.user_data = page_flip->user_data; |
2533 | e->base.event = &e->event.base; | 2533 | e->base.event = &e->event.base; |
diff --git a/include/drm/drm.h b/include/drm/drm.h index 3919a4f792ae..309d0a5ed68d 100644 --- a/include/drm/drm.h +++ b/include/drm/drm.h | |||
@@ -718,6 +718,7 @@ struct drm_event { | |||
718 | }; | 718 | }; |
719 | 719 | ||
720 | #define DRM_EVENT_VBLANK 0x01 | 720 | #define DRM_EVENT_VBLANK 0x01 |
721 | #define DRM_EVENT_FLIP_COMPLETE 0x02 | ||
721 | 722 | ||
722 | struct drm_event_vblank { | 723 | struct drm_event_vblank { |
723 | struct drm_event base; | 724 | struct drm_event base; |