ecore_drm2: Use correct drm context version

We should be setting this to the context version we understand, not
the highest version supported by the library.

From Daniel Stone's recent intel-gpu-tools commit fixing the same bug:
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.
This commit is contained in:
Derek Foreman 2017-04-07 09:09:56 -05:00
parent 7a2aeec9ce
commit e5dd8327ba
1 changed files with 1 additions and 1 deletions

View File

@ -223,7 +223,7 @@ ecore_drm2_event_handle(int fd, Ecore_Drm2_Context *drmctx)
EINA_SAFETY_ON_TRUE_RETURN_VAL((fd < 0), -1);
memset(&ctx, 0, sizeof(ctx));
ctx.version = DRM_EVENT_CONTEXT_VERSION;
ctx.version = 2;
ctx.page_flip_handler = drmctx->page_flip_handler;
ctx.vblank_handler = drmctx->vblank_handler;