diff options
author | Daniel Stone <daniels@collabora.com> | 2017-04-07 14:27:58 +0100 |
---|---|---|
committer | Olivier Fourdan <ofourdan@redhat.com> | 2017-09-22 18:45:59 +0200 |
commit | 60ae865a703cb2c51c0b00cd768a46a20d79f0f1 (patch) | |
tree | 1d8a2472b05ba1772af0612fdff0c1637ba6ac14 /hw | |
parent | df4d01e6aa957ec8eb2814832de2f78ca42ee238 (diff) |
modesetting: Set correct DRM event context version
DRM_EVENT_CONTEXT_VERSION is the latest context version supported by
whatever version of libdrm is present. modesetting 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.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Daniel Stone <daniels@collabora.com>
(cherry picked from commit 0c8e6ed85810e96d84173a52d628863802a78d82)
Diffstat (limited to 'hw')
-rw-r--r-- | hw/xfree86/drivers/modesetting/vblank.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/xfree86/drivers/modesetting/vblank.c b/hw/xfree86/drivers/modesetting/vblank.c index 04a895269..8682f4d91 100644 --- a/hw/xfree86/drivers/modesetting/vblank.c +++ b/hw/xfree86/drivers/modesetting/vblank.c @@ -402,7 +402,7 @@ ms_vblank_screen_init(ScreenPtr screen) modesettingEntPtr ms_ent = ms_ent_priv(scrn); xorg_list_init(&ms_drm_queue); - ms->event_context.version = DRM_EVENT_CONTEXT_VERSION; + ms->event_context.version = 2; ms->event_context.vblank_handler = ms_drm_handler; ms->event_context.page_flip_handler = ms_drm_handler; |