xserver: Branch 'master'
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sun Dec 17 17:50:16 UTC 2023
glamor/glamor_egl.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit e2eeaab2a4b3d4d3c500f3480214f8c962c3213b
Author: msizanoen1 <msizanoen at qtmlabs.xyz>
Date: Sat Feb 5 13:34:27 2022 +0700
glamor: Use render node for glamor device path where possible
On certain system deployments, /dev/dri/card* nodes aren't directly
accessible to the currently logged in user, but the display server only
access it by asking systemd-logind to open the device for it. This
causes the X server to fail when trying to re-open the card* device
directly, causing all use of DRI3 to fail.
Fix this by using the render device path instead where possible.
diff --git a/glamor/glamor_egl.c b/glamor/glamor_egl.c
index 5382eb2bc..dc8409dcc 100644
--- a/glamor/glamor_egl.c
+++ b/glamor/glamor_egl.c
@@ -927,7 +927,9 @@ glamor_egl_screen_init(ScreenPtr screen, struct glamor_context *glamor_ctx)
/* To do DRI3 device FD generation, we need to open a new fd
* to the same device we were handed in originally.
*/
- glamor_egl->device_path = drmGetDeviceNameFromFd2(glamor_egl->fd);
+ glamor_egl->device_path = drmGetRenderDeviceNameFromFd(glamor_egl->fd);
+ if (!glamor_egl->device_path)
+ glamor_egl->device_path = drmGetDeviceNameFromFd2(glamor_egl->fd);
if (!dri3_screen_init(screen, &glamor_dri3_info)) {
xf86DrvMsg(scrn->scrnIndex, X_ERROR,
More information about the xorg-commit
mailing list