From e5dd8327ba2a47c6075b26f288dc04d52411b395 Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Fri, 7 Apr 2017 09:09:56 -0500 Subject: [PATCH] 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. --- src/lib/ecore_drm2/ecore_drm2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/ecore_drm2/ecore_drm2.c b/src/lib/ecore_drm2/ecore_drm2.c index 491ed47e54..b60641e01e 100644 --- a/src/lib/ecore_drm2/ecore_drm2.c +++ b/src/lib/ecore_drm2/ecore_drm2.c @@ -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;