From: Joonbum Ko Date: Thu, 4 Feb 2021 09:23:24 +0000 (+0900) Subject: Set presentation/commit_sync_fd of wl_egl_buffer X-Git-Tag: submit/tizen/20210316.021228~22 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=69d9fadc7d578a26de9cb8bd69c7640d96d7786c;p=platform%2Fcore%2Fuifw%2Flibtpl-egl.git Set presentation/commit_sync_fd of wl_egl_buffer Change-Id: Ib0140c1b31beabffa939cae10cc04bebccb00d5c Signed-off-by: Joonbum Ko --- diff --git a/src/tpl_wl_egl.c b/src/tpl_wl_egl.c index cea25e9..878b41f 100644 --- a/src/tpl_wl_egl.c +++ b/src/tpl_wl_egl.c @@ -2431,6 +2431,22 @@ __tpl_wl_egl_surface_enqueue_buffer(tpl_surface_t *surface, wl_egl_buffer->acquire_fence_fd = acquire_fence; wl_egl_buffer->status = ENQUEUED; + tpl_gmutex_lock(&wl_egl_surface->presentation_sync.mutex); + if (wl_egl_surface->presentation_sync.fd != -1) { + wl_egl_buffer->presentation_sync_fd = wl_egl_surface->presentation_sync.fd; + wl_egl_surface->presentation_sync.fd = -1; + } + tpl_gmutex_unlock(&wl_egl_surface->presentation_sync.mutex); + + tpl_gmutex_lock(&wl_egl_surface->commit_sync.mutex); + if (wl_egl_surface->commit_sync.fd != -1) { + wl_egl_buffer->commit_sync_fd = wl_egl_surface->commit_sync.fd; + wl_egl_surface->commit_sync.fd = -1; + TRACE_ASYNC_BEGIN(wl_egl_buffer->commit_sync_fd, "[COMMIT_SYNC] bo(%d)", + _get_tbm_surface_bo_name(tbm_surface)); + } + tpl_gmutex_unlock(&wl_egl_surface->commit_sync.mutex); + tpl_gmutex_unlock(&wl_egl_buffer->mutex); tsq_err = tbm_surface_queue_enqueue(wl_egl_surface->tbm_queue, @@ -2815,7 +2831,8 @@ __cb_presentation_feedback_presented(void *data, TRACE_ASYNC_END(wl_egl_buffer->presentation_sync_fd, "[PRESENTATION_SYNC] bo(%d)", _get_tbm_surface_bo_name(tbm_surface)); - + TPL_DEBUG("[PRESENTATION_SYNC_FD_CLOSE] wl_egl_buffer(%p) presentation_sync_fd(%d)", + wl_egl_buffer, wl_egl_buffer->presentation_sync_fd); close(wl_egl_buffer->presentation_sync_fd); wl_egl_buffer->presentation_sync_fd = -1; }