From: Joonbum Ko Date: Thu, 25 Jun 2020 06:41:25 +0000 (+0900) Subject: Added logging function to print status of buffer lists. X-Git-Tag: submit/tizen/20200720.050615~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3f87255dfd96439e86ef6d6d0289d86af4c2e38c;p=platform%2Fcore%2Fuifw%2Flibtpl-egl.git Added logging function to print status of buffer lists. Change-Id: I876514cace0d708445c9109f984f521f9a5f6ce1 Signed-off-by: Joonbum Ko --- diff --git a/src/tpl_wayland_egl_thread.c b/src/tpl_wayland_egl_thread.c index 1b12f4e..5bff04f 100755 --- a/src/tpl_wayland_egl_thread.c +++ b/src/tpl_wayland_egl_thread.c @@ -634,6 +634,66 @@ _twe_display_print_err(twe_wl_disp_source *disp_source, disp_source->last_error = errno; } +static void +_twe_print_buffer_list(twe_wl_surf_source *surf_source) +{ + int count = 0; + int idx = 0; + tpl_list_node_t *node = NULL; + tbm_surface_h tbm_surface = NULL; + + /* vblank waiting list */ + count = __tpl_list_get_count(surf_source->vblank_waiting_buffers); + TPL_DEBUG("VBLANK WAITING BUFFERS | surf_source(%p) list(%p) count(%d)", + surf_source, surf_source->vblank_waiting_buffers, count); + + while ((!node && + (node = __tpl_list_get_front_node(surf_source->vblank_waiting_buffers))) || + (node && (node = __tpl_list_node_next(node)))) { + tbm_surface = (tbm_surface_h)__tpl_list_node_get_data(node); + TPL_DEBUG("VBLANK WAITING BUFFERS | %d | tbm_surface(%p) bo(%d)", + idx, tbm_surface, + tbm_bo_export(tbm_surface_internal_get_bo(tbm_surface, 0))); + idx++; + } + + idx = 0; + node = NULL; + + /* in use buffers list */ + count = __tpl_list_get_count(surf_source->in_use_buffers); + TPL_DEBUG("DEQUEUED BUFFERS | surf_source(%p) list(%p) count(%d)", + surf_source, surf_source->in_use_buffers, count); + + while ((!node && + (node = __tpl_list_get_front_node(surf_source->in_use_buffers))) || + (node && (node = __tpl_list_node_next(node)))) { + tbm_surface = (tbm_surface_h)__tpl_list_node_get_data(node); + TPL_DEBUG("DEQUEUED BUFFERS | %d | tbm_surface(%p) bo(%d)", + idx, tbm_surface, + tbm_bo_export(tbm_surface_internal_get_bo(tbm_surface, 0))); + idx++; + } + + idx = 0; + node = NULL; + + /* committed buffers list */ + count = __tpl_list_get_count(surf_source->committed_buffers); + TPL_DEBUG("COMMITTED BUFFERS | surf_source(%p) list(%p) count(%d)", + surf_source, surf_source->committed_buffers, count); + + while ((!node && + (node = __tpl_list_get_front_node(surf_source->committed_buffers))) || + (node && (node = __tpl_list_node_next(node)))) { + tbm_surface = (tbm_surface_h)__tpl_list_node_get_data(node); + TPL_DEBUG("COMMITTED BUFFERS | %d | tbm_surface(%p) bo(%d)", + idx, tbm_surface, + tbm_bo_export(tbm_surface_internal_get_bo(tbm_surface, 0))); + idx++; + } +} + static gboolean _twe_thread_wl_disp_prepare(GSource *source, gint *time) { @@ -3499,6 +3559,8 @@ twe_surface_queue_force_flush(twe_surface_h twe_surface) twe_wl_surf_source *surf_source = (twe_wl_surf_source *)twe_surface; tbm_surface_queue_error_e tsq_err = TBM_SURFACE_QUEUE_ERROR_NONE; + _twe_print_buffer_list(twe_surface); + if ((tsq_err = tbm_surface_queue_flush(surf_source->tbm_queue)) != TBM_SURFACE_QUEUE_ERROR_NONE) { TPL_ERR("[TIMEOUT_RESET] Failed to flush tbm_surface_queue(%p) tsq_err(%d)",