summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2017-04-07 15:37:48 +0100
committerTomeu Vizoso <tomeu.vizoso@collabora.com>2017-04-10 08:10:52 +0200
commit98a6dde4906c5ca393bb54a125f3c3b3131f774e (patch)
tree8ac1edb7bd21b68e2bc22ef09870e48afd03a87b
parentdbe21cb52f602eef11bf5ac083691e5b2b0a35ba (diff)
downloaddrm_hwcomposer-98a6dde4906c5ca393bb54a125f3c3b3131f774e.tar.gz
drm_hwcomposer-98a6dde4906c5ca393bb54a125f3c3b3131f774e.tar.xz
drm_hwcomposer: Use correct DRM event context version
Explicitly declare which DRM event context version we want to use, rather than just the latest one libdrm supports. New versions may change semantics, or extend the structure, in ways we're unaware of. Stick with version 2, which is the version that introduced page_flip_handler. Change-Id: I71e33f787b2b724596f8289d95311730f7aff8ff Signed-off-by: Daniel Stone <daniels@collabora.com>
-rw-r--r--drmeventlistener.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/drmeventlistener.cpp b/drmeventlistener.cpp
index 0d65c69..bb3da57 100644
--- a/drmeventlistener.cpp
+++ b/drmeventlistener.cpp
@@ -166,7 +166,7 @@ void DrmEventListener::Routine() {
if (FD_ISSET(drm_->fd(), &fds_)) {
drmEventContext event_context = {
- .version = DRM_EVENT_CONTEXT_VERSION,
+ .version = 2,
.vblank_handler = DrmEventListener::VBlankHandler,
.page_flip_handler = NULL};
drmHandleEvent(drm_->fd(), &event_context);