From b878cb5845cae4f83baacbff67310fe6319874dc Mon Sep 17 00:00:00 2001 From: Joonbum Ko Date: Tue, 18 Jan 2022 15:17:49 +0900 Subject: [PATCH 01/16] Change the handle of last_enq_buffer to tbm_surface_h - to check validation for the handle of last_enq_buffer. Change-Id: Ib92b28cd3bc6bfa553fb5de57afd9fc8cfcf0cdc Signed-off-by: Joonbum Ko --- src/tpl_wl_egl_thread.c | 49 ++++++++++++++++++++++++++----------------------- 1 file changed, 26 insertions(+), 23 deletions(-) diff --git a/src/tpl_wl_egl_thread.c b/src/tpl_wl_egl_thread.c index 18652be..44d8f92 100755 --- a/src/tpl_wl_egl_thread.c +++ b/src/tpl_wl_egl_thread.c @@ -116,7 +116,7 @@ struct _tpl_wl_egl_surface { tpl_wl_egl_buffer_t *buffers[BUFFER_ARRAY_SIZE]; int buffer_cnt; /* the number of using wl_egl_buffers */ tpl_gmutex buffers_mutex; - tpl_wl_egl_buffer_t *last_enq_buffer; + tbm_surface_h last_enq_buffer; tpl_list_t *presentation_feedbacks; /* for tracing presentation feedbacks */ @@ -2443,28 +2443,33 @@ __tpl_wl_egl_surface_dequeue_buffer(tpl_surface_t *surface, uint64_t timeout_ns, TPL_OBJECT_UNLOCK(surface); tpl_gmutex_lock(&wl_egl_surface->surf_mutex); - if (wl_egl_surface->reset == TPL_TRUE && wl_egl_surface->last_enq_buffer) { - tpl_wl_egl_buffer_t *last_enq_buffer = wl_egl_surface->last_enq_buffer; - - tpl_gmutex_lock(&last_enq_buffer->mutex); - if (last_enq_buffer->status > ENQUEUED && - last_enq_buffer->status < COMMITTED) { - tpl_result_t wait_result; - TPL_INFO("[DEQ_AFTER_RESET]", - "waiting for previous buffer(%p) commit", last_enq_buffer); - tpl_gmutex_unlock(&wl_egl_surface->surf_mutex); - wait_result = tpl_cond_timed_wait(&last_enq_buffer->cond, - &last_enq_buffer->mutex, - 200); /* 200ms */ - tpl_gmutex_lock(&wl_egl_surface->surf_mutex); - if (wait_result == TPL_ERROR_TIME_OUT) { - TPL_WARN("timeout occured waiting signaled. wl_egl_buffer(%p)", - last_enq_buffer); - wl_egl_surface->last_enq_buffer = NULL; + if (wl_egl_surface->reset == TPL_TRUE && + tbm_surface_internal_is_valid(wl_egl_surface->last_enq_buffer)) { + tpl_wl_egl_buffer_t *enqueued_buffer = + _get_wl_egl_buffer(wl_egl_surface->last_enq_buffer); + + if (enqueued_buffer) { + tpl_gmutex_lock(&enqueued_buffer->mutex); + if (enqueued_buffer->status >= ENQUEUED && + enqueued_buffer->status < COMMITTED) { + tpl_result_t wait_result; + TPL_INFO("[DEQ_AFTER_RESET]", + "waiting for previous wl_egl_buffer(%p) commit", + enqueued_buffer); + tpl_gmutex_unlock(&wl_egl_surface->surf_mutex); + wait_result = tpl_cond_timed_wait(&enqueued_buffer->cond, + &enqueued_buffer->mutex, + 200); /* 200ms */ + tpl_gmutex_lock(&wl_egl_surface->surf_mutex); + if (wait_result == TPL_ERROR_TIME_OUT) { + TPL_WARN("timeout occured waiting signaled. wl_egl_buffer(%p)", + enqueued_buffer); + } } + tpl_gmutex_unlock(&enqueued_buffer->mutex); } - tpl_gmutex_unlock(&last_enq_buffer->mutex); + wl_egl_surface->last_enq_buffer = NULL; } tpl_gmutex_unlock(&wl_egl_surface->surf_mutex); @@ -2757,7 +2762,7 @@ __tpl_wl_egl_surface_enqueue_buffer(tpl_surface_t *surface, } tpl_gmutex_lock(&wl_egl_surface->surf_mutex); - wl_egl_surface->last_enq_buffer = wl_egl_buffer; + wl_egl_surface->last_enq_buffer = tbm_surface; tpl_gmutex_unlock(&wl_egl_surface->surf_mutex); tbm_surface_internal_unref(tbm_surface); @@ -3422,8 +3427,6 @@ _thread_wl_surface_commit(tpl_wl_egl_surface_t *wl_egl_surface, tpl_gmutex_unlock(&wl_egl_buffer->mutex); - wl_egl_surface->last_enq_buffer = NULL; - TPL_LOG_T("WL_EGL", "[COMMIT] wl_egl_buffer(%p) wl_buffer(%p) tbm_surface(%p) bo(%d)", wl_egl_buffer, wl_egl_buffer->wl_buffer, wl_egl_buffer->tbm_surface, -- 2.7.4 From 1b4ee77a5e06d92ece17db7d43dd9de083a24c41 Mon Sep 17 00:00:00 2001 From: Joonbum Ko Date: Tue, 18 Jan 2022 11:06:30 +0900 Subject: [PATCH 02/16] Package version up to 1.8.23 Change-Id: I39e166a5eba110731a2a3b5e8fa6a14f7b90bdad 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 2400d0a..96581ed 100644 --- a/packaging/libtpl-egl.spec +++ b/packaging/libtpl-egl.spec @@ -4,7 +4,7 @@ #TPL VERSION MACROS %define TPL_VERSION_MAJOR 1 %define TPL_VERSION_MINOR 8 -%define TPL_VERSION_PATCH 22 +%define TPL_VERSION_PATCH 23 %define TPL_VERSION %{TPL_VERSION_MAJOR}.%{TPL_VERSION_MINOR}.%{TPL_VERSION_PATCH} #TPL WINDOW SYSTEM DEFINITION -- 2.7.4 From dc23e646d3167b9519486088b514e07dd63f2c3d Mon Sep 17 00:00:00 2001 From: Joonbum Ko Date: Thu, 20 Jan 2022 17:16:52 +0900 Subject: [PATCH 03/16] Prevents the incorrect signal on gcond of wl_egl_buffer. As with g_cond_wait() it is possible that a spurious or stolen wakeup could occur. For that reason, waiting on a condition variable should always be in a loop, based on an explicitly-checked predicate. Change-Id: I388e71a48dc91c1636490c856698c4a7f8d3fafd Signed-off-by: Joonbum Ko --- src/tpl_wl_egl_thread.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/tpl_wl_egl_thread.c b/src/tpl_wl_egl_thread.c index 44d8f92..95b9af0 100755 --- a/src/tpl_wl_egl_thread.c +++ b/src/tpl_wl_egl_thread.c @@ -2449,24 +2449,28 @@ __tpl_wl_egl_surface_dequeue_buffer(tpl_surface_t *surface, uint64_t timeout_ns, _get_wl_egl_buffer(wl_egl_surface->last_enq_buffer); if (enqueued_buffer) { + tbm_surface_internal_ref(wl_egl_surface->last_enq_buffer); + tpl_gmutex_unlock(&wl_egl_surface->surf_mutex); tpl_gmutex_lock(&enqueued_buffer->mutex); - if (enqueued_buffer->status >= ENQUEUED && - enqueued_buffer->status < COMMITTED) { + while (enqueued_buffer->status >= ENQUEUED && + enqueued_buffer->status < COMMITTED) { tpl_result_t wait_result; TPL_INFO("[DEQ_AFTER_RESET]", "waiting for previous wl_egl_buffer(%p) commit", enqueued_buffer); - tpl_gmutex_unlock(&wl_egl_surface->surf_mutex); + wait_result = tpl_cond_timed_wait(&enqueued_buffer->cond, &enqueued_buffer->mutex, 200); /* 200ms */ - tpl_gmutex_lock(&wl_egl_surface->surf_mutex); if (wait_result == TPL_ERROR_TIME_OUT) { TPL_WARN("timeout occured waiting signaled. wl_egl_buffer(%p)", enqueued_buffer); + break; } } tpl_gmutex_unlock(&enqueued_buffer->mutex); + tpl_gmutex_lock(&wl_egl_surface->surf_mutex); + tbm_surface_internal_unref(wl_egl_surface->last_enq_buffer); } wl_egl_surface->last_enq_buffer = NULL; -- 2.7.4 From e8bb5ba082503aed6f7d41c6b0898d054d729291 Mon Sep 17 00:00:00 2001 From: Joonbum Ko Date: Wed, 26 Jan 2022 15:26:31 +0900 Subject: [PATCH 04/16] Initialize last_enq_buffer to null when it committed. - If the last_enq_buffer of wl_egl_surface has been committed, it is not necessary to have this handle pointer. Change-Id: I3153b3cc9cb133f1d51321dc7aaa92f57b1e5ed8 Signed-off-by: Joonbum Ko --- src/tpl_wl_egl_thread.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/tpl_wl_egl_thread.c b/src/tpl_wl_egl_thread.c index 95b9af0..f439bd6 100755 --- a/src/tpl_wl_egl_thread.c +++ b/src/tpl_wl_egl_thread.c @@ -2445,11 +2445,12 @@ __tpl_wl_egl_surface_dequeue_buffer(tpl_surface_t *surface, uint64_t timeout_ns, tpl_gmutex_lock(&wl_egl_surface->surf_mutex); if (wl_egl_surface->reset == TPL_TRUE && tbm_surface_internal_is_valid(wl_egl_surface->last_enq_buffer)) { + tbm_surface_h last_enq_buffer = wl_egl_surface->last_enq_buffer; tpl_wl_egl_buffer_t *enqueued_buffer = - _get_wl_egl_buffer(wl_egl_surface->last_enq_buffer); + _get_wl_egl_buffer(last_enq_buffer); if (enqueued_buffer) { - tbm_surface_internal_ref(wl_egl_surface->last_enq_buffer); + tbm_surface_internal_ref(last_enq_buffer); tpl_gmutex_unlock(&wl_egl_surface->surf_mutex); tpl_gmutex_lock(&enqueued_buffer->mutex); while (enqueued_buffer->status >= ENQUEUED && @@ -2470,7 +2471,7 @@ __tpl_wl_egl_surface_dequeue_buffer(tpl_surface_t *surface, uint64_t timeout_ns, } tpl_gmutex_unlock(&enqueued_buffer->mutex); tpl_gmutex_lock(&wl_egl_surface->surf_mutex); - tbm_surface_internal_unref(wl_egl_surface->last_enq_buffer); + tbm_surface_internal_unref(last_enq_buffer); } wl_egl_surface->last_enq_buffer = NULL; @@ -3426,6 +3427,8 @@ _thread_wl_surface_commit(tpl_wl_egl_surface_t *wl_egl_surface, wl_egl_buffer->need_to_commit = TPL_FALSE; wl_egl_buffer->status = COMMITTED; + if (wl_egl_surface->last_enq_buffer == wl_egl_buffer->tbm_surface) + wl_egl_surface->last_enq_buffer = NULL; tpl_gcond_signal(&wl_egl_buffer->cond); -- 2.7.4 From 744b882abc193b7c573cdcc3cfd94ebe43e7c2bc Mon Sep 17 00:00:00 2001 From: Joonbum Ko Date: Wed, 26 Jan 2022 16:04:51 +0900 Subject: [PATCH 05/16] Package version up to 1.9.1 - the minor version for tizen_7.0 is '9' Change-Id: I21627d64a70f3d9a137ae73106be90d36328ce03 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 96581ed..ffb86c4 100644 --- a/packaging/libtpl-egl.spec +++ b/packaging/libtpl-egl.spec @@ -3,8 +3,8 @@ #TPL VERSION MACROS %define TPL_VERSION_MAJOR 1 -%define TPL_VERSION_MINOR 8 -%define TPL_VERSION_PATCH 23 +%define TPL_VERSION_MINOR 9 +%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 ad32a58551cc80ef33176ee092b0320ef9f936a5 Mon Sep 17 00:00:00 2001 From: Joonbum Ko Date: Tue, 15 Feb 2022 14:06:30 +0900 Subject: [PATCH 06/16] Make clear about use_explicit_sync feature flag. - if the boolean flag use_explicit_sync is true, it includes the meaning surface_sync is not null. - so, it need to be simplified with using only use_explicit_sync flag. Change-Id: Icdcc55a76d72b28d9bd38a96de1093ab56edc135 Signed-off-by: Joonbum Ko --- src/tpl_wl_egl_thread.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/tpl_wl_egl_thread.c b/src/tpl_wl_egl_thread.c index f439bd6..b8830a7 100755 --- a/src/tpl_wl_egl_thread.c +++ b/src/tpl_wl_egl_thread.c @@ -2574,7 +2574,7 @@ __tpl_wl_egl_surface_dequeue_buffer(tpl_surface_t *surface, uint64_t timeout_ns, * If not, user(EGL) have to wait until signaled. */ if (release_fence) { #if TIZEN_FEATURE_ENABLE - if (wl_egl_surface->surface_sync) { + if (wl_egl_display->use_explicit_sync) { *release_fence = wl_egl_buffer->release_fence_fd; TPL_DEBUG("wl_egl_surface(%p) wl_egl_buffer(%p) release_fence_fd(%d)", wl_egl_surface, wl_egl_buffer, *release_fence); @@ -2869,7 +2869,7 @@ _thread_surface_queue_acquire(tpl_wl_egl_surface_t *wl_egl_surface) if (wl_egl_buffer->acquire_fence_fd != -1) { #if TIZEN_FEATURE_ENABLE - if (wl_egl_surface->surface_sync) + if (wl_egl_display->use_explicit_sync) ready_to_commit = TPL_TRUE; else #endif @@ -3280,7 +3280,7 @@ _thread_wl_surface_commit(tpl_wl_egl_surface_t *wl_egl_surface, #if TIZEN_FEATURE_ENABLE if (!wl_egl_display->use_explicit_sync || - !wl_egl_surface->surface_sync) + wl_egl_buffer->acquire_fence_fd == -1) #endif { wl_buffer_add_listener((struct wl_buffer *)wl_egl_buffer->wl_buffer, @@ -3395,7 +3395,7 @@ _thread_wl_surface_commit(tpl_wl_egl_surface_t *wl_egl_surface, wl_egl_buffer->serial); #if TIZEN_FEATURE_ENABLE if (wl_egl_display->use_explicit_sync && - wl_egl_surface->surface_sync) { + wl_egl_buffer->acquire_fence_fd != -1) { zwp_linux_surface_synchronization_v1_set_acquire_fence(wl_egl_surface->surface_sync, wl_egl_buffer->acquire_fence_fd); -- 2.7.4 From faef443a84b61b2676fdc9854212e1f2d5b4e842 Mon Sep 17 00:00:00 2001 From: Joonbum Ko Date: Tue, 15 Feb 2022 14:33:26 +0900 Subject: [PATCH 07/16] Package version up to 1.9.2 Change-Id: I3c744d64eaa7bfeb2f4dc00fe813e5de09331901 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 ffb86c4..d4228f2 100644 --- a/packaging/libtpl-egl.spec +++ b/packaging/libtpl-egl.spec @@ -4,7 +4,7 @@ #TPL VERSION MACROS %define TPL_VERSION_MAJOR 1 %define TPL_VERSION_MINOR 9 -%define TPL_VERSION_PATCH 1 +%define TPL_VERSION_PATCH 2 %define TPL_VERSION %{TPL_VERSION_MAJOR}.%{TPL_VERSION_MINOR}.%{TPL_VERSION_PATCH} #TPL WINDOW SYSTEM DEFINITION -- 2.7.4 From 29a5f72b95070f1a4c27cd84a8bea05632b12b6e Mon Sep 17 00:00:00 2001 From: Joonbum Ko Date: Tue, 22 Feb 2022 17:20:13 +0900 Subject: [PATCH 08/16] Fix space trim issue at configure.ac Change-Id: I5c8eaf9bb892af4336658ed3172ed86df353556b Signed-off-by: Joonbum Ko --- configure.ac | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 6d9e688..36f45e1 100644 --- a/configure.ac +++ b/configure.ac @@ -62,7 +62,7 @@ AS_IF([test "${with_wayland}" = "yes" || test "${with_wayland}" = "1"], glib-2.0 wayland-egl wayland-egl-backend]) TPL_CFLAGS+="$TPL_WL_CFLAGS" TPL_CFLAGS+=" -DTPL_WINSYS_WL=1 " - TPL_LIBS+="$TPL_WL_LIBS "], + TPL_LIBS+=" $TPL_WL_LIBS "], []) AM_CONDITIONAL([WITH_WAYLAND], [test "${with_wayland}" = "yes" || test "${with_wayland}" = "1"]) @@ -98,9 +98,9 @@ AS_IF([test "${enable_dlog}" = "yes" || test "${enable_dlog}" = "1"], [PKG_CHECK_MODULES([DLOG], [dlog]) TPL_CFLAGS+="$DLOG_CFLAGS" TPL_CFLAGS+=" -DDLOG_DEFAULT_ENABLE " - TPL_LIBS+="$DLOG_LIBS" + TPL_LIBS+=" $DLOG_LIBS" WL_EGL_TIZEN_CFLAGS+="$DLOG_CFLAGS" - WL_EGL_TIZEN_LIBS+="$DLOG_LIBS"], + WL_EGL_TIZEN_LIBS+=" $DLOG_LIBS"], []) AM_CONDITIONAL([ENABLE_DLOG], [test "${enable_dlog}" = "yes" || test "${enable_dlog}" = "1"]) @@ -147,7 +147,7 @@ AS_IF([test "${enable_ttrace}" = "yes" || test "${enable_ttrace}" = "1"], [PKG_CHECK_MODULES([TTRACE], [ttrace]) TPL_CFLAGS+="$TTRACE_CFLAGS" TPL_CFLAGS+=" -DTTRACE_ENABLE=1 " - TPL_LIBS+="$TTRACE_LIBS"], + TPL_LIBS+=" $TTRACE_LIBS"], []) AM_CONDITIONAL([ENABLE_TTRACE], [test "${enable_ttrace}" = "yes" || test "${enable_ttrace}" = "1"]) @@ -163,7 +163,7 @@ AS_IF([test "${enable_tizen_feature}" = "yes" || test "${enable_tizen_feature}" linux-explicit-synchronization-unstable-v1-client]) TPL_CFLAGS+="$TIZEN_FEATURE_CFLAGS" TPL_CFLAGS+=" -DTIZEN_FEATURE_ENABLE=1 " - TPL_LIBS+="$TIZEN_FEATURE_LIBS"], + TPL_LIBS+=" $TIZEN_FEATURE_LIBS"], [TPL_CFLAGS+=" -DTIZEN_FEATURE_ENABLE=0 "]) AM_CONDITIONAL([ENABLE_TIZEN_FEATURE], [test "${enable_tizen_feature}" = "yes" || test "${enable_tizen_feature}" = "1"]) @@ -200,7 +200,7 @@ AS_IF([test "${enable_gcov}" = "yes" || test "${enable_gcov}" = "1"], AM_CONDITIONAL([ENABLE_GCOV], [test "${enable_gcov}" = "yes" || test "${enable_gcov}" = "1"]) TPL_CFLAGS+="$TPL_ESSENTIAL_CFLAGS" -TPL_LIBS+="$TPL_ESSENTIAL_LIBS" +TPL_LIBS+=" $TPL_ESSENTIAL_LIBS" AC_SUBST([TPL_CFLAGS]) AC_SUBST([TPL_LIBS]) -- 2.7.4 From c9a5ba0905cd7c2ace64180b0386bc540935d67e Mon Sep 17 00:00:00 2001 From: Joonbum Ko Date: Tue, 22 Feb 2022 17:20:36 +0900 Subject: [PATCH 09/16] Package version up to 1.9.3 Change-Id: I2c1747fc961d1f39166b32f2aa5431db3648f2fc --- 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 d4228f2..9d7da99 100644 --- a/packaging/libtpl-egl.spec +++ b/packaging/libtpl-egl.spec @@ -4,7 +4,7 @@ #TPL VERSION MACROS %define TPL_VERSION_MAJOR 1 %define TPL_VERSION_MINOR 9 -%define TPL_VERSION_PATCH 2 +%define TPL_VERSION_PATCH 3 %define TPL_VERSION %{TPL_VERSION_MAJOR}.%{TPL_VERSION_MINOR}.%{TPL_VERSION_PATCH} #TPL WINDOW SYSTEM DEFINITION -- 2.7.4 From 6fade4219ee44b7ec91d6b1a0d6bd7de86cf25c4 Mon Sep 17 00:00:00 2001 From: Joonbum Ko Date: Tue, 5 Apr 2022 10:42:16 +0900 Subject: [PATCH 10/16] Add missed initializing to trace tpl_surface. Change-Id: Id023b7633986e6ec59d482f8f77c45fcc7d512e7 Signed-off-by: Joonbum Ko --- src/tpl_wl_vk_thread.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tpl_wl_vk_thread.c b/src/tpl_wl_vk_thread.c index c1e2017..40f7e81 100644 --- a/src/tpl_wl_vk_thread.c +++ b/src/tpl_wl_vk_thread.c @@ -1232,6 +1232,7 @@ __tpl_wl_vk_surface_init(tpl_surface_t *surface) wl_vk_surface->wl_vk_display = wl_vk_display; wl_vk_surface->wl_surface = (struct wl_surface *)surface->native_handle; + wl_vk_surface->tpl_surface = surface; wl_vk_surface->reset = TPL_FALSE; wl_vk_surface->is_activated = TPL_FALSE; -- 2.7.4 From d6a855f57b94c4054e70e39bfa96828184014a7c Mon Sep 17 00:00:00 2001 From: Joonbum Ko Date: Tue, 5 Apr 2022 10:46:58 +0900 Subject: [PATCH 11/16] fix 64bits build-errors Change-Id: Ie5a6541b8442806c948c099f69eaa4729292b818 Signed-off-by: Joonbum Ko --- configure.ac | 2 ++ packaging/libtpl-egl.spec | 3 ++- pkgconfig/tpl-egl.pc.in | 2 +- pkgconfig/wayland-egl-tizen.pc.in | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 36f45e1..be78040 100644 --- a/configure.ac +++ b/configure.ac @@ -226,6 +226,8 @@ AC_FUNC_MALLOC AC_FUNC_STRERROR_R AC_CHECK_FUNCS([clock_gettime memset]) +AC_SUBST(LIBDIR) + # Set output files AC_CONFIG_FILES([ Makefile diff --git a/packaging/libtpl-egl.spec b/packaging/libtpl-egl.spec index 9d7da99..4d26f67 100644 --- a/packaging/libtpl-egl.spec +++ b/packaging/libtpl-egl.spec @@ -174,7 +174,8 @@ export WL_EGL_TIZEN_VERSION_PATCH=%{WL_EGL_TIZEN_VERSION_PATCH} --enable-dump=%{ENABLE_DEFAULT_DUMP} \ --enable-object-hash-check=%{ENABLE_OBJECT_HASH_CHECK} \ --enable-ttrace=%{ENABLE_TTRACE} \ - --enable-tizen-feature=%{ENABLE_TIZEN_FEATURE} + --enable-tizen-feature=%{ENABLE_TIZEN_FEATURE} \ + LIBDIR=%{_libdir} make %{?_smp_mflags} diff --git a/pkgconfig/tpl-egl.pc.in b/pkgconfig/tpl-egl.pc.in index 8640c47..01a7b11 100644 --- a/pkgconfig/tpl-egl.pc.in +++ b/pkgconfig/tpl-egl.pc.in @@ -1,6 +1,6 @@ prefix=/usr exec_prefix=${prefix} -libdir=${exec_prefix}/@LIB@ +libdir=@LIBDIR@ includedir=${prefix}/include Name: libtpl-egl diff --git a/pkgconfig/wayland-egl-tizen.pc.in b/pkgconfig/wayland-egl-tizen.pc.in index b474ee6..a209b36 100644 --- a/pkgconfig/wayland-egl-tizen.pc.in +++ b/pkgconfig/wayland-egl-tizen.pc.in @@ -1,6 +1,6 @@ prefix=/usr exec_prefix=${prefix} -libdir=${exec_prefix}/@LIB@ +libdir=@LIBDIR@ includedir=${prefix}/include Name: wayland-egl-tizen -- 2.7.4 From 62b11b3c175caffe14e440ec4f710eb75f892828 Mon Sep 17 00:00:00 2001 From: Joonbum Ko Date: Tue, 5 Apr 2022 10:49:15 +0900 Subject: [PATCH 12/16] Package version up to 1.9.4 Change-Id: Ic759425a78f195bd327f44dc3de9f6255a553f7b 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 4d26f67..3747e21 100644 --- a/packaging/libtpl-egl.spec +++ b/packaging/libtpl-egl.spec @@ -4,7 +4,7 @@ #TPL VERSION MACROS %define TPL_VERSION_MAJOR 1 %define TPL_VERSION_MINOR 9 -%define TPL_VERSION_PATCH 3 +%define TPL_VERSION_PATCH 4 %define TPL_VERSION %{TPL_VERSION_MAJOR}.%{TPL_VERSION_MINOR}.%{TPL_VERSION_PATCH} #TPL WINDOW SYSTEM DEFINITION -- 2.7.4 From d9f5c6041bc1605f3163d3e59becc4d441349407 Mon Sep 17 00:00:00 2001 From: Xuelian Bai Date: Mon, 11 Apr 2022 15:02:57 +0800 Subject: [PATCH 13/16] Fix issue when reset Set ref_cnt as 1 before CREATE_QUEUE, or when queue is reused and ref_cnt is increased, the ref_cnt will be set back to 1. Set format as default when reset Change-Id: I0bd90a361d26329cb86393b1eaddf1013af09244 Signed-off-by: Xuelian Bai --- src/tpl_wl_vk_thread.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/tpl_wl_vk_thread.c b/src/tpl_wl_vk_thread.c index 40f7e81..f9d6952 100644 --- a/src/tpl_wl_vk_thread.c +++ b/src/tpl_wl_vk_thread.c @@ -1489,7 +1489,7 @@ _thread_swapchain_create_tbm_queue(tpl_wl_vk_surface_t *wl_vk_surface) tbm_surface_queue_reset(swapchain->tbm_queue, swapchain->properties.width, swapchain->properties.height, - swapchain->properties.format); + TBM_FORMAT_ARGB8888); TPL_INFO("[RESIZE]", "wl_vk_surface(%p) swapchain(%p) tbm_queue(%p) (%dx%d)->(%dx%d)", wl_vk_surface, swapchain, swapchain->tbm_queue, @@ -1612,9 +1612,12 @@ __tpl_wl_vk_surface_create_swapchain(tpl_surface_t *surface, swapchain->properties.height = height; swapchain->properties.present_mode = present_mode; swapchain->wl_vk_surface = wl_vk_surface; + swapchain->properties.format = format; wl_vk_surface->swapchain = swapchain; + __tpl_util_atomic_set(&swapchain->ref_cnt, 1); + tpl_gmutex_lock(&wl_vk_surface->surf_mutex); /* send swapchain create tbm_queue message */ wl_vk_surface->sent_message = CREATE_QUEUE; @@ -1627,9 +1630,9 @@ __tpl_wl_vk_surface_create_swapchain(tpl_surface_t *surface, swapchain->tbm_queue != NULL, "[CRITICAL FAIL] Failed to create tbm_surface_queue"); + wl_vk_surface->reset = TPL_FALSE; - __tpl_util_atomic_set(&swapchain->ref_cnt, 1); return TPL_ERROR_NONE; } -- 2.7.4 From e9db9587be262b6b34b0789a28a5c46c36252e7e Mon Sep 17 00:00:00 2001 From: Joonbum Ko Date: Tue, 19 Apr 2022 15:04:21 +0900 Subject: [PATCH 14/16] Package version up to 1.9.5 Change-Id: I44d35f42e7a88c8a882e31640ec8783d0496a7ba 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 3747e21..d821e51 100644 --- a/packaging/libtpl-egl.spec +++ b/packaging/libtpl-egl.spec @@ -4,7 +4,7 @@ #TPL VERSION MACROS %define TPL_VERSION_MAJOR 1 %define TPL_VERSION_MINOR 9 -%define TPL_VERSION_PATCH 4 +%define TPL_VERSION_PATCH 5 %define TPL_VERSION %{TPL_VERSION_MAJOR}.%{TPL_VERSION_MINOR}.%{TPL_VERSION_PATCH} #TPL WINDOW SYSTEM DEFINITION -- 2.7.4 From 90e12d798a4a129461813cbedb8ee76404ecdab6 Mon Sep 17 00:00:00 2001 From: Joonbum Ko Date: Wed, 8 Jun 2022 19:23:26 +0900 Subject: [PATCH 15/16] Fix pc.in to follow 64bit build guideline Change-Id: I32adf0732fab34864cdb7e1cafffdad1b787ac2c Signed-off-by: Joonbum Ko --- configure.ac | 1 + packaging/libtpl-egl.spec | 3 ++- pkgconfig/tpl-egl.pc.in | 2 +- pkgconfig/wayland-egl-tizen.pc.in | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index be78040..87ba9d3 100644 --- a/configure.ac +++ b/configure.ac @@ -227,6 +227,7 @@ AC_FUNC_STRERROR_R AC_CHECK_FUNCS([clock_gettime memset]) AC_SUBST(LIBDIR) +AC_SUBST(INCLUDEDIR) # Set output files AC_CONFIG_FILES([ diff --git a/packaging/libtpl-egl.spec b/packaging/libtpl-egl.spec index d821e51..cc5de78 100644 --- a/packaging/libtpl-egl.spec +++ b/packaging/libtpl-egl.spec @@ -175,7 +175,8 @@ export WL_EGL_TIZEN_VERSION_PATCH=%{WL_EGL_TIZEN_VERSION_PATCH} --enable-object-hash-check=%{ENABLE_OBJECT_HASH_CHECK} \ --enable-ttrace=%{ENABLE_TTRACE} \ --enable-tizen-feature=%{ENABLE_TIZEN_FEATURE} \ - LIBDIR=%{_libdir} + LIBDIR=%{_libdir} \ + INCLUDEDIR=%{_includedir} make %{?_smp_mflags} diff --git a/pkgconfig/tpl-egl.pc.in b/pkgconfig/tpl-egl.pc.in index 01a7b11..6a63883 100644 --- a/pkgconfig/tpl-egl.pc.in +++ b/pkgconfig/tpl-egl.pc.in @@ -1,7 +1,7 @@ prefix=/usr exec_prefix=${prefix} libdir=@LIBDIR@ -includedir=${prefix}/include +includedir=@INCLUDEDIR@ Name: libtpl-egl Description: Tizen Porting Layer for EGL diff --git a/pkgconfig/wayland-egl-tizen.pc.in b/pkgconfig/wayland-egl-tizen.pc.in index a209b36..b1e2ef3 100644 --- a/pkgconfig/wayland-egl-tizen.pc.in +++ b/pkgconfig/wayland-egl-tizen.pc.in @@ -1,7 +1,7 @@ prefix=/usr exec_prefix=${prefix} libdir=@LIBDIR@ -includedir=${prefix}/include +includedir=@INCLUDEDIR@ Name: wayland-egl-tizen Description: Wayland EGL Extension APIs for TIZEN -- 2.7.4 From 4fc5779d8876539ec96997b6358beae1d2fd0c59 Mon Sep 17 00:00:00 2001 From: Joonbum Ko Date: Wed, 8 Jun 2022 19:23:57 +0900 Subject: [PATCH 16/16] Package version up to 1.9.6 Change-Id: I8810e6da7e5c98841c37dee3b6660137b5445b5f 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 cc5de78..0b98317 100644 --- a/packaging/libtpl-egl.spec +++ b/packaging/libtpl-egl.spec @@ -4,7 +4,7 @@ #TPL VERSION MACROS %define TPL_VERSION_MAJOR 1 %define TPL_VERSION_MINOR 9 -%define TPL_VERSION_PATCH 5 +%define TPL_VERSION_PATCH 6 %define TPL_VERSION %{TPL_VERSION_MAJOR}.%{TPL_VERSION_MINOR}.%{TPL_VERSION_PATCH} #TPL WINDOW SYSTEM DEFINITION -- 2.7.4