*/
if (surf_source->committed_buffers) {
TPL_OBJECT_LOCK(&surf_source->obj);
- __tpl_list_fini(surf_source->committed_buffers,
- (tpl_free_func_t)__cb_buffer_remove_from_list);
while (!__tpl_list_is_empty(surf_source->committed_buffers)) {
tbm_surface_queue_error_e tsq_err = TBM_SURFACE_QUEUE_ERROR_NONE;
tbm_surface_h tbm_surface =
surf_source->in_use_buffers = NULL;
}
- if (surf_source->committed_buffers) {
- __tpl_list_free(surf_source->committed_buffers,
- (tpl_free_func_t)__cb_buffer_remove_from_list);
- surf_source->committed_buffers = NULL;
+ while (!__tpl_list_is_empty(surf_source->committed_buffers)) {
+ tbm_surface_queue_error_e tsq_err = TBM_SURFACE_QUEUE_ERROR_NONE;
+ tbm_surface_h tbm_surface =
+ __tpl_list_pop_front(surf_source->committed_buffers,
+ (tpl_free_func_t)__cb_buffer_remove_from_list);
+
+ TRACE_ASYNC_END((int)tbm_surface, "[COMMIT ~ RELEASE] BO(%d)",
+ tbm_bo_export(tbm_surface_internal_get_bo(
+ tbm_surface, 0)));
+ tsq_err = tbm_surface_queue_release(surf_source->tbm_queue, tbm_surface);
+ if (tsq_err != TBM_SURFACE_QUEUE_ERROR_NONE)
+ TPL_ERR("Failed to release. tbm_surface(%p) tsq_err(%d)",
+ tbm_surface, tsq_err);
}
if (surf_source->vblank_waiting_buffers) {