From: Joonbum Ko Date: Wed, 3 Mar 2021 01:57:25 +0000 (+0900) Subject: Fixed a problem occured by use_wait_vblank exception. X-Git-Tag: submit/tizen/20210316.021228~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b80b12e7fe1936f18345e72c56241448ae8f4eb2;p=platform%2Fcore%2Fuifw%2Flibtpl-egl.git Fixed a problem occured by use_wait_vblank exception. Change-Id: Id7ba6ab41d7fef4441cf3a03ef63074c6d2c0256 Signed-off-by: Joonbum Ko --- diff --git a/src/tpl_wl_egl.c b/src/tpl_wl_egl.c index fba6b66..c9b2592 100644 --- a/src/tpl_wl_egl.c +++ b/src/tpl_wl_egl.c @@ -811,17 +811,17 @@ __tpl_wl_egl_display_init(tpl_display_t *display) goto free_display; } - TPL_LOG_T("WL_EGL", - "[INIT DISPLAY] wl_egl_display(%p) tpl_gthread(%p) wl_display(%p)", - wl_egl_display, - wl_egl_display->thread, - wl_egl_display->wl_display); - - TPL_LOG_T("WL_EGL", - "USE_WAIT_VBLANK(%s) TIZEN_SURFACE_SHM(%s) USE_EXPLICIT_SYNC(%s)", - wl_egl_display->use_wait_vblank ? "TRUE" : "FALSE", - wl_egl_display->tss ? "TRUE" : "FALSE", - wl_egl_display->use_explicit_sync ? "TRUE" : "FALSE"); + TPL_INFO("[DISPLAY_INIT]", + "wl_egl_display(%p) tpl_gthread(%p) wl_display(%p)", + wl_egl_display, + wl_egl_display->thread, + wl_egl_display->wl_display); + + TPL_INFO("[DISPLAY_INIT]", + "USE_WAIT_VBLANK(%s) TIZEN_SURFACE_SHM(%s) USE_EXPLICIT_SYNC(%s)", + wl_egl_display->use_wait_vblank ? "TRUE" : "FALSE", + wl_egl_display->tss ? "TRUE" : "FALSE", + wl_egl_display->use_explicit_sync ? "TRUE" : "FALSE"); return TPL_ERROR_NONE; @@ -2344,7 +2344,7 @@ __tpl_wl_egl_surface_cancel_dequeued_buffer(tpl_surface_t *surface, return TPL_ERROR_INVALID_OPERATION; } - TPL_LOG_T("WL_EGL", "[CANCEL BUFFER] wl_egl_surface(%p) tbm_surface(%p) bo(%d)", + TPL_INFO("[CANCEL_BUFFER]", "wl_egl_surface(%p) tbm_surface(%p) bo(%d)", wl_egl_surface, tbm_surface, _get_tbm_surface_bo_name(tbm_surface)); return TPL_ERROR_NONE; @@ -2479,6 +2479,7 @@ __thread_func_waiting_source_dispatch(tpl_gsource *gsource, uint64_t message) tpl_wl_egl_buffer_t *wl_egl_buffer = (tpl_wl_egl_buffer_t *)tpl_gsource_get_data(gsource); tpl_wl_egl_surface_t *wl_egl_surface = wl_egl_buffer->wl_egl_surface; + tpl_wl_egl_display_t *wl_egl_display = wl_egl_surface->wl_egl_display; tbm_surface_h tbm_surface = wl_egl_buffer->tbm_surface; wl_egl_surface->render_done_cnt++; @@ -2496,7 +2497,7 @@ __thread_func_waiting_source_dispatch(tpl_gsource *gsource, uint64_t message) tpl_gmutex_lock(&wl_egl_surface->surf_mutex); - if (wl_egl_surface->vblank_done) + if (!wl_egl_display->use_wait_vblank || wl_egl_surface->vblank_done) _thread_wl_surface_commit(wl_egl_surface, wl_egl_buffer); else __tpl_list_push_back(wl_egl_surface->vblank_waiting_buffers, @@ -2592,7 +2593,7 @@ _thread_surface_queue_acquire(tpl_wl_egl_surface_t *wl_egl_surface) } if (ready_to_commit) { - if (wl_egl_surface->vblank_done) + if (!wl_egl_display->use_wait_vblank || wl_egl_surface->vblank_done) ready_to_commit = TPL_TRUE; else { wl_egl_buffer->status = WAITING_VBLANK; @@ -3086,7 +3087,7 @@ _thread_wl_surface_commit(tpl_wl_egl_surface_t *wl_egl_surface, wl_egl_buffer, wl_egl_buffer->wl_buffer, wl_egl_buffer->tbm_surface, wl_egl_buffer->bo_name); - if (wl_egl_display->tdm_initialized && + if (wl_egl_display->use_wait_vblank && _thread_surface_vblank_wait(wl_egl_surface) != TPL_ERROR_NONE) TPL_ERR("Failed to set wait vblank.");