mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 04:20:08 +01:00
egl/wayland: keep display fd open for prime
Keep the display fd open for creating DRI screen on display gpu in case of prime. Signed-off-by: Yogesh Mohanmarimuthu <yogesh.mohanmarimuthu@amd.com> Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13422>
This commit is contained in:
parent
94946251d0
commit
57b22f99a9
1 changed files with 6 additions and 0 deletions
|
|
@ -2165,8 +2165,14 @@ dri2_initialize_wayland_drm(_EGLDisplay *disp)
|
|||
goto cleanup;
|
||||
}
|
||||
|
||||
dri2_dpy->fd_display_gpu = fcntl(dri2_dpy->fd, F_DUPFD_CLOEXEC, 3);
|
||||
dri2_dpy->fd = loader_get_user_preferred_fd(dri2_dpy->fd,
|
||||
&dri2_dpy->is_different_gpu);
|
||||
if (!dri2_dpy->is_different_gpu) {
|
||||
close(dri2_dpy->fd_display_gpu);
|
||||
dri2_dpy->fd_display_gpu = -1;
|
||||
}
|
||||
|
||||
dev = _eglAddDevice(dri2_dpy->fd, false);
|
||||
if (!dev) {
|
||||
_eglError(EGL_NOT_INITIALIZED, "DRI2: failed to find EGLDevice");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue