summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Liu <net147@gmail.com>2017-07-26 21:20:50 +1000
committerJonathan Liu <net147@gmail.com>2017-07-26 12:56:40 +0000
commit50275fbcaf60ed41bd4486f8239cc7914c8af0f5 (patch)
tree44dce8d847f53d6d5043e9a1fdaf4d7af1c1e799
parentaf7e756155cf44e05816cf91be04e13d9e7ca084 (diff)
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: I1d2066d5ab485ea571f016a8660829f435821c82 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmdevice.cpp2
-rw-r--r--src/plugins/platforms/linuxfb/qlinuxfbdrmscreen.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmdevice.cpp b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmdevice.cpp
index 5f85e4b0b0..e218d580a2 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmdevice.cpp
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmdevice.cpp
@@ -142,7 +142,7 @@ void QEglFSKmsGbmDevice::handleDrmEvent()
{
drmEventContext drmEvent;
memset(&drmEvent, 0, sizeof(drmEvent));
- drmEvent.version = DRM_EVENT_CONTEXT_VERSION;
+ drmEvent.version = 2;
drmEvent.vblank_handler = nullptr;
drmEvent.page_flip_handler = pageFlipHandler;
diff --git a/src/plugins/platforms/linuxfb/qlinuxfbdrmscreen.cpp b/src/plugins/platforms/linuxfb/qlinuxfbdrmscreen.cpp
index c9fbb8281c..e15d6fee24 100644
--- a/src/plugins/platforms/linuxfb/qlinuxfbdrmscreen.cpp
+++ b/src/plugins/platforms/linuxfb/qlinuxfbdrmscreen.cpp
@@ -314,7 +314,7 @@ void QLinuxFbDevice::swapBuffers(Output *output)
while (output->backFb == fbIdx) {
drmEventContext drmEvent;
memset(&drmEvent, 0, sizeof(drmEvent));
- drmEvent.version = DRM_EVENT_CONTEXT_VERSION;
+ drmEvent.version = 2;
drmEvent.vblank_handler = nullptr;
drmEvent.page_flip_handler = pageFlipHandler;
// Blocks until there is something to read on the drm fd