[mutter] gpu/kms: Use correct DRM event context version
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] gpu/kms: Use correct DRM event context version
- Date: Wed, 2 Jan 2019 14:45:53 +0000 (UTC)
commit 177d0c2d63679df771aead70ff5ecd6f6951b213
Author: Daniel Stone <daniels collabora com>
Date: Wed Jan 2 15:44:52 2019 +0100
gpu/kms: Use correct DRM event context version
DRM_EVENT_CONTEXT_VERSION is the latest context version supported by
whatever version of libdrm is present. Mutter 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.
https://bugzilla.gnome.org/show_bug.cgi?id=781034
src/backends/native/meta-gpu-kms.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/backends/native/meta-gpu-kms.c b/src/backends/native/meta-gpu-kms.c
index 974f8f425..5b1ee107f 100644
--- a/src/backends/native/meta-gpu-kms.c
+++ b/src/backends/native/meta-gpu-kms.c
@@ -371,7 +371,7 @@ meta_gpu_kms_wait_for_flip (MetaGpuKms *gpu_kms,
}
memset (&evctx, 0, sizeof evctx);
- evctx.version = DRM_EVENT_CONTEXT_VERSION;
+ evctx.version = 2;
evctx.page_flip_handler = page_flip_handler;
while (TRUE)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]