diff options
author | Daniel Stone <daniels@collabora.com> | 2017-04-07 15:15:05 +0100 |
---|---|---|
committer | Daniel Stone <daniels@collabora.com> | 2017-04-07 15:15:05 +0100 |
commit | c47739b9a132150852558dd6c69f20be07df055a (patch) | |
tree | 289629cddd0c037e5541f5b71e77dfd0f31e5429 | |
parent | 4d5fb49585bf10dcb3d06d0129745c116f236d35 (diff) |
drm-legacy: Use correct DRM event context version
DRM_EVENT_CONTEXT_VERSION is the latest context version supported by
whatever version of libdrm is present. kmscube was blindly asserting
it supported whatever version that may be, even if it actually didn't.
With libdrm 2.4.78, setting a higher context version than 2 will attempt
to call the page_flip_handler2 vfunc if it was non-NULL, which being a
random chunk of stack memory, it might well have been.
Set the version as 2, which should be bumped only with the appropriate
version checks.
Signed-off-by: Daniel Stone <daniels@collabora.com>
-rw-r--r-- | drm-legacy.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drm-legacy.c b/drm-legacy.c index 8eac417..3b407f8 100644 --- a/drm-legacy.c +++ b/drm-legacy.c @@ -45,7 +45,7 @@ static int legacy_run(const struct gbm *gbm, const struct egl *egl) { fd_set fds; drmEventContext evctx = { - .version = DRM_EVENT_CONTEXT_VERSION, + .version = 2, .page_flip_handler = page_flip_handler, }; struct gbm_bo *bo; |