summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoonbum Ko <joonbum.ko@samsung.com>2020-03-18 19:40:59 +0900
committerJoonbum Ko <joonbum.ko@samsung.com>2020-03-30 14:55:35 +0900
commit0d3f1e70bab093150d2e74a151107cb0a61e9cc7 (patch)
tree2b64655fbdfaec17d3e58ccd626ee558dcc5c789
parentc2dd2416fbe39abd24248cb66676b9ba13329b9f (diff)
downloadmesa-0d3f1e70bab093150d2e74a151107cb0a61e9cc7.tar.gz
mesa-0d3f1e70bab093150d2e74a151107cb0a61e9cc7.tar.bz2
mesa-0d3f1e70bab093150d2e74a151107cb0a61e9cc7.zip
Fix to use TPL_BACKEND_WAYLAND_THREAD.
- It is a valid backend only for wayland clients. Change-Id: Ifea5a5b5bd03074f267c4be02d325ed544840753 Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
-rwxr-xr-xsrc/egl/drivers/dri2/platform_tizen.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/egl/drivers/dri2/platform_tizen.c b/src/egl/drivers/dri2/platform_tizen.c
index b431da78e98..5735594dd9d 100755
--- a/src/egl/drivers/dri2/platform_tizen.c
+++ b/src/egl/drivers/dri2/platform_tizen.c
@@ -1514,6 +1514,7 @@ dri2_initialize_tizen(_EGLDriver *drv, _EGLDisplay *disp)
_EGLDevice *dev;
struct dri2_egl_display *dri2_dpy;
tpl_display_t *tpl_display = NULL;
+ tpl_backend_type_t tpl_backend = TPL_BACKEND_UNKNOWN;
const char *err;
int tbm_bufmgr_fd = -1;
char *tbm_bufmgr_device_name = NULL;
@@ -1539,8 +1540,14 @@ dri2_initialize_tizen(_EGLDriver *drv, _EGLDisplay *disp)
dri2_dpy->own_device = 1;
}
- /* TPL_BACKEND_UNKNOWN type make checking runtime type check */
- tpl_display = tpl_display_create(TPL_BACKEND_UNKNOWN, disp->PlatformDisplay);
+ /* Can find the backend type of libtpl-egl through PlatformDisplay */
+ tpl_backend = tpl_display_get_backend_type(disp->PlatformDisplay);
+ /* If tpl_backend is a wayland client, thread backend should be used
+ * to use dri2_surf->out_fence_fd. */
+ if (tpl_backend == TPL_BACKEND_WAYLAND)
+ tpl_backend = TPL_BACKEND_WAYLAND_THREAD;
+
+ tpl_display = tpl_display_create(tpl_backend, disp->PlatformDisplay);
if (!tpl_display) {
err = "DRI2: failed to create tpl_display";
goto cleanup_display;