From fec5bf78bb09f90b282d86c03253eaeafa77cec4 Mon Sep 17 00:00:00 2001 From: "joonbum.ko" Date: Thu, 6 Jul 2017 19:43:41 +0900 Subject: [PATCH 01/16] tpl: Modified the syntax to enable threads. Change-Id: Ic08f11e71414711067c6e27fa70bdf31c38f4149 Signed-off-by: joonbum.ko --- src/tpl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tpl.c b/src/tpl.c index c8966c4..0f75d5f 100644 --- a/src/tpl.c +++ b/src/tpl.c @@ -224,11 +224,12 @@ __tpl_display_choose_backend(tpl_handle_t native_dpy) int wl_egl_thread = 1; #else int wl_egl_thread = 0; +#endif thread = getenv("TPL_WL_EGL_THREAD"); if (thread) wl_egl_thread = atoi(thread); -#endif + plat_name = getenv("EGL_PLATFORM"); if (plat_name) { -- 2.7.4 From 281a799b310fb928b9d3c597198065b1ab3457c0 Mon Sep 17 00:00:00 2001 From: "joonbum.ko" Date: Thu, 6 Jul 2017 20:08:35 +0900 Subject: [PATCH 02/16] tpl_wayland_egl: Removed duplicated logs. Change-Id: I7a2abb66fa20a5060c7add7b8150eda2b562c9c9 Signed-off-by: joonbum.ko --- src/tpl_wayland_egl.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/tpl_wayland_egl.c b/src/tpl_wayland_egl.c index 175ebeb..714c890 100644 --- a/src/tpl_wayland_egl.c +++ b/src/tpl_wayland_egl.c @@ -1192,12 +1192,6 @@ __tpl_wayland_egl_surface_dequeue_buffer(tpl_surface_t *surface, uint64_t timeou TRACE_ASYNC_BEGIN((int)wayland_egl_buffer, "[DEQ]~[ENQ] BO_NAME:%d", tbm_bo_export(wayland_egl_buffer->bo)); - TPL_LOG_B("WL_EGL", - "[DEQ][R] tpl_wayland_surface_t(%p) wl_buffer(%p) tbm_surface(%p) bo(%d)", - wayland_egl_surface, - wayland_egl_buffer->wl_proxy, - tbm_surface, tbm_bo_export(wayland_egl_buffer->bo)); - wayland_egl_buffer->dx = wl_egl_window->dx; wayland_egl_buffer->dy = wl_egl_window->dy; wayland_egl_buffer->width = wl_egl_window->width; -- 2.7.4 From c33e11e46519e78517b2a9942691d4aa02f03f47 Mon Sep 17 00:00:00 2001 From: "joonbum.ko" Date: Wed, 19 Jul 2017 15:11:12 +0900 Subject: [PATCH 03/16] Package version up to 1.3.1 Change-Id: I47d7908822e5118f7ae47cbbcde32ff0703edde6 Signed-off-by: joonbum.ko --- packaging/libtpl-egl.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/libtpl-egl.spec b/packaging/libtpl-egl.spec index 37d996d..c07ea50 100644 --- a/packaging/libtpl-egl.spec +++ b/packaging/libtpl-egl.spec @@ -1,7 +1,7 @@ #TPL VERSION MACROS %define TPL_VERSION_MAJOR 1 %define TPL_VERSION_MINOR 3 -%define TPL_VERSION_PATCH 0 +%define TPL_VERSION_PATCH 1 %define TPL_VERSION %{TPL_VERSION_MAJOR}.%{TPL_VERSION_MINOR}.%{TPL_VERSION_PATCH} #TPL WINDOW SYSTEM DEFINITION -- 2.7.4 From ff15ea68363a3868accfbc6f141fed757f7ae511 Mon Sep 17 00:00:00 2001 From: "joonbum.ko" Date: Wed, 19 Jul 2017 16:18:09 +0900 Subject: [PATCH 04/16] tpl_wayland_egl_thread: Added NULL checking when creating thread and thread context. This commit can fix the SVACE issues below. [SVACE][WGID][259615] DEREF_OF_NULL.RET.ALLOC [SVACE][WGID][264745] DEREF_OF_NULL.RET.ALLOC Change-Id: Ida8202a811e34ebddb3557abd43daa3610336179 Signed-off-by: joonbum.ko --- src/tpl_wayland_egl_thread.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/tpl_wayland_egl_thread.c b/src/tpl_wayland_egl_thread.c index 126ce3a..dd9ee0b 100644 --- a/src/tpl_wayland_egl_thread.c +++ b/src/tpl_wayland_egl_thread.c @@ -232,11 +232,24 @@ _twe_thread_tdm_source_destroy(twe_tdm_source *tdm_source) twe_thread* twe_thread_create(void) { - twe_thread *thread; + twe_thread *thread = NULL; + + thread = calloc(1, sizeof(twe_thread)); + if (!thread) { + TPL_ERR("Failed to allocate twe_thread"); + return NULL; + } if (!_twe_ctx) { GMainContext *context; + _twe_ctx = calloc(1, sizeof(twe_thread_context)); + if (!_twe_ctx) { + TPL_ERR("Failed to allocate _twe_ctx"); + if (thread) + free(thread); + return NULL; + } context = g_main_context_new(); _twe_ctx->twe_loop = g_main_loop_new(context, FALSE); @@ -244,9 +257,9 @@ twe_thread_create(void) _twe_ctx->twe_thread = g_thread_new("twe_thread", _twe_thread_loop, _twe_ctx); + _twe_ctx->ref_cnt = 0; } - thread = calloc(1, sizeof(twe_thread)); thread->ctx = _twe_ctx; _twe_ctx->ref_cnt++; -- 2.7.4 From 67826d9e6fc8bd7a128a5401210369effb67cd89 Mon Sep 17 00:00:00 2001 From: "joonbum.ko" Date: Wed, 19 Jul 2017 16:28:50 +0900 Subject: [PATCH 05/16] tpl_wayland_egl_thread: Fixed potential memory leak problem. Change-Id: I277770bcc41ef6bbffcd8be705f09a944dec97bd Signed-off-by: joonbum.ko --- src/tpl_wayland_egl_thread.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/tpl_wayland_egl_thread.c b/src/tpl_wayland_egl_thread.c index dd9ee0b..b0f2312 100644 --- a/src/tpl_wayland_egl_thread.c +++ b/src/tpl_wayland_egl_thread.c @@ -775,6 +775,12 @@ __cb_twe_buffer_free_callback(twe_wl_buffer_info *buf_info) wayland_tbm_client_destroy_buffer(disp_source->wl_tbm_client, (void *)buf_info->wl_buffer); + if (buf_info->rects) { + free(buf_info->rects); + buf_info->rects = NULL; + buf_info->num_rects = 0; + } + free(buf_info); } -- 2.7.4 From b5141870c80c2a6f54aa3cfc9eb05b5a66cdf749 Mon Sep 17 00:00:00 2001 From: "joonbum.ko" Date: Wed, 19 Jul 2017 16:43:50 +0900 Subject: [PATCH 06/16] tpl_wayland_egl_thread: Fixed a bug code that set transform value in buf_info. Change-Id: I0e2f5201db361f198a8498068d0caf132bb38480 Signed-off-by: joonbum.ko --- src/tpl_wayland_egl_thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tpl_wayland_egl_thread.c b/src/tpl_wayland_egl_thread.c index b0f2312..fa2cc89 100644 --- a/src/tpl_wayland_egl_thread.c +++ b/src/tpl_wayland_egl_thread.c @@ -948,7 +948,7 @@ static void __cb_tbm_queue_trace_callback(tbm_surface_queue_h tbm_queue, buf_info->rotated = TPL_TRUE; } - buf_info->transform = wl_egl_window->rotation; + buf_info->transform = wl_egl_window->transform; wl_buffer_add_listener((void *)buf_info->wl_buffer, &wl_buffer_release_listener, tbm_surface); -- 2.7.4 From 834df073463998ef916cf886ea4e28f4bfb641b7 Mon Sep 17 00:00:00 2001 From: "joonbum.ko" Date: Wed, 19 Jul 2017 16:49:43 +0900 Subject: [PATCH 07/16] tpl_wayland_egl_thread: Fixed a issue of passing destroyed memory address. This commit can fix the SVACE issues below. [SVACE][WGID][264489] PASSED_TO_PROC_AFTER_FREE.EX Change-Id: I5b0ed5cf369990f6fe6809be375d47d79e7c2dcc Signed-off-by: joonbum.ko --- src/tpl_wayland_egl_thread.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tpl_wayland_egl_thread.c b/src/tpl_wayland_egl_thread.c index fa2cc89..ca7610c 100644 --- a/src/tpl_wayland_egl_thread.c +++ b/src/tpl_wayland_egl_thread.c @@ -390,13 +390,14 @@ _twe_thread_wl_disp_finalize(GSource *source) _twe_display_print_err(disp_source, "dispatch_queue_pending"); } + TPL_LOG_T("WL_EGL", "finalize| wl_event_queue(%p)", + disp_source->ev_queue); + wl_event_queue_destroy(disp_source->ev_queue); TPL_OBJECT_UNLOCK(&disp_source->obj); __tpl_object_fini(&disp_source->obj); - TPL_LOG_T("WL_EGL", "finalize| wl_event_queue(%p)", - disp_source->ev_queue); return; } -- 2.7.4 From 47f9d8541e0004357dc484180578ef2084871a25 Mon Sep 17 00:00:00 2001 From: "joonbum.ko" Date: Wed, 19 Jul 2017 17:38:01 +0900 Subject: [PATCH 08/16] tpl_display: Added a new frontend API that returns appropriate backend type. - New API : tpl_backend_type_t tpl_display_get_backend_type(tpl_handle_t native_dpy) - The native_dpy, which can be supported by tpl, this function will return the corresponding backend type. - It is preferable to explicitly pass the returned backend type to tpl_display_create. Change-Id: I987335e6e30c774b73d6bb79ff8c65fd05141baf Signed-off-by: joonbum.ko --- src/tpl.h | 14 ++++++++++++++ src/tpl_display.c | 12 ++++++++++++ 2 files changed, 26 insertions(+) diff --git a/src/tpl.h b/src/tpl.h index 8748add..b8277ba 100644 --- a/src/tpl.h +++ b/src/tpl.h @@ -367,6 +367,20 @@ tpl_display_filter_config(tpl_display_t *display, int *visual_id, int alpha_size); /** + * Get the tpl_backend_type from given native_dpy. + * + * native_dpy, which can be supported by tpl, this function will return the + * corresponding backend type. It is preferable to explicitly pass + * the returned backend type to tpl_display_create. + * + * @param native_dpy handle to the native display. + * @return backend type for native_dpy, TPL_BACKEND_UNKNOWN if there is no + * supported backend. + */ +tpl_backend_type_t +tpl_display_get_backend_type(tpl_handle_t native_dpy); + +/** * Create a TPL surface for the given native surface. * * @param display display used for surface creation. diff --git a/src/tpl_display.c b/src/tpl_display.c index d78f67a..f62fcfe 100644 --- a/src/tpl_display.c +++ b/src/tpl_display.c @@ -137,6 +137,18 @@ tpl_display_filter_config(tpl_display_t *display, int *visual_id, return display->backend.filter_config(display, visual_id, alpha_size); } +tpl_backend_type_t +tpl_display_get_backend_type(tpl_handle_t native_dpy) +{ + tpl_backend_type_t ret = TPL_BACKEND_UNKNOWN; + + ret = __tpl_display_choose_backend(native_dpy); + + TPL_LOG_F("native_dpy(%p) choose backend type(%d)", native_dpy, ret); + + return ret; +} + tpl_result_t tpl_display_get_native_window_info(tpl_display_t *display, tpl_handle_t window, int *width, int *height, tbm_format *format, -- 2.7.4 From b8b39c2ac42a5d50d1f7f05678ff00e7533dee18 Mon Sep 17 00:00:00 2001 From: "joonbum.ko" Date: Tue, 4 Jul 2017 16:16:18 +0900 Subject: [PATCH 09/16] tpl_wayland_egl_thread: Made tbm_surface_queue operate in GUARANTEE_CYCLE mode. - In multi-threaded architectures, tbm_surface_queue must fully guarantee the life cycle of tbm_surface so that it does not cause problems in queue_reset or surface destory, so wayland_egl_thread must operate the queue in GUARANTEE_CYCLE mode. - In order to avoid problems with surface source deletion, surf_source must remove the canceled buffer from the in_use_buffers list. - [libtbm] commit : surface_queue: added queue cancel acquire/dequeue I0857b16141894eaf6f06a3b1584e971ac380a513 commit : tbm_surface_queue: added tbm_surface_queue_mode if user set queue mode to GUARANTEE_CYCLE, user must do enqueue/acquire/release or cancel_dequeue for tbm_surface which is dequeued before tbm_surface_queue is reset Ia26ae79ca376ad69d9714500bd4dfb48ae61da79 Change-Id: Idc5b256efad8167f010dd817e1228c776b970dfb Signed-off-by: joonbum.ko --- src/tpl_wayland_egl_thread.c | 113 ++++++++++++++++++++++++++++++++----------- src/tpl_wl_egl_thread.c | 4 +- 2 files changed, 86 insertions(+), 31 deletions(-) diff --git a/src/tpl_wayland_egl_thread.c b/src/tpl_wayland_egl_thread.c index ca7610c..1274d6f 100644 --- a/src/tpl_wayland_egl_thread.c +++ b/src/tpl_wayland_egl_thread.c @@ -827,39 +827,12 @@ static const struct wl_buffer_listener wl_buffer_release_listener = { }; static void -__cb_tbm_queue_reset_callback(tbm_surface_queue_h tbm_queue, - void *data) -{ - TPL_LOG_T("WL_EGL", "tbm_queue(%p) has been reset!", tbm_queue); -} - -static void -__cb_tbm_queue_acquirable_callback(tbm_surface_queue_h surface_queue, - void *data) -{ - twe_wl_surf_source *source = (twe_wl_surf_source *)data; - uint64_t value = 1; - int ret; - - ret = write(source->event_fd, &value, sizeof(uint64_t)); - if (ret == -1) { - TPL_ERR("failed to send acquirable event. twe_wl_surf_source(%p)", - source); - return; - } -} - -static void __cb_tbm_queue_trace_callback(tbm_surface_queue_h tbm_queue, - tbm_surface_h tbm_surface, - tbm_surface_queue_trace trace, - void *data) +_twe_surface_set_wl_buffer_info(twe_wl_surf_source *surf_source, + tbm_surface_h tbm_surface) { - twe_wl_surf_source *surf_source = (twe_wl_surf_source *)data; twe_wl_buffer_info *buf_info = NULL; struct wl_egl_window *wl_egl_window = NULL; - if (trace != TBM_SURFACE_QUEUE_TRACE_DEQUEUE) return; - if (!surf_source) { TPL_ERR("Invalid parameter. twe_surface(%p)", surf_source); return; @@ -972,7 +945,80 @@ static void __cb_tbm_queue_trace_callback(tbm_surface_queue_h tbm_queue, buf_info, tbm_surface, tbm_bo_export(tbm_surface_internal_get_bo(tbm_surface, 0)), buf_info->width, buf_info->height, buf_info->transform); +} + +static void +_twe_surface_cancel_dequeued_buffer(twe_wl_surf_source *surf_source, + tbm_surface_h tbm_surface) +{ + twe_wl_buffer_info *buf_info = NULL; + + if (!surf_source) { + TPL_ERR("Invalid parameter. twe_surface(%p)", surf_source); + return; + } + + tbm_surface_internal_get_user_data(tbm_surface, KEY_BUFFER_INFO, + (void **)&buf_info); + if (!buf_info) { + TPL_ERR("Failed to get twe_wl_buffer_info from tbm_surface(%p)", + tbm_surface); + return; + } + TPL_LOG_T("WL_EGL", + "[CANCEL_BUFFER] Stop tracking of canceled tbm_surface(%p)", + tbm_surface); + + if (surf_source->in_use_buffers) { + TPL_OBJECT_LOCK(&surf_source->obj); + /* Stop tracking of this canceled tbm_surface */ + __tpl_list_remove_data(surf_source->in_use_buffers, + (void *)buf_info, TPL_FIRST, NULL); + TPL_OBJECT_UNLOCK(&surf_source->obj); + } +} + +static void +__cb_tbm_queue_reset_callback(tbm_surface_queue_h tbm_queue, + void *data) +{ + TPL_LOG_T("WL_EGL", "tbm_queue(%p) has been reset!", tbm_queue); +} + +static void +__cb_tbm_queue_acquirable_callback(tbm_surface_queue_h surface_queue, + void *data) +{ + twe_wl_surf_source *source = (twe_wl_surf_source *)data; + uint64_t value = 1; + int ret; + + ret = write(source->event_fd, &value, sizeof(uint64_t)); + if (ret == -1) { + TPL_ERR("failed to send acquirable event. twe_wl_surf_source(%p)", + source); + return; + } +} + +static void __cb_tbm_queue_trace_callback(tbm_surface_queue_h tbm_queue, + tbm_surface_h tbm_surface, + tbm_surface_queue_trace trace, + void *data) +{ + twe_wl_surf_source *surf_source = (twe_wl_surf_source *)data; + + switch (trace) { + case TBM_SURFACE_QUEUE_TRACE_DEQUEUE: + _twe_surface_set_wl_buffer_info(surf_source, tbm_surface); + break; + case TBM_SURFACE_QUEUE_TRACE_CANCEL_DEQUEUE: + _twe_surface_cancel_dequeued_buffer(surf_source, tbm_surface); + break; + default: + break; + } } static void @@ -1283,6 +1329,15 @@ _twe_surface_create_tbm_queue(twe_wl_surf_source *source, return NULL; } + if (tbm_surface_queue_set_modes( + tbm_queue, TBM_SURFACE_QUEUE_MODE_GUARANTEE_CYCLE) != + TBM_SURFACE_QUEUE_ERROR_NONE) { + TPL_ERR("Failed to set queue mode to tbm_surface_queue(%p)", + tbm_queue); + tbm_surface_queue_destroy(tbm_queue); + return NULL; + } + if (tbm_surface_queue_add_reset_cb(tbm_queue, __cb_tbm_queue_reset_callback, NULL) != TBM_SURFACE_QUEUE_ERROR_NONE) { diff --git a/src/tpl_wl_egl_thread.c b/src/tpl_wl_egl_thread.c index 04ed3ee..b45e28a 100644 --- a/src/tpl_wl_egl_thread.c +++ b/src/tpl_wl_egl_thread.c @@ -569,8 +569,8 @@ __tpl_wl_egl_surface_cancel_dequeued_buffer(tpl_surface_t *surface, tbm_surface_internal_unref(tbm_surface); - tsq_err = tbm_surface_queue_release(wayland_egl_surface->tbm_queue, - tbm_surface); + tsq_err = tbm_surface_queue_cancel_dequeue(wayland_egl_surface->tbm_queue, + tbm_surface); if (tsq_err != TBM_SURFACE_QUEUE_ERROR_NONE) { TPL_ERR("Failed to release tbm_surface(%p)", tbm_surface); return TPL_ERROR_INVALID_OPERATION; -- 2.7.4 From 5c70b1d9786daa8c45d4f95cbc7ce4f01f3f74ea Mon Sep 17 00:00:00 2001 From: "joonbum.ko" Date: Wed, 19 Jul 2017 19:17:08 +0900 Subject: [PATCH 10/16] libtpl-egl.spec: Excluded worker_test binary building. Change-Id: I47724d2be1cbdabb503d24adcf0998aad388b5d4 Signed-off-by: joonbum.ko --- packaging/libtpl-egl.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/libtpl-egl.spec b/packaging/libtpl-egl.spec index c07ea50..b9043f7 100644 --- a/packaging/libtpl-egl.spec +++ b/packaging/libtpl-egl.spec @@ -13,7 +13,7 @@ %define ENABLE_DEFAULT_LOG 0 %define ENABLE_DEFAULT_DUMP 0 %define ENABLE_OBJECT_HASH_CHECK 1 -%define ENABLE_WORKER_TEST_ONLY 1 +%define ENABLE_WORKER_TEST_ONLY 0 %define ENABLE_DEFAULT_WL_THREAD 0 #TPL INSTALL OPTION -- 2.7.4 From d0def0392f2ca7268ce29d1841963623cf8768e8 Mon Sep 17 00:00:00 2001 From: "joonbum.ko" Date: Wed, 19 Jul 2017 19:44:35 +0900 Subject: [PATCH 11/16] Package version up to 1.4.0 - DDK can use WAYLAND_EGL_THREAD backend to enable multi-thread since this version 1.4.0 Change-Id: Ic8156273e06ae6c3600ebda631e9d42a9f2f04f5 Signed-off-by: joonbum.ko --- packaging/libtpl-egl.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packaging/libtpl-egl.spec b/packaging/libtpl-egl.spec index b9043f7..6a6e4a2 100644 --- a/packaging/libtpl-egl.spec +++ b/packaging/libtpl-egl.spec @@ -1,7 +1,7 @@ #TPL VERSION MACROS %define TPL_VERSION_MAJOR 1 -%define TPL_VERSION_MINOR 3 -%define TPL_VERSION_PATCH 1 +%define TPL_VERSION_MINOR 4 +%define TPL_VERSION_PATCH 0 %define TPL_VERSION %{TPL_VERSION_MAJOR}.%{TPL_VERSION_MINOR}.%{TPL_VERSION_PATCH} #TPL WINDOW SYSTEM DEFINITION -- 2.7.4 From 775b7f40fb2a491f7069ad796c654e70bc96e86b Mon Sep 17 00:00:00 2001 From: Hoyub Lee Date: Tue, 25 Jul 2017 19:58:15 +0900 Subject: [PATCH 12/16] tpl_wayland_egl: Format of tpl_surface is now used instead of ARGB8888 Because there was no real use case using format other than ARGB8888, the format value in __tpl_wayland_egl_surface_init() was fixed as ARGB8888. However, there were cases using other formats on CTS. Therefore, the format of tpl_surface is going to be used. Change-Id: I427d1a989267b9ec0fbe03f5bb67b02ba985a039 Signed-off-by: Hoyub Lee --- src/tpl_wayland_egl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tpl_wayland_egl.c b/src/tpl_wayland_egl.c index 714c890..156b6e3 100644 --- a/src/tpl_wayland_egl.c +++ b/src/tpl_wayland_egl.c @@ -527,14 +527,14 @@ __tpl_wayland_egl_surface_init(tpl_surface_t *surface) CLIENT_QUEUE_SIZE, wl_egl_window->width, wl_egl_window->height, - TBM_FORMAT_ARGB8888); + surface->format); } else /*Why wl_surface is NULL ?*/ wayland_egl_surface->tbm_queue = tbm_surface_queue_sequence_create( CLIENT_QUEUE_SIZE, wl_egl_window->width, wl_egl_window->height, - TBM_FORMAT_ARGB8888, + surface->format, 0); if (!wayland_egl_surface->tbm_queue) { -- 2.7.4 From 884fa5cdaa9bd2363f00cce46848f556b0292037 Mon Sep 17 00:00:00 2001 From: "joonbum.ko" Date: Tue, 1 Aug 2017 14:55:35 +0900 Subject: [PATCH 13/16] libtpl-egl.spec: libwayland-egl.so was included again. - Since libwayland-egl.so is often directly dlopen, it is included again temporarily. Change-Id: Ica57a476e4d7d3a470c591a7424928b69f129e42 Signed-off-by: joonbum.ko --- packaging/libtpl-egl.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/libtpl-egl.spec b/packaging/libtpl-egl.spec index 6a6e4a2..ec86415 100644 --- a/packaging/libtpl-egl.spec +++ b/packaging/libtpl-egl.spec @@ -295,7 +295,7 @@ cp -a %{_builddir}/%{buildsubdir}/tc/libs/gtest/googletest/LICENSE %{buildroot}/ %manifest packaging/libwayland-egl.manifest %license COPYING %defattr(-,root,root,-) -%{_libdir}/libwayland-egl.so.%{WL_EGL_VERSION} +%{_libdir}/libwayland-egl.so* %files -n libwayland-egl-devel %defattr(-,root,root,-) -- 2.7.4 From 89dc6b48a3cf84625ef2d642f41f206f6e7a31d7 Mon Sep 17 00:00:00 2001 From: "joonbum.ko" Date: Tue, 1 Aug 2017 15:04:47 +0900 Subject: [PATCH 14/16] Package version up to 1.4.1 libwayland-egl : package version up to 1.2.2 Change-Id: Ic80a31bb98a5521578a57048818208ef335017dc Signed-off-by: joonbum.ko --- packaging/libtpl-egl.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packaging/libtpl-egl.spec b/packaging/libtpl-egl.spec index ec86415..8cebed8 100644 --- a/packaging/libtpl-egl.spec +++ b/packaging/libtpl-egl.spec @@ -1,7 +1,7 @@ #TPL VERSION MACROS %define TPL_VERSION_MAJOR 1 %define TPL_VERSION_MINOR 4 -%define TPL_VERSION_PATCH 0 +%define TPL_VERSION_PATCH 1 %define TPL_VERSION %{TPL_VERSION_MAJOR}.%{TPL_VERSION_MINOR}.%{TPL_VERSION_PATCH} #TPL WINDOW SYSTEM DEFINITION @@ -22,7 +22,7 @@ #WAYLAND-EGL VERSION MACROS %define WL_EGL_VERSION_MAJOR 1 %define WL_EGL_VERSION_MINOR 2 -%define WL_EGL_VERSION_PATCH 1 +%define WL_EGL_VERSION_PATCH 2 %define WL_EGL_VERSION %{WL_EGL_VERSION_MAJOR}.%{WL_EGL_VERSION_MINOR}.%{WL_EGL_VERSION_PATCH} #TPL WINDOW SYSTEM CHECK -- 2.7.4 From 47a0ca3b177d4aca4f451740e6784ea8cf681546 Mon Sep 17 00:00:00 2001 From: "joonbum.ko" Date: Wed, 2 Aug 2017 15:22:55 +0900 Subject: [PATCH 15/16] tpl_wayland_egl: Fixed wrong procedure of cancel_dequeued_buffer Change-Id: Iac13118c24e87546ffaef6116bf826285a0766e0 Signed-off-by: joonbum.ko --- src/tpl_wayland_egl.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/tpl_wayland_egl.c b/src/tpl_wayland_egl.c index 156b6e3..b1f50df 100644 --- a/src/tpl_wayland_egl.c +++ b/src/tpl_wayland_egl.c @@ -1068,20 +1068,21 @@ __tpl_wayland_egl_surface_cancel_dequeued_buffer(tpl_surface_t *surface, return TPL_ERROR_INVALID_PARAMETER; } + if (wayland_egl_surface->dequeued_buffers) { + TPL_OBJECT_LOCK(&wayland_egl_surface->base); + /* Stop tracking of this render_done tbm_surface. */ + __tpl_list_remove_data(wayland_egl_surface->dequeued_buffers, + (void *)tbm_surface, TPL_FIRST, NULL); + TPL_OBJECT_UNLOCK(&wayland_egl_surface->base); + } + if (!tbm_surface_internal_is_valid(tbm_surface)) { - TPL_ERR("Invalid buffer. tbm_surface(%p)", tbm_surface); + TPL_WARN("Invalid buffer. tbm_surface(%p)", tbm_surface); return TPL_ERROR_INVALID_PARAMETER; } tbm_surface_internal_unref(tbm_surface); - tsq_err = tbm_surface_queue_release(wayland_egl_surface->tbm_queue, - tbm_surface); - if (tsq_err != TBM_SURFACE_QUEUE_ERROR_NONE) { - TPL_ERR("Failed to release tbm_surface(%p)", tbm_surface); - return TPL_ERROR_INVALID_OPERATION; - } - TPL_LOG_B("WL_EGL", "[CANCEL BUFFER] tpl_surface(%p) tbm_surface(%p)", surface, tbm_surface); -- 2.7.4 From a83a2efe72ccd0b229ad061c9b447acff236b3c2 Mon Sep 17 00:00:00 2001 From: SooChan Lim Date: Wed, 9 Aug 2017 09:45:04 +0900 Subject: [PATCH 16/16] tpl_wayland_egl: remove the unused variable Change-Id: Id25e309dbcd59f67fa9edaa0b048577bf7a263ee --- src/tpl_wayland_egl.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/tpl_wayland_egl.c b/src/tpl_wayland_egl.c index b1f50df..689665b 100644 --- a/src/tpl_wayland_egl.c +++ b/src/tpl_wayland_egl.c @@ -1059,7 +1059,6 @@ __tpl_wayland_egl_surface_cancel_dequeued_buffer(tpl_surface_t *surface, tbm_surface_h tbm_surface) { tpl_wayland_egl_surface_t *wayland_egl_surface = NULL; - tbm_surface_queue_error_e tsq_err = TBM_SURFACE_QUEUE_ERROR_NONE; wayland_egl_surface = (tpl_wayland_egl_surface_t *)surface->backend.data; if (!wayland_egl_surface) { -- 2.7.4