mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
egl: add fd_display_gpu to struct dri2_egl_display
fd opened on display gpu is saved in fd_display_gpu. It is later used to create dri screen on display gpu. 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
0813c1a6fa
commit
4e6e30215d
7 changed files with 9 additions and 0 deletions
|
|
@ -244,6 +244,7 @@ struct dri2_egl_display
|
|||
const __DRIconfigOptionsExtension *configOptions;
|
||||
const __DRImutableRenderBufferDriverExtension *mutable_render_buffer;
|
||||
int fd;
|
||||
int fd_display_gpu;
|
||||
|
||||
/* dri2_initialize/dri2_terminate increment/decrement this count, so does
|
||||
* dri2_make_current (tracks if there are active contexts/surfaces). */
|
||||
|
|
|
|||
|
|
@ -1676,6 +1676,7 @@ dri2_initialize_android(_EGLDisplay *disp)
|
|||
return _eglError(EGL_BAD_ALLOC, "eglInitialize");
|
||||
|
||||
dri2_dpy->fd = -1;
|
||||
dri2_dpy->fd_display_gpu = -1;
|
||||
ret = hw_get_module(GRALLOC_HARDWARE_MODULE_ID,
|
||||
(const hw_module_t **)&dri2_dpy->gralloc);
|
||||
if (ret) {
|
||||
|
|
|
|||
|
|
@ -352,6 +352,7 @@ dri2_initialize_device(_EGLDisplay *disp)
|
|||
dev = disp->PlatformDisplay;
|
||||
|
||||
dri2_dpy->fd = -1;
|
||||
dri2_dpy->fd_display_gpu = -1;
|
||||
disp->Device = dev;
|
||||
disp->DriverData = (void *) dri2_dpy;
|
||||
err = "DRI2: failed to load driver";
|
||||
|
|
|
|||
|
|
@ -692,6 +692,7 @@ dri2_initialize_drm(_EGLDisplay *disp)
|
|||
return _eglError(EGL_BAD_ALLOC, "eglInitialize");
|
||||
|
||||
dri2_dpy->fd = -1;
|
||||
dri2_dpy->fd_display_gpu = -1;
|
||||
disp->DriverData = (void *) dri2_dpy;
|
||||
|
||||
gbm = disp->PlatformDisplay;
|
||||
|
|
|
|||
|
|
@ -334,6 +334,7 @@ dri2_initialize_surfaceless(_EGLDisplay *disp)
|
|||
return _eglError(EGL_BAD_ALLOC, "eglInitialize");
|
||||
|
||||
dri2_dpy->fd = -1;
|
||||
dri2_dpy->fd_display_gpu = -1;
|
||||
disp->DriverData = (void *) dri2_dpy;
|
||||
|
||||
/* When ForceSoftware is false, we try the HW driver. When ForceSoftware
|
||||
|
|
|
|||
|
|
@ -2093,6 +2093,7 @@ dri2_initialize_wayland_drm(_EGLDisplay *disp)
|
|||
return _eglError(EGL_BAD_ALLOC, "eglInitialize");
|
||||
|
||||
dri2_dpy->fd = -1;
|
||||
dri2_dpy->fd_display_gpu = -1;
|
||||
disp->DriverData = (void *) dri2_dpy;
|
||||
|
||||
if (dri2_wl_formats_init(&dri2_dpy->formats) < 0)
|
||||
|
|
|
|||
|
|
@ -1452,6 +1452,7 @@ dri2_initialize_x11_swrast(_EGLDisplay *disp)
|
|||
return _eglError(EGL_BAD_ALLOC, "eglInitialize");
|
||||
|
||||
dri2_dpy->fd = -1;
|
||||
dri2_dpy->fd_display_gpu = -1;
|
||||
if (!dri2_get_xcb_connection(disp, dri2_dpy))
|
||||
goto cleanup;
|
||||
|
||||
|
|
@ -1541,6 +1542,7 @@ dri2_initialize_x11_dri3(_EGLDisplay *disp)
|
|||
return _eglError(EGL_BAD_ALLOC, "eglInitialize");
|
||||
|
||||
dri2_dpy->fd = -1;
|
||||
dri2_dpy->fd_display_gpu = -1;
|
||||
if (!dri2_get_xcb_connection(disp, dri2_dpy))
|
||||
goto cleanup;
|
||||
|
||||
|
|
@ -1650,6 +1652,7 @@ dri2_initialize_x11_dri2(_EGLDisplay *disp)
|
|||
return _eglError(EGL_BAD_ALLOC, "eglInitialize");
|
||||
|
||||
dri2_dpy->fd = -1;
|
||||
dri2_dpy->fd_display_gpu = -1;
|
||||
if (!dri2_get_xcb_connection(disp, dri2_dpy))
|
||||
goto cleanup;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue