From f393494b728527648a021ef13c07aa2278135758 Mon Sep 17 00:00:00 2001 From: Joonbum Ko Date: Thu, 18 Apr 2019 16:39:43 +0900 Subject: [PATCH] Added TRACE at the missed point. Change-Id: I70f6bdd58f2962b4e9b9224eda2c83545b4b1ee3 Signed-off-by: Joonbum Ko --- src/tpl_tbm.c | 4 ++++ src/tpl_wayland_egl.c | 14 +++++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/tpl_tbm.c b/src/tpl_tbm.c index df39918..5fbf2e9 100644 --- a/src/tpl_tbm.c +++ b/src/tpl_tbm.c @@ -536,6 +536,8 @@ __tpl_tbm_surface_enqueue_buffer(tpl_surface_t *surface, return TPL_ERROR_INVALID_PARAMETER; } + TRACE_ASYNC_END((void *)tbm_surface, "[DEQ]~[ENQ] BO(%d)", tbm_bo_export(tbm_surface_internal_get_bo(tbm_surface, 0))); + tbm_surface_internal_unref(tbm_surface); if (surface->type == TPL_SURFACE_TYPE_PIXMAP) { @@ -686,6 +688,8 @@ __tpl_tbm_surface_dequeue_buffer(tpl_surface_t *surface, uint64_t timeout_ns, surface, tbm_queue, tbm_surface, tbm_bo_export(tbm_surface_internal_get_bo(tbm_surface, 0))); + TRACE_ASYNC_BEGIN((void *)tbm_surface, "[DEQ]~[ENQ] BO(%d)", tbm_bo_export(tbm_surface_internal_get_bo(tbm_surface, 0))); + return tbm_surface; } diff --git a/src/tpl_wayland_egl.c b/src/tpl_wayland_egl.c index f9debe1..80a2812 100644 --- a/src/tpl_wayland_egl.c +++ b/src/tpl_wayland_egl.c @@ -824,8 +824,7 @@ __tpl_wayland_egl_surface_commit(tpl_surface_t *surface, __tpl_wayland_egl_get_wayland_buffer_from_tbm_surface(tbm_surface); TPL_ASSERT(wayland_egl_buffer); - TRACE_ASYNC_END((int)wayland_egl_buffer, "[DEQ]~[ENQ] BO_NAME:%d", - tbm_bo_export(wayland_egl_buffer->bo)); + TRACE_MARK("[COMMIT] BO_NAME:%d", tbm_bo_export(wayland_egl_buffer->bo)); TPL_IMAGE_DUMP(tbm_surface, surface->width, surface->height); @@ -998,9 +997,6 @@ __tpl_wayland_egl_surface_enqueue_buffer(tpl_surface_t *surface, wayland_egl_buffer->is_new = TPL_FALSE; - if (wayland_egl_surface->vblank_done == TPL_FALSE) - __tpl_wayland_egl_surface_wait_vblank(surface); - if (sync_fence != -1) { tbm_sync_fence_wait(sync_fence, -1); close(sync_fence); @@ -1022,6 +1018,14 @@ __tpl_wayland_egl_surface_enqueue_buffer(tpl_surface_t *surface, return TPL_ERROR_INVALID_OPERATION; } + TRACE_ASYNC_END((int)wayland_egl_buffer, "[DEQ]~[ENQ] BO_NAME:%d", + tbm_bo_export(wayland_egl_buffer->bo)); + + TRACE_BEGIN("[WAIT_VBLANK]"); + if (wayland_egl_surface->vblank_done == TPL_FALSE) + __tpl_wayland_egl_surface_wait_vblank(surface); + TRACE_END(); + tsq_err = tbm_surface_queue_acquire(wayland_egl_surface->tbm_queue, &tbm_surface); if (tsq_err != TBM_SURFACE_QUEUE_ERROR_NONE) { -- 2.7.4