Add one more patch for better integration with the nvidia binary driver
This commit is contained in:
parent
6c7b30274b
commit
7d570e0164
@ -0,0 +1,60 @@
|
|||||||
|
From 12c471a80334127984f0bd251ecea6a7eb3f1414 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Hans de Goede <hdegoede@redhat.com>
|
||||||
|
Date: Mon, 19 Dec 2016 20:50:48 +0100
|
||||||
|
Subject: [PATCH xserver] glamor: glamor_egl_get_display: Return NULL if
|
||||||
|
eglGetPlatformDisplayEXT returns NULL
|
||||||
|
|
||||||
|
If the libEGL we are using has eglGetPlatformDisplayEXT, yet it still
|
||||||
|
returns NULL, then this very likely means that it does not support
|
||||||
|
the type (e.g. EGL_PLATFORM_GBM_MESA) passed in, and then returning NULL
|
||||||
|
is the right thing to do.
|
||||||
|
|
||||||
|
This avoids falling back to an eglGetDisplay() implementation which does
|
||||||
|
not understands the passed in gbm handle, treats it as a pointer to
|
||||||
|
something else completely, followed by a crash sooner or later.
|
||||||
|
|
||||||
|
Specifically this fixes using the nvidia binary driver, with nvidia's
|
||||||
|
libEGL + the modesetting driver on a secondary GPU crashing inside
|
||||||
|
glamor_egl_init() sometimes.
|
||||||
|
|
||||||
|
Cc: Adam Jackson <ajax@redhat.com>
|
||||||
|
Cc: Eric Anholt <eric@anholt.net>
|
||||||
|
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
||||||
|
---
|
||||||
|
glamor/glamor_egl.c | 4 ++++
|
||||||
|
glamor/glamor_egl.h | 4 +---
|
||||||
|
2 files changed, 5 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/glamor/glamor_egl.c b/glamor/glamor_egl.c
|
||||||
|
index 9cc0f8d..4bde637 100644
|
||||||
|
--- a/glamor/glamor_egl.c
|
||||||
|
+++ b/glamor/glamor_egl.c
|
||||||
|
@@ -769,6 +769,10 @@ glamor_egl_init(ScrnInfoPtr scrn, int fd)
|
||||||
|
|
||||||
|
glamor_egl->display = glamor_egl_get_display(EGL_PLATFORM_GBM_MESA,
|
||||||
|
glamor_egl->gbm);
|
||||||
|
+ if (!glamor_egl->display) {
|
||||||
|
+ xf86DrvMsg(scrn->scrnIndex, X_ERROR, "eglGetDisplay() failed\n");
|
||||||
|
+ goto error;
|
||||||
|
+ }
|
||||||
|
#else
|
||||||
|
glamor_egl->display = eglGetDisplay((EGLNativeDisplayType) (intptr_t) fd);
|
||||||
|
#endif
|
||||||
|
diff --git a/glamor/glamor_egl.h b/glamor/glamor_egl.h
|
||||||
|
index 6b05f57..2c6d307 100644
|
||||||
|
--- a/glamor/glamor_egl.h
|
||||||
|
+++ b/glamor/glamor_egl.h
|
||||||
|
@@ -67,9 +67,7 @@ glamor_egl_get_display(EGLint type, void *native)
|
||||||
|
PFNEGLGETPLATFORMDISPLAYEXTPROC getPlatformDisplayEXT =
|
||||||
|
(void *) eglGetProcAddress("eglGetPlatformDisplayEXT");
|
||||||
|
if (getPlatformDisplayEXT)
|
||||||
|
- dpy = getPlatformDisplayEXT(type, native, NULL);
|
||||||
|
- if (dpy)
|
||||||
|
- return dpy;
|
||||||
|
+ return getPlatformDisplayEXT(type, native, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Welp, everything is awful. */
|
||||||
|
--
|
||||||
|
2.9.3
|
||||||
|
|
@ -45,7 +45,7 @@
|
|||||||
Summary: X.Org X11 X server
|
Summary: X.Org X11 X server
|
||||||
Name: xorg-x11-server
|
Name: xorg-x11-server
|
||||||
Version: 1.19.0
|
Version: 1.19.0
|
||||||
Release: 2%{?gitdate:.%{gitdate}}%{dist}
|
Release: 3%{?gitdate:.%{gitdate}}%{dist}
|
||||||
URL: http://www.x.org
|
URL: http://www.x.org
|
||||||
License: MIT
|
License: MIT
|
||||||
Group: User Interface/X
|
Group: User Interface/X
|
||||||
@ -94,6 +94,7 @@ Patch13: 0003-xfree86-Add-options-support-for-OutputClass-Options.patch
|
|||||||
Patch14: 0004-xfree86-xf86platformProbe-split-finding-pci-info-and.patch
|
Patch14: 0004-xfree86-xf86platformProbe-split-finding-pci-info-and.patch
|
||||||
Patch15: 0005-xfree86-Allow-overriding-primary-GPU-detection-from-.patch
|
Patch15: 0005-xfree86-Allow-overriding-primary-GPU-detection-from-.patch
|
||||||
Patch16: 0006-xfree86-Add-ModulePath-support-for-OutputClass-confi.patch
|
Patch16: 0006-xfree86-Add-ModulePath-support-for-OutputClass-confi.patch
|
||||||
|
Patch17: 0001-glamor-glamor_egl_get_display-Return-NULL-if-eglGetP.patch
|
||||||
|
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1389886
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1389886
|
||||||
Patch21: 0001-Revert-damage-Make-damageRegionProcessPending-take-a.patch
|
Patch21: 0001-Revert-damage-Make-damageRegionProcessPending-take-a.patch
|
||||||
@ -604,6 +605,9 @@ find %{inst_srcdir}/hw/xfree86 -name \*.c -delete
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Dec 20 2016 Hans de Goede <hdegoede@redhat.com> - 1.19.0-3
|
||||||
|
- Add one more patch for better integration with the nvidia binary driver
|
||||||
|
|
||||||
* Thu Dec 15 2016 Hans de Goede <hdegoede@redhat.com> - 1.19.0-2
|
* Thu Dec 15 2016 Hans de Goede <hdegoede@redhat.com> - 1.19.0-2
|
||||||
- Add some patches for better integration with the nvidia binary driver
|
- Add some patches for better integration with the nvidia binary driver
|
||||||
- Add a patch from upstream fixing a crash (rhbz#1389886)
|
- Add a patch from upstream fixing a crash (rhbz#1389886)
|
||||||
|
Loading…
Reference in New Issue
Block a user