Discussion:
[PATCH weston] compositor-drm: correctly set the version of the drmEventContext
Emil Velikov
2017-04-04 17:07:34 UTC
Permalink
From: Emil Velikov <***@collabora.com>

We implement v2 so use that instead of the DRM_EVENT_CONTEXT_VERSION
macro.

The latter defines the version of the drmEventContext struct declared in
the header [used in the current build] and can be 2, 3 or even 1000.

Cc: Daniel Stone <***@collabora.com>
Signed-off-by: Emil Velikov <***@collabora.com>
---
libweston/compositor-drm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
index 00623076..f9b8dd79 100644
--- a/libweston/compositor-drm.c
+++ b/libweston/compositor-drm.c
@@ -1568,7 +1568,7 @@ on_drm_input(int fd, uint32_t mask, void *data)
drmEventContext evctx;

memset(&evctx, 0, sizeof evctx);
- evctx.version = DRM_EVENT_CONTEXT_VERSION;
+ evctx.version = 2;
evctx.page_flip_handler = page_flip_handler;
evctx.vblank_handler = vblank_handler;
drmHandleEvent(fd, &evctx);
--
2.11.1
Daniel Stone
2017-04-07 13:24:45 UTC
Permalink
Hi Emil,
Post by Emil Velikov
We implement v2 so use that instead of the DRM_EVENT_CONTEXT_VERSION
macro.
The latter defines the version of the drmEventContext struct declared in
the header [used in the current build] and can be 2, 3 or even 1000.
Thanks. I already had this in my atomic series, but have pulled this
patch separately:
To ssh://git.freedesktop.org/git/wayland/weston
95d48a2a..863e66b0 push -> master

Cheers,
Daniel

Loading...