summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSooChan Lim <sc1.lim@samsung.com>2022-04-07 18:45:25 +0900
committerXuelian Bai <xuelian.bai@samsung.com>2024-01-18 09:31:56 +0800
commitad1bff80838ab8bfa295cbdc0d0512af65546cde (patch)
treeefbfd48c02b1600453eea4587ddeba01d6d2ce79
parent1b596cfd68d7291b106e7066a72d80667f5a7853 (diff)
downloadmesa-ad1bff80838ab8bfa295cbdc0d0512af65546cde.tar.gz
mesa-ad1bff80838ab8bfa295cbdc0d0512af65546cde.tar.bz2
mesa-ad1bff80838ab8bfa295cbdc0d0512af65546cde.zip
check the master_fd
Display Server(Enlightenment) always use the master_fd, so if the process can get the master_fd from tbm_drm_helper_get_master_fd(), there is no need to get the authentication information. If the process does not have the master_fd, it needs to get the authentication from the master process which is the Display Server(Enlightenment). Change-Id: Ib18113468b133c5335f1f280760383e40977062a
-rwxr-xr-xsrc/egl/drivers/dri2/platform_tizen.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/src/egl/drivers/dri2/platform_tizen.c b/src/egl/drivers/dri2/platform_tizen.c
index 9bf72a52363..502906fd2cf 100755
--- a/src/egl/drivers/dri2/platform_tizen.c
+++ b/src/egl/drivers/dri2/platform_tizen.c
@@ -1633,28 +1633,21 @@ dri2_initialize_tizen(_EGLDisplay *disp)
}
dri2_dpy->fd = loader_open_device(tbm_bufmgr_device_name);
- } else {
- if (!tbm_drm_helper_get_auth_info(&dri2_dpy->fd, NULL, NULL)) {
-
- /* FIXME: tbm_drm_helper_get_auth_info() does not support the case of
- * display server for now. this code is fallback routine for
- * that Enlightenment Server fails on tbm_drm_helper_get_auth_info.
- * When tbm_drm_helper_get_auth_info() supports display server
- * case, then remove below routine.
- */
-#if 1
+ } else if (tbm_drm_helper_get_master_fd() >= 0) {
+ // display server always has master_fd,
+ // so tbm_bufmgr_fd is the master_fd if it can get the tbm_master_fd.
tbm_bufmgr_device_name = loader_get_device_name_for_fd(tbm_bufmgr_fd);
if (tbm_bufmgr_device_name == NULL) {
err = "DRI2: failed to get tbm_bufmgr device name";
goto cleanup_device;
}
dri2_dpy->fd = loader_open_device(tbm_bufmgr_device_name);
-#else
+ } else {
+ if (!tbm_drm_helper_get_auth_info(&dri2_dpy->fd, NULL, NULL)) {
err = "DRI2: failed to get fd from tbm_drm_helper_get_auth_info()";
goto cleanup_device;
-#endif
}
- }
+ }
dri2_dpy->driver_name = loader_get_driver_for_fd(dri2_dpy->fd);
if (dri2_dpy->driver_name == NULL) {