From d7db79d971b8f1bb2177d14718b136789b337d39 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Fri, 7 Apr 2017 14:15:26 +0100 Subject: tests/kms_*: Use correct DRM context version DRM_EVENT_CONTEXT_VERSION is the latest context version supported by whatever version of libdrm is present. igt 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 Reviewed-by: Petri Latvala --- tests/kms_frontbuffer_tracking.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/kms_frontbuffer_tracking.c') diff --git a/tests/kms_frontbuffer_tracking.c b/tests/kms_frontbuffer_tracking.c index 5f372d9f..e75ea549 100644 --- a/tests/kms_frontbuffer_tracking.c +++ b/tests/kms_frontbuffer_tracking.c @@ -2278,7 +2278,7 @@ static void wait_flip_event(void) drmEventContext evctx; struct pollfd pfd; - evctx.version = DRM_EVENT_CONTEXT_VERSION; + evctx.version = 2; evctx.vblank_handler = NULL; evctx.page_flip_handler = flip_handler; -- cgit v1.2.3