Hoyub Lee [Mon, 27 Feb 2017 07:09:56 +0000 (16:09 +0900)]
tc: Fix bug on tpl_test_parse_arguments()
Change-Id: Iab6a48c4b6be05eb53befede02b67893f595b0bd
Signed-off-by: Hoyub Lee <hoyub.lee@samsung.com>
Hoyub Lee [Fri, 2 Dec 2016 04:14:40 +0000 (13:14 +0900)]
tc: Update change of API: tpl_surface_create_swapchain()
Change-Id: Id4b790d028b9260853e211a7f08c1619706480b9
Signed-off-by: Hoyub Lee <hoyub.lee@samsung.com>
Hoyub Lee [Mon, 31 Oct 2016 06:14:41 +0000 (15:14 +0900)]
tc: Release tpl-test-0.3.0
Release tpl-test-0.3.0 which can tests libtpl-egl APIs.
Brief Instructions
------------------
* tpl-test can be built as follows:
$ gbs build -A armv7l --spec=tpl-test.spec
* Tests are done automatically right after rpm package installation.
* Manual tests can be done by running following command:
$ /opt/usr/tpl-test/tpl-test
For more information, please see README and tpl-test.docx.
Change-Id: I20db83c1c5f72eb5e0ba378b0b7f330ddf427069
Signed-off-by: Hoyub Lee <hoyub.lee@samsung.com>
Hoyub Lee [Mon, 31 Oct 2016 12:52:14 +0000 (21:52 +0900)]
tc: Add document with drm locked.
Add tpl-test.docx which explains overview of libtpl-egl TC module.
DRM on this document will be unlocked later.
Change-Id: I0a1675341654d2a81c3874859d3a8ee7e7fca7ac
Signed-off-by: Hoyub Lee <hoyub.lee@samsung.com>
Hoyub Lee [Mon, 31 Oct 2016 12:48:50 +0000 (21:48 +0900)]
tc: Add test cases for testing libtpl-egl
Change-Id: I2ddab75f5ffd0b0e6ccf64f087f07bc1fcdeef1e
Signed-off-by: Hoyub Lee <hoyub.lee@samsung.com>
Hoyub Lee [Fri, 28 Oct 2016 07:16:42 +0000 (16:16 +0900)]
tc: Create base class for testing with sample test case
Create base class for testing. This class contains TPL related
variables, and is made to support TPL supported backends.
Change-Id: I8a4e1cadac470d0d1a5b043a95423e5703d92823
Signed-off-by: Hoyub Lee <hoyub.lee@samsung.com>
Hoyub Lee [Fri, 28 Oct 2016 07:13:30 +0000 (16:13 +0900)]
tc: Add Google C++ Test Framework(gtest) Library
libtpl-egl test module uses gtest as test framework.
Change-Id: Iea066acb27206f60df81ed713942414b5e284c0d
Signed-off-by: Hoyub Lee <hoyub.lee@samsung.com>
Gwan-gyeong Mun [Tue, 24 Jan 2017 07:37:33 +0000 (23:37 -0800)]
Merge "tc: Cleanup previous not working TC" into tizen
Hoyub Lee [Fri, 28 Oct 2016 07:11:54 +0000 (16:11 +0900)]
tc: Cleanup previous not working TC
Change-Id: I9c26ebad61ce2ecfb4219e69e5af282d91260f8a
Signed-off-by: Hoyub Lee <hoyub.lee@samsung.com>
Mun, Gwan-gyeong [Thu, 19 Jan 2017 08:24:02 +0000 (17:24 +0900)]
tpl: Add TPL_BACKEND_TBM_VULKAN_WSI enum value to tpl_backend_type_t
tpl_tbm: enable worker_thread for tbm vulkan wsi backend.
TPL_BACKEND_TBM_VULKAN_WSI enum value is used for tbm vulkan wsi backend.
tpl_tbm backend implementation distinguish as tbm egl and tbm wsi backend.
worker_thread feature is only enabled on tbm wsi backend.
Change-Id: Ifd45fb69be0801f6411f9a8195d8304537f0b8e5
Signed-off-by: Mun, Gwan-gyeong <kk.moon@samsung.com>
Mun, Gwan-gyeong [Wed, 18 Jan 2017 07:56:03 +0000 (16:56 +0900)]
tpl_tbm: Disable worker_thread for tbm backend.
Current implementation of tbm worker_thread only works on vulkan tbm backend.
For now, we disable this feature for stabilization of egl tbm backend.
Change-Id: I2d419c5706720754b3d2bd6b682c31c9e30e009d
Signed-off-by: Mun, Gwan-gyeong <kk.moon@samsung.com>
Mun, Gwan-gyeong [Fri, 13 Jan 2017 05:38:12 +0000 (14:38 +0900)]
wayland-egl: Refactoring and fixing peephole on wl_egl_window_resize() and wl_egl_window_set_rotation()
When the wl_egl_window_resize() / wl_egl_window_set_rotation is continuously
called over twice previous implementation did not work properly on resizing of
buffer. This patch fixes these problems.
Change-Id: Idb6e1b2a38073b0bef215ef29964eccdcac9336e
Signed-off-by: Mun, Gwan-gyeong <kk.moon@samsung.com>
Mun, Gwan-gyeong [Wed, 11 Jan 2017 10:34:20 +0000 (19:34 +0900)]
tpl_tbm: Remove missued pthread_mutex_init() for draw_waiting_mutex
Add missed __tpl_tbm_set_tbm_buffer_to_tbm_surface() for tpl_tbm_buffer
Change-Id: If705df4277b16533ec120edda027c1cdb787eeef
Signed-off-by: Mun, Gwan-gyeong <kk.moon@samsung.com>
Mun, Gwan-gyeong [Fri, 6 Jan 2017 06:20:22 +0000 (15:20 +0900)]
wayland-egl: Fixed incorrect resize on prerotation
When the wl_egl_window_resize() is called, wl_egl_window_set_rotation() does
not work properly on resizing of buffer.
This patch selectivly apply for resizing of buffer when the wl_egl_window_resize()
is called.
Change-Id: Ie291b06a6d5cb60f07a56d26dbb96ce53740097b
Signed-off-by: Mun, Gwan-gyeong <kk.moon@samsung.com>
Mun, Gwan-gyeong [Fri, 30 Dec 2016 00:47:55 +0000 (09:47 +0900)]
tpl_wayland_egl: When wl_display_dispatch_queue() fails, print infomation of error in detail
on __tpl_wayland_egl_surface_wait_dequeuable()
When the wl_display_dispatch_queue() fails on __tpl_wayland_egl_surface_wait_dequeuable(),
it generally prints errno and errno_str.
If errno is EPROTO, it prints error interface name and error enumeration code.
Change-Id: I774774294a396164a9b9c66492c9cb79f18257cc
Signed-off-by: Mun, Gwan-gyeong <kk.moon@samsung.com>
YoungJun Cho [Wed, 21 Dec 2016 06:19:07 +0000 (15:19 +0900)]
tpl_wayland_egl: clean up __tpl_wayland_egl_surface_init()
This patch cleans up __tpl_wayland_egl_surface_init().
There are som omitted error routines.
Change-Id: I781a89b1f685d2586bbd03eebf028d4c4b8fba6e
Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
Gwan-gyeong Mun [Wed, 11 Jan 2017 09:54:42 +0000 (01:54 -0800)]
Merge "tpl_tbm: clean up __tpl_tbm_surface_fini()" into tizen
YoungJun Cho [Tue, 13 Dec 2016 08:09:56 +0000 (17:09 +0900)]
tpl_wayland_egl: clean up __cb_client_window_resize_callback()
This patch cleans up __cb_client_window_resize_callback().
It seems to be better to call tbm_surface_queue_get_width/height APIs once.
Change-Id: Ib5668f472c8fffdeca020317b265cb491538e45c
Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
YoungJun Cho [Tue, 13 Dec 2016 08:11:41 +0000 (17:11 +0900)]
wayland-egl: clean up wl_egl_window_create()
This patch cleans up wl_egl_window_create().
Some callbacks are also initialized.
Change-Id: I3361d02299287af0313ed96371ea61c8984fb964
Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
Gwan-gyeong Mun [Wed, 11 Jan 2017 09:27:14 +0000 (01:27 -0800)]
Merge "tpl_tbm: implement worker thread interface" into tizen
Gwan-gyeong Mun [Wed, 11 Jan 2017 09:03:19 +0000 (01:03 -0800)]
Merge "tpl_worker_thread: added new interface draw_wait_buffer_get" into tizen
Gwan-gyeong Mun [Wed, 11 Jan 2017 09:00:02 +0000 (01:00 -0800)]
Merge "tpl_tbm: added vulkan support funcs" into tizen
YoungJun Cho [Fri, 2 Dec 2016 05:17:08 +0000 (14:17 +0900)]
tpl_display: modify return value of tpl_display_create() when it is already existed
This patch modifies return value of tpl_display_create() when it is already existed.
Change-Id: Icd9a73b5cf03d284fd20f42edeebf86eebc80799
Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
deasung.kim [Wed, 7 Dec 2016 03:06:03 +0000 (12:06 +0900)]
tpl_wayland_vk_wsi: apply wayland-vulkan protocol
get from server supproted present mode
send client's present mode to server
if client's present mode supported by server
send buffer after draw done (not handle present mode in client)
Change-Id: Icd4ab09dfdc84e6e98cf8e7c09ab3a2f502b4583
YoungJun Cho [Wed, 21 Dec 2016 05:02:34 +0000 (14:02 +0900)]
tpl_tbm: clean up __tpl_tbm_surface_fini()
This patch cleans up __tpl_tbm_surface_fini().
For surface->type is TPL_SURFACE_TYPE_WINDOW, the added destroy callback should
be removed.
Change-Id: Ied7564b611bdddd1c606347190244d28f4cd1bac
Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
deasung.kim [Mon, 12 Dec 2016 05:45:33 +0000 (14:45 +0900)]
tpl_tbm: implement worker thread interface
tpl_enqueue_with_sync() -> wait sync in worker thread
draw done -> insert vblank queue or tbm_surface_queue_enqueue()
Change-Id: I09922f02bbccaa87c8630594e7f979f66e65c197
deasung.kim [Mon, 12 Dec 2016 05:43:30 +0000 (14:43 +0900)]
tpl_worker_thread: added new interface draw_wait_buffer_get
if draw_wait_buffer_get is not NULL
worker call that function to get draw wait buffer
this patch for tpl_tbm
Change-Id: I52d366615576bc5e1f0fbd6ab34c56a201de6c58
deasung.kim [Mon, 12 Dec 2016 04:42:31 +0000 (13:42 +0900)]
tpl_tbm: added vulkan support funcs
__tpl_tbm_display_query_window_supported_buffer_count : return min 0, max 0 (no limits)
__tpl_tbm_display_query_window_supported_present_modes : return MAILBOX/IMMEDIATE (FIFO after apply worker)
__tpl_tbm_surface_create_swapchain : just set present mode
__tpl_tbm_surface_get_swapchain_buffers : same tpl_wayland_vk_wsi
Change-Id: I99f3d3192cb835698a3534a8cc1a8ca851740b4b
deasung.kim [Wed, 7 Dec 2016 03:04:33 +0000 (12:04 +0900)]
wayland-vulkan: added wayland-vulkan protocol
it need to server side present mode
Change-Id: Ia12b36260c6651b4cf34c5ea222557a00b7ef2de
Mun, Gwan-gyeong [Wed, 9 Nov 2016 08:36:40 +0000 (17:36 +0900)]
tpl: Add tpl_surface_get_rotation() / tpl_surface_set_rotation_capability() apis
tpl_wayland_egl: implement getting of tpl_surface angle.
implement getting of tpl_surface's capabilities
wayland-egl: Add wl_egl_window_set_rotation() / wl_egl_window_get_capabilities()
- tpl_surface_get_rotation() api used for getting the current rotation-angle of the given TPL surface.
tpl_surface's angle can be in 0, 90, 180, 270.
- wl_egl_window_set_rotation api used fo setting the current egl_window's angle.
- wl_egl_window_get_capabilities api used for getting capabilities of egl_window.
Change-Id: If051e890c040aff40097f88d26276b3b0b2bf4fd
Signed-off-by: Mun, Gwan-gyeong <kk.moon@samsung.com>
Joonbum Ko [Wed, 30 Nov 2016 12:36:10 +0000 (04:36 -0800)]
Merge "tpl_worker_thread: drop checking of fence_result on __tpl_worker_thread_loop()" into tizen
Mun, Gwan-gyeong [Wed, 30 Nov 2016 12:21:04 +0000 (21:21 +0900)]
tpl_worker_thread: drop checking of fence_result on __tpl_worker_thread_loop()
fence_result is always 1 in the switch case statement of fence_result == 1
so we should drop checking of fence_result on __tpl_worker_thread_loop()
Change-Id: Iae6db812889dcb0adaeb202d90711f7c1089d889
joonbum.ko [Wed, 30 Nov 2016 12:18:26 +0000 (21:18 +0900)]
tpl_tbm: Delete TPL_ASSERT checking to __tpl_tbm_display_get_window_info.
- Unused parameter(tpl_display) change TPL_ASSERT to TPL_IGNORE.
- TPL_ASSERT(window) doesn't the necessity because there are NULL checking for window and log printing.
Change-Id: Ie3412ca8a33e59436caee8c3546781f949b672e0
Signed-off-by: joonbum.ko <joonbum.ko@samsung.com>
Mun, Gwan-gyeong [Wed, 30 Nov 2016 10:52:56 +0000 (19:52 +0900)]
tpl_wayland_egl: Add missing error-checking to __tpl_wayland_egl_display_buffer_flusher_init
When the wl_display_get_registry() fails on __tpl_wayland_egl_display_buffer_flusher_init(),
this patch makes to return and deinitialize allocated resource.
Change-Id: I773089d55f7555d269e183f3c129e2171c0243eb
Signed-off-by: Mun, Gwan-gyeong <kk.moon@samsung.com>
Gwan-gyeong Mun [Tue, 29 Nov 2016 06:30:34 +0000 (22:30 -0800)]
Merge "tpl_wayland_egl: For the hide effect, client should not attach 'NULL' when surface destroy." into tizen
deasung.kim [Tue, 25 Oct 2016 06:31:01 +0000 (15:31 +0900)]
worker_thread: added epoll_wait continue condition
If errno is EINTR goto epoll_wait
Change-Id: If937e95a08b0abc7a27e7cb75a087e5b1d361934
deasung.kim [Tue, 25 Oct 2016 09:46:48 +0000 (18:46 +0900)]
tpl_worker_thread: rollback change the timing of calling of epoll_ctl_add() on "next draw wait buffer".
it has sig abort with vulkan wayland wsi test
Change-Id: I90cf2dfbe488e797ff62da2c34d53bc04df640d0
deasung.kim [Tue, 25 Oct 2016 06:46:46 +0000 (15:46 +0900)]
tpl_utils: fix double callback call in __tpl_list_remove_data
in __tpl_list_remove has call callback
Change-Id: Id1f8b5fbf3847449f4444cffd2bf07b740fcc00c
joonbum.ko [Mon, 28 Nov 2016 09:49:10 +0000 (18:49 +0900)]
tpl_wayland_egl: For the hide effect, client should not attach 'NULL' when surface destroy.
- If client attach 'NULL' to wl_surface when the surface destroy, server cannot show hide effect of that surface.
- This commit was requested by effect member. (minjjj.kim@samsung.com)
Change-Id: I349bbb5885dd86bd6c95d523d9fee6851c181c03
Signed-off-by: joonbum.ko <joonbum.ko@samsung.com>
Hoyub Lee [Tue, 22 Nov 2016 11:37:24 +0000 (20:37 +0900)]
tpl_worker_thread: temporarily add 'unused' attribute to suppress warning
__tpl_worker_prepare_vblank() has been defined but not used.
Therefore, add 'unused' attribute to suppress warning to pass the
criteria of final release.
Change-Id: I12e8d495d5e7536e2ffcf85879d82b64d6581da5
Signed-off-by: Hoyub Lee <hoyub.lee@samsung.com>
Hoyub Lee [Tue, 22 Nov 2016 10:41:28 +0000 (19:41 +0900)]
tpl_wayland_egl: remove remaining unused surface frame callback in function
Since surface frame callback has been removed, remove remaining unused
surface frame callback in function.
Change-Id: I1efb08ba356e2fb93f354fa18842e8bd92f97bc1
Signed-off-by: Hoyub Lee <hoyub.lee@samsung.com>
Sangjin Lee [Tue, 15 Nov 2016 02:01:02 +0000 (11:01 +0900)]
tpl_wayland_egl: remove useless member of struct _tpl_wayland_egl_display
Change-Id: Ic50d054e18e8fd0856b3fbde504d0849ae389e9d
Sangjin Lee [Tue, 15 Nov 2016 01:57:52 +0000 (10:57 +0900)]
tpl_wayland_egl: remove wl_callback routine
wayland-egl just use tdm_vblank protocol for frame control.
so wl_buffer useless.
Change-Id: I009a12c197a55c56ba2f1cf9ee5418c25c9c57e6
Mun, Gwan-gyeong [Fri, 11 Nov 2016 07:33:46 +0000 (16:33 +0900)]
tpl_worker_thread: Add Missing break and Checking of fd of close()
Change-Id: I45ef4b82bbee90a1d20dc4d7c4d6e318ab62d0a0
joonbum.ko [Fri, 4 Nov 2016 02:46:40 +0000 (11:46 +0900)]
tpl_wayland_egl: Add log for checking flush callback.
Change-Id: Ic01ba0606c44ed5fa14715db43254ae848841123
Signed-off-by: joonbum.ko <joonbum.ko@samsung.com>
joonbum.ko [Fri, 4 Nov 2016 02:38:30 +0000 (11:38 +0900)]
tpl_wayland_egl: Invert y to rect of the damaged region.
- Wayland Window System Coordinate uses top-left position as (0,0) ,but GL Window Surface Coordinate uses bottom-left position as (0,0).
So, tpl_wayland_egl should covert "GL Window Surface Coordinate" to "Wayland Window System Coordinate" before calling of wl_surface_damage().
Wayland Window System Coordinate
(0,0) (Width,0)
+---------+
| |
| |
| |
| |
| |
+---------+
(0,Height) (Width, Height)
GL Window Surface Coordinate
(0,Height) (Width,Height)
+---------+
| |
| |
| |
| |
| |
+---------+
(0,0) (Width, 0)
* reference:
https://www.khronos.org/registry/egl/extensions/EXT/EGL_EXT_buffer_age.txt
https://www.khronos.org/registry/egl/extensions/KHR/EGL_KHR_partial_update.txt
Change-Id: I2cc0eadda428028ac2a53983e9a18c13378ee777
Signed-off-by: joonbum.ko <joonbum.ko@samsung.com>
YoungJun Cho [Tue, 25 Oct 2016 02:26:48 +0000 (11:26 +0900)]
tpl_wayland_egl: clean up code __tpl_wayland_egl_surface_init()
This patch cleans up code __tpl_wayland_egl_surface_init().
The original TPL_ASSERT()s are called after using those pointer already.
And the 'surface->backend.data' re-initialization code is missed.
Change-Id: I34b4d2ac65d57f555b097da77302febffe177a97
Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
Gwan-gyeong Mun [Thu, 27 Oct 2016 14:03:58 +0000 (07:03 -0700)]
Merge "tpl_surface: add missed lock in tpl_surface_set_reset_cb()" into tizen
Gwan-gyeong Mun [Thu, 27 Oct 2016 13:14:14 +0000 (06:14 -0700)]
Merge "tpl_wayland_egl: remove duplicated routine in __cb_tbm_surface_queue_reset_callback()" into tizen
Gwan-gyeong Mun [Thu, 27 Oct 2016 12:32:48 +0000 (05:32 -0700)]
Merge "tpl_wayland_egl: clean up codes __tpl_wayland_egl_buffer_set_reset_flag()" into tizen
YoungJun Cho [Mon, 24 Oct 2016 04:37:04 +0000 (13:37 +0900)]
tpl_wayland_egl: clean up codes __tpl_wayland_egl_display_buffer_flusher_init/fini()
This patch cleans up codes for __tpl_wayland_egl_display_buffer_flusher_init/fini().
These functions do not use tpl_display_t type display except getting wayland_egl_display.
So it seems better to use tpl_wayland_egl_display_t type wayland_egl_display directly.
Change-Id: I6d00e564a2d42164c010580cc01aedb59dd4e9c3
Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
Gwan-gyeong Mun [Thu, 27 Oct 2016 12:04:45 +0000 (05:04 -0700)]
Merge "tpl_wayland_egl: clean up codes for __tpl_wayland_egl_display_fini()" into tizen
YoungJun Cho [Mon, 24 Oct 2016 02:51:41 +0000 (11:51 +0900)]
tpl_wayland_egl: clean up codes for __tpl_wayland_egl_display_fini()
This patch cleans up codes for __tpl_wayland_egl_display_fini()..
It re-arranges fini functions with reverse order.
Change-Id: Ia5cda03e12e80b01e462b4b7a845bca7f44b0938
Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
YoungJun Cho [Fri, 21 Oct 2016 08:31:27 +0000 (17:31 +0900)]
tpl_wayland_egl: clean up code for __tpl_wayland_egl_display_init()
This patch cleans up code for __tpl_wayland_egl_display_init() error routine.
There is no case that the wayland_egl_display is NULL and
this patch re-arranges fini functions with reverse order.
Change-Id: I55f89400f612ea74fb7fa1bdf392aba324bda397
Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
YoungJun Cho [Mon, 24 Oct 2016 06:37:31 +0000 (15:37 +0900)]
tpl_surface: add missed lock in tpl_surface_set_reset_cb()
This patch adds missed lock in tpl_surface_set_reset_cb().
The 'surface' should be protected.
Change-Id: I195018753051d687a1c71762e00568fe4b1fe793
Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
YoungJun Cho [Mon, 24 Oct 2016 06:35:14 +0000 (15:35 +0900)]
tpl_wayland_egl: remove duplicated routine in __cb_tbm_surface_queue_reset_callback()
This patch removes duplicated routine in __cb_tbm_surface_queue_reset_callback().
The TPL_CHECK_ON_NULL_RETURN() already checks wayland_egl_surface is NULL or not.
Change-Id: Ia17386495cf5fa15210e6e8847ffc7b2e8bf92cc
Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
YoungJun Cho [Mon, 24 Oct 2016 05:28:55 +0000 (14:28 +0900)]
tpl_wayland_egl: clean up codes __tpl_wayland_egl_buffer_set_reset_flag()
This patch cleans up code for __tpl_wayland_egl_buffer_set_reset_flag().
There is a possibility to reuse wayland_egl_buffer when tbm_surface is NULL.
Change-Id: If1b5580ecea47c435eccec44e0d0c78ae5696162
Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
YoungJun Cho [Fri, 21 Oct 2016 07:14:12 +0000 (16:14 +0900)]
tpl_gbm: add backend data initialization for error case
This patch adds backend data initialization for error case
for __tpl_gbm_surface_init().
Change-Id: I6f2f374c6c6bad7e471670c0be0a12609057c888
Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
YoungJun Cho [Fri, 21 Oct 2016 02:00:21 +0000 (11:00 +0900)]
tpl_surface: add missed unlock
This patch adds missed unlock for tpl_surface_set_frontbuffer_mode().
Change-Id: Ic5947e526b1df44380fa9b0f8e2a56f8f1170e01
Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
YoungJun Cho [Fri, 21 Oct 2016 01:46:58 +0000 (10:46 +0900)]
tpl_surface: narrow the lock section
This patch narrows the lock section.
The 'tbm_surface' NULL checking routine is not related with tpl surface.
Change-Id: Ic547e0784933dcfe1f779aaa2748ebf463f084a8
Signed-off-by: YoungJun Cho <yj44.cho@samsung.com>
deasung.kim [Thu, 13 Oct 2016 05:22:44 +0000 (14:22 +0900)]
tpl_worker_thread: remove regist vblank handler.
vblank handler raises performance regression.
remove regist vblank handler and replace all present mode to MAILBOX.
Change-Id: I4a56b77aea2ff67dbe0f09dc322d3219a2c69190
joonbum.ko [Wed, 12 Oct 2016 08:31:13 +0000 (17:31 +0900)]
tpl_util: Revised in order to use dlog as the default tpl logs.
- If set ENABLE_DLOG which is the flag in the spec file with 0, default log change to fprintf.
- To distinguish the kind of logs, I added several below font colors.
FONT_DEFAULT, FONT_RED(error), FONT_YELLOW(warning), FONT_GREEN(frontend), FONT_BLUE(backend), FONT_MAGENTA(debug)
Change-Id: I13f41add53e0e3f3346bc89d4d056623f9bd98d1
Signed-off-by: joonbum.ko <joonbum.ko@samsung.com>
deasung.kim [Sat, 24 Sep 2016 10:59:45 +0000 (19:59 +0900)]
tpl_wayland_vk_wsi: implement the wsi's present mode
implement __tpl_wayland_vk_wsi_display_query_window_supported_present_modes
vblank event feature supports FIFO/FIFO_RELAXED modes
Change-Id: Id4fafee58ad3b2772449c3fb050ede2c004c52a9
deasung.kim [Mon, 10 Oct 2016 09:44:13 +0000 (18:44 +0900)]
tpl_worker_thread: change the timing of calling of epoll_ctl_add() on "next draw wait buffer".
- before: __tpl_worker_thread_loop() iterates all surfaces before calling of epoll_wait()
after : __tpl_worker_thread_loop() calls once __tpl_worker_prepare_draw_wait_buffer after handling of "current surface's buffer draw-done event".
Change-Id: Ia8ffb537794eb01c19f4fff33acf40e3071f1184
Gwan-gyeong Mun [Wed, 12 Oct 2016 07:05:26 +0000 (00:05 -0700)]
Merge "tpl: tpl_surface_create_swapchain() API is modified for present mode support tpl_display_query_supported_present_modes_from_native_window() is added for querying of present mode" into tizen
deasung.kim [Sat, 24 Sep 2016 09:26:46 +0000 (18:26 +0900)]
tpl: tpl_surface_create_swapchain() API is modified for present mode support
tpl_display_query_supported_present_modes_from_native_window() is added for querying of present mode
- Add enum of tpl_display_present_mode_t
it's comments is referred from vulkan present mode comments of vulkan spec.
Change-Id: Ief1f322dbb083996d7b77afed7832860dc6e063a
Gwan-gyeong Mun [Wed, 12 Oct 2016 06:54:35 +0000 (23:54 -0700)]
Merge "tpl_worker_thread: added vblank event" into tizen
Gwan-gyeong Mun [Mon, 10 Oct 2016 11:21:09 +0000 (04:21 -0700)]
Merge "tpl_worker_thread: added worker_thread files" into tizen
deasung.kim [Sat, 24 Sep 2016 09:06:08 +0000 (18:06 +0900)]
tpl_worker_thread: added vblank event
added vblank event use tdm client for present mode FIFO
Change-Id: I86830125cf9091e634a03375857a7723f7f9cafc
deasung.kim [Sat, 24 Sep 2016 06:53:03 +0000 (15:53 +0900)]
tpl_worker_thread: added worker_thread files
change thread model from per each surface to one process
event handle in worker thread
backends set "draw done"/"fd get" func to tpl_worker_thread_surface
will be added more event functions
Change-Id: Ic6a316c75f3a0fa40e6fb3e8830f488e92d5cfa5
joonbum.ko [Thu, 6 Oct 2016 05:45:16 +0000 (14:45 +0900)]
tpl_wayland_egl: Do unreference the attached buffers when the flushing of buffer is occured. it uses the list of attached_buffers.
Change-Id: Iaf880e86807af33e75ad7ee41e682628db4216e1
Signed-off-by: joonbum.ko <joonbum.ko@samsung.com>
Mun, Gwan-gyeong [Thu, 6 Oct 2016 09:14:18 +0000 (18:14 +0900)]
tpl: Add TPL_ERROR_OUT_OF_MEMORY to enum vaulue of tpl_result_t.
- it provides error case of OOM (out of memory) for users of libtpl-egl.
previous: tpl returns TPL_ERROR_INVALID_OPERATION or NULL when the tpl fails on allocation of memory.
current : tpl returns TPL_ERROR_OUT_OF_MEMORY or NULL when the tpl fails on allocation of memory.
Change-Id: I9859b71be94422b2f36250d62a7e68029f355072
Signed-off-by: Mun, Gwan-gyeong <kk.moon@samsung.com>
Sangjin Lee [Thu, 6 Oct 2016 01:56:33 +0000 (10:56 +0900)]
tpl_wayland_egl: Fix error check for dispatch queue
Change-Id: I8b2f684a160358b632e1edf2d1f28a8843b409ed
joonbum.ko [Tue, 27 Sep 2016 09:41:29 +0000 (18:41 +0900)]
tpl: Added frontend API "tpl_surface_set_reset_cb"
- This API can set function of reset_cb to tpl_surface.
- When the tbm_surface_queue_reset is occured, if there is reset_cb which is registered by frontend, tpl_surface calls that function of reset_cb with reset_data.
- tpl_surface_validate() also can notify info of surface's "reset/resized states" to frontend as before.
But if you want to know the surface reset state without render call, it is better that registers callback of reset, using above API.
Change-Id: Ib762856ad1db306c435013218c1a4be2b24ef1c9
Signed-off-by: joonbum.ko <joonbum.ko@samsung.com>
joonbum.ko [Wed, 5 Oct 2016 08:44:52 +0000 (17:44 +0900)]
tpl_wayland_egl: Fix misused return value of wl_display_roundtrip_queue() on buffer_flusher_init()
- If there are errors on wl_display_roundtrip_queue then it returns values as '-1'.
Change-Id: I754df1768b46f0d815af84255255997429eefa7b
Signed-off-by: joonbum.ko <joonbum.ko@samsung.com>
Sangjin Lee [Fri, 23 Sep 2016 07:04:07 +0000 (16:04 +0900)]
tpl_wayland_egl: Use the tizen_surface_shm protocol for flushing of buffer
If the client's state changes the deiconified state, the tizen display server sends tizen_surface_shm_flusher event to client.
So, when the client gets the tizen_surface_shm_flusher event from server, client can flush buffers of surface_queue.
And the tizen_surface_shm_flush event is dispatched by client's default event queue in tpl_wayland_egl.
Change-Id: Icccb55e621fe264bf299d9d8c81e6f5376cee24d
joonbum.ko [Mon, 26 Sep 2016 01:49:06 +0000 (10:49 +0900)]
tpl_wayland_egl: Fixed some bugs related to wl_display_dispatch_queue_pending.
Temporal fix : Change of tbm_surface's reset state.
- Currently, tbm_surface's reset state is changed by tpl_surface_validate() and tbm_surface_queue event handler.
When we have good solution of changing of tbm_surface's reset state, tpl_surface_validate()'s wayland egl backend should remove changing of tbm_surface's reset state.
- Fixed some bugs about ACTIVE/DEACTIVE(queue_flush) events and finally applied wl_display_dispatch_queue_pending().
- Related with below commit.
019e7ff6cade7d660524cb23f7b7c442011a07dd
tpl_wayland_egl: dispatching before checking whether can dequeue or not.
- The event processing can be delayed in case there are idle buffer in free queue.
So, in dequeueable procedure, it has to call wl_display_dispatch_queue_pending before checking whether tbm_surface_queue can dequeue or not.
It can process that the events related to 'queue flush' more rapidly.
- In future commit, tpl_surface_validate will be modified to suitable one which is related to reset flag.
Change-Id: I0584211aed14ef2dd22531074c3b50e8463dd95f
Signed-off-by: joonbum.ko <joonbum.ko@samsung.com>
joonbum.ko [Fri, 23 Sep 2016 05:04:54 +0000 (14:04 +0900)]
tpl_wayland_egl: Call wl_display_dispatch_queue_pending with wl_tbm_event_queue instead of dispatching with default_queue on __tpl_wayland_egl_surface_fini().
- __tpl_wayland_egl_surface_fini() should call wl_display_dispatch_queue_pending with wl_tbm_event_queue because of the wl_event_queue is seperated default_queue and wl_tbm_event_queue.
Change-Id: I7b80e8752e4d056c4ee6fba5467503cd6c73c0db
Signed-off-by: joonbum.ko <joonbum.ko@samsung.com>
joonbum.ko [Fri, 23 Sep 2016 04:47:45 +0000 (13:47 +0900)]
tpl_wayland_egl: Release locks while tpl-egl waits for vblank done.
- If error occurs on tdm_client_handle_events(), the worker thread may be faced the loop of unlimited.
- As a result, after the next tpl_surface API is called , the main thread will be faced the dead lock state
Change-Id: I7902678dad6120d540563279f35ccd5a344851cc
Signed-off-by: joonbum.ko <joonbum.ko@samsung.com>
joonbum.ko [Thu, 22 Sep 2016 04:05:09 +0000 (13:05 +0900)]
tpl_wayland_egl: Revert commit 'dispatching before checking whether can dequeue or not.'
Change-Id: Ic053d5ce9d98ba94d09224541534f11e54575761
Signed-off-by: joonbum.ko <joonbum.ko@samsung.com>
joonbum.ko [Thu, 22 Sep 2016 02:52:23 +0000 (11:52 +0900)]
tpl_wayland_egl: Reused buffer's reset flag set to TPL_FALSE.
Change-Id: I2edc82f5e61ccb35deb22bdefe9b888568a313f9
Signed-off-by: joonbum.ko <joonbum.ko@samsung.com>
joonbum.ko [Thu, 22 Sep 2016 02:41:44 +0000 (11:41 +0900)]
tpl: Fixed image dump util.
Change-Id: I8c1727194fb1934cda60f6d413590ecc2ff0eb73
Signed-off-by: joonbum.ko <joonbum.ko@samsung.com>
joonbum.ko [Mon, 19 Sep 2016 10:59:01 +0000 (19:59 +0900)]
tpl_wayland_egl: dispatching before checking whether can dequeue or not.
- The event processing can be delayed in case there are idle buffer in free queue.
So, in dequeueable procedure, it has to call wl_display_dispatch_queue_pending before checking whether tbm_surface_queue can dequeue or not.
It can process that the events related to 'queue flush' more rapidly.
Change-Id: I5512e576e985d57dc9181e338f589d344f2b8161
Signed-off-by: joonbum.ko <joonbum.ko@samsung.com>
Gwan-gyeong Mun [Thu, 8 Sep 2016 08:27:08 +0000 (01:27 -0700)]
Merge "tpl_wayland_egl: Use seperated event-queue for wl_tbm." into tizen
Sangjin Lee [Thu, 8 Sep 2016 05:28:12 +0000 (14:28 +0900)]
tpl_wayland_egl: Use seperated event-queue for wl_tbm.
the tdm_client related protocol provides wl_tbm, wl_tbm_queue and wl_buffer proxy.
if wl_tbm proxy uses the seperated queue from wl_display, then wl_tbm_queue and wl_buffer also use the seperated queue by inherited from wl_tbm proxy's queue.
( if wl_tbm_queue and wl_buffer are gotten before setting of wl_tbm proxy queue. this machanism does not work. therefore, wl_tbm_queue and wl_buffer use wl_display's default queue.)
- this patch chages the timing of handling of wl_buffer_release event.
wl_buffer_release event is only handled before dequeue_buffer.
reference:
1. wl_tbm proxy handles what received below wayland events.
- buffer_attached_with_id
- buffer_attached_with_fd
2. wl_tbm_queue handles what received below wayland events.
- active
- deactive
Change-Id: Iac8b07016aae3418563ab5b5cc181fa8d2e7712f
joonbum.ko [Tue, 6 Sep 2016 09:17:22 +0000 (18:17 +0900)]
tpl_wayland_egl: Add object locking mechanism for multi-threads client.
- In the multi-threads environment, backend surface's locking mechanism(using tpl_object_t) is needed
in order to prevent the case that the tpl_list is concurrently accessed by wayland_event of multi-threaded client.
Change-Id: I2957a2893f469d2b8eb3fc4b4c30dd9da3cdfeff
Signed-off-by: joonbum.ko <joonbum.ko@samsung.com>
Mun, Gwan-gyeong [Mon, 5 Sep 2016 13:42:27 +0000 (22:42 +0900)]
tpl_wayland_vk_wsi: Change strerror to strerror_r for the guaranteee of thread safety.
Change-Id: I5947b09c64c439ef9433b5f9c8f47e73d7fa55b9
Signed-off-by: Mun, Gwan-gyeong <kk.moon@samsung.com>
Mun, Gwan-gyeong [Fri, 2 Sep 2016 12:21:14 +0000 (21:21 +0900)]
tpl_utils_hlist: Fix compile warning on 64bit architecture
fix size_t type argument format warning of printf() on 64bit architecture.
Change-Id: I6f3f0959f29dec2c26a5456b75dbdf85e00f0020
Signed-off-by: Mun, Gwan-gyeong <kk.moon@samsung.com>
Mun, Gwan-gyeong [Fri, 2 Sep 2016 11:45:21 +0000 (20:45 +0900)]
pkgconfig: package-config file which is generated while building.
before: package config's library section is fixed.
after : generated package config's library section is selected when package is building.
Change-Id: I938c9dd0c5267d3d04eb761ed672863af33fadbe
Signed-off-by: Mun, Gwan-gyeong <kk.moon@samsung.com>
joonbum.ko [Fri, 2 Sep 2016 06:35:29 +0000 (15:35 +0900)]
tpl_gbm: Add ttrace infos on DEQ~ENQ.
Change-Id: I3f94be8f2a985602b627b0ac786cf0be2a2e4df8
Signed-off-by: joonbum.ko <joonbum.ko@samsung.com>
Mun, Gwan-gyeong [Tue, 30 Aug 2016 13:36:44 +0000 (22:36 +0900)]
tpl_wayland_egl: add TPL_OBJECT_CHECK on __tpl_wayland_egl_surface_enqueue_buffer() and __tpl_wayland_egl_surface_dequeue_buffer()
Change-Id: Ie7f230aeb0eccf3689725459307f6f45eb891fa4
Signed-off-by: Mun, Gwan-gyeong <kk.moon@samsung.com>
Mun, Gwan-gyeong [Tue, 30 Aug 2016 13:16:16 +0000 (22:16 +0900)]
libtpl-egl: add checking of tpl_object validation feature
tpl_object check(validation check) supports magic-number mode and finding hash mode.
Change-Id: Ic885930bc6cda0d885250f8cd19371eacb5a1186
Signed-off-by: Mun, Gwan-gyeong <kk.moon@samsung.com>
Mun, Gwan-gyeong [Mon, 29 Aug 2016 14:25:36 +0000 (23:25 +0900)]
tpl_wayland_egl: Fix build warning
Change-Id: I0c40d3d40e7c9f6fefbf5e641a81732488ac69a8
Signed-off-by: Mun, Gwan-gyeong <kk.moon@samsung.com>
joonbum.ko [Mon, 29 Aug 2016 10:30:21 +0000 (19:30 +0900)]
tpl_wayland_egl: Add wl_proxy to wayland_egl_display about wayland_tbm_client for handling some events.
- The separated events will be processed like below.
[wayland_egl_surface->wl_tbm_queue] : process 'ACTIVE' and 'DEACTIVE'
[wayland_egl_display->wl_tbm] : process 'buffer_attached_with_id' and 'buffer_attached_with_fd'
- Related reference : wayland-tbm
https://review.tizen.org/gerrit/#/c/85406/
https://review.tizen.org/gerrit/#/c/85407/
Change-Id: Ic22ce21c753916cfa7e66f5ad3a67b8e24013df5
Signed-off-by: joonbum.ko <joonbum.ko@samsung.com>
joonbum.ko [Mon, 29 Aug 2016 10:54:07 +0000 (19:54 +0900)]
tpl_wayland_egl: Change the name 'wayland_egl_surface->wl_proxy' to 'wayland_egl_surface->wl_tbm_queue'.
Change-Id: Ia6bafcaa31d9652238e03307ba5a1bb590f47feb
Signed-off-by: joonbum.ko <joonbum.ko@samsung.com>
Mun, Gwan-gyeong [Mon, 29 Aug 2016 04:51:32 +0000 (13:51 +0900)]
libtpl-egl: Apply coding style and add coding style document for astyle.
Change-Id: Ie39cc4244e19532bb000a16b97776575352aab69
Signed-off-by: Mun, Gwan-gyeong <kk.moon@samsung.com>
joonbum.ko [Wed, 24 Aug 2016 11:04:33 +0000 (20:04 +0900)]
tpl_wayland_egl: Delete unnecessary polling for tdm vblank.
The necessary polling is already exist inside libtdm.
Change-Id: I5cf90dd599a2bee99ac3ba0094d8d4a36a7ca8bb
Signed-off-by: joonbum.ko <joonbum.ko@samsung.com>
joonbum.ko [Wed, 24 Aug 2016 10:58:30 +0000 (19:58 +0900)]
tpl_wayland_egl: Create tdm_vblank object directly and maintain every surfaces until destroy.
tdm_vblank object decide to be maintained every tpl_wayland_egl_surface
for the case where one or more surfaces are created in one display connection.
Change-Id: I74a3195d1d7f6662d233edf30f43ac87902da4b5
Signed-off-by: joonbum.ko <joonbum.ko@samsung.com>
deasung.kim [Wed, 24 Aug 2016 08:14:20 +0000 (17:14 +0900)]
libtpl-egl: change the usage of libtbm_sync api
remove tbm_sync objects and use fd
tbm sync related api change reference: https://review.tizen.org/gerrit/#/c/85169/ submitted
Change-Id: Ia291424c127487bed3af99759b6f37e9bd76c27a
deasung.kim [Mon, 1 Aug 2016 08:31:10 +0000 (17:31 +0900)]
tpl_wayland_vk_wsi: [sync - thread] added worker thread
the worker thread do wait buffer's draw done signal before attach/commit
and wait buffer enqueue with pthread_condition.
main thread support timeout in dequeue_buffer with worker thread.(single thread not support timeout)
this patch can modify clear after libtbm support timeout(can dequeue/can acquire)
Change-Id: I90fe6340c4457169073537f18c1fd7368b5b5f7b