summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm2/ecore_drm2.c
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2017-04-07 09:09:56 -0500
committerDerek Foreman <derekf@osg.samsung.com>2017-04-07 09:09:56 -0500
commite5dd8327ba2a47c6075b26f288dc04d52411b395 (patch)
tree70513f779fed9f4a8faf125295fe4de9ac845f8b /src/lib/ecore_drm2/ecore_drm2.c
parent7a2aeec9ce9085e2b53190b0f6db914bc8c67035 (diff)
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.
Diffstat (limited to 'src/lib/ecore_drm2/ecore_drm2.c')
-rw-r--r--src/lib/ecore_drm2/ecore_drm2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/ecore_drm2/ecore_drm2.c b/src/lib/ecore_drm2/ecore_drm2.c
index 491ed47..b60641e 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)
223 EINA_SAFETY_ON_TRUE_RETURN_VAL((fd < 0), -1); 223 EINA_SAFETY_ON_TRUE_RETURN_VAL((fd < 0), -1);
224 224
225 memset(&ctx, 0, sizeof(ctx)); 225 memset(&ctx, 0, sizeof(ctx));
226 ctx.version = DRM_EVENT_CONTEXT_VERSION; 226 ctx.version = 2;
227 ctx.page_flip_handler = drmctx->page_flip_handler; 227 ctx.page_flip_handler = drmctx->page_flip_handler;
228 ctx.vblank_handler = drmctx->vblank_handler; 228 ctx.vblank_handler = drmctx->vblank_handler;
229 229