Commit c47739b9 authored by Daniel Stone's avatar Daniel Stone

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: 's avatarDaniel Stone <daniels@collabora.com>
parent 4d5fb495
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment