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>2023-08-15 14:02:15 +0800
commitae459e412efe72479b91088e5c9d3ea538f7937f (patch)
tree330375dd34eada292ef788da97d0072da67d038c
parent16516438c2488e9c99e478c4479b3ffe50f5159d (diff)
downloadmesa-ae459e412efe72479b91088e5c9d3ea538f7937f.tar.gz
mesa-ae459e412efe72479b91088e5c9d3ea538f7937f.tar.bz2
mesa-ae459e412efe72479b91088e5c9d3ea538f7937f.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 cffc979d23e..70a1d795f8d 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);