summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSooChan Lim <sc1.lim@samsung.com>2022-04-07 18:45:25 +0900
committerSooChan Lim <sc1.lim@samsung.com>2022-04-13 12:15:18 +0900
commit5988be6f6dae679f29650a4a2a8dfb67554e5715 (patch)
treeed344431c431e59b48f816340caef2a995cecb63
parent53858a95f2b059f04e0d8e4e63ac6f0904af8b0f (diff)
downloadmesa-5988be6f6dae679f29650a4a2a8dfb67554e5715.tar.gz
mesa-5988be6f6dae679f29650a4a2a8dfb67554e5715.tar.bz2
mesa-5988be6f6dae679f29650a4a2a8dfb67554e5715.zip
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 83c3b426476..acc8ea9ca13 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) {