wl_egl: queue force flush will be run in thread 03/304503/4
authorJoonbum Ko <joonbum.ko@samsung.com>
Tue, 16 Jan 2024 09:03:53 +0000 (18:03 +0900)
committerJoonbum Ko <joonbum.ko@samsung.com>
Thu, 18 Jan 2024 11:06:19 +0000 (20:06 +0900)
commitb33eab5a410b1a965aaea2fd657582b84ca7b41a
treec8efc585f3a8d00b4d3e39180b20588493a771af
parent135948d8275ad7dfe46eb95c786aaa6d0a40ac7e
wl_egl: queue force flush will be run in thread

 AS-IS
  - In case where can_dequeue returns timeout error,
   the operation of forcibly flushing the tbm_queue and
   emptying buffer list of wl_egl_surface were performed in
   the parent thread (dequeue thread).
 PROBLEMS
  - Whenever a buffer lis is traversed, the thread should be paused,
   but the timeout error is often occured in pausing operation.
  - In order to flush tbm_queue, it is necessary to use complex
   mutex locking.
 TO-BE
  - The operation of emptying the queue and buffer list is performed
   in the wl-egl-thread.
  - The parent thread waits for the operation in the wl-egl-thread
   to be completed, and in the following cases, it is regarded as an
   error situation and causes the dequeue to return NULL.
   1. If the result of tpl_gcond_timed_wait is a timeout error
   2. If the result of tbm_surface_queue_can_dequeue is not 1 even
     after receiving the signal from the wl-egl-thread.

Change-Id: Ibe65330f508d2193a02fd5fe43ba1b651dc0499c
Signed-off-by: Joonbum Ko <joonbum.ko@samsung.com>
src/tpl_wl_egl_thread.c