sw_sync: fix video_composer fence timeout issue [1/1]
authorAo Xu <ao.xu@amlogic.com>
Tue, 10 Dec 2019 11:06:31 +0000 (19:06 +0800)
committerTao Zeng <tao.zeng@amlogic.com>
Wed, 11 Dec 2019 09:25:50 +0000 (02:25 -0700)
commit547c96318ebca46fa71b0dfc3af3c3b7f3a24228
tree93785cee51d7f9ce4d42884cbc14b24bf3f0e0c8
parent6e27b9aadb2c3f73ba6c247445ee6ab091f5f190
sw_sync: fix video_composer fence timeout issue [1/1]

PD#SWPL-18237

Problem:
SF poll sync-a and sync-b, then merge them to sync-c.
sync-c refer the sync-b's fence in sync_merge function.
SF close sync-a, fence-a was released.
SF close sync-b, it just remove sync_pt from the timeline's
active_list, fence-b was not released due to the reference count.
OMX poll the sync-c, call fence_add_callback, but it will not
call enable_signaling because SF has polled fence-b.
It will lead OMX fence wait timeout.

Solution:
when SF call fence_remove_callback,
clear the FENCE_FLAG_ENABLE_SIGNAL_BIT.

Verify:
U212

Change-Id: I2ff690e5f73067b9289b9cbc35fa34a6362f0dfa
Signed-off-by: Ao Xu <ao.xu@amlogic.com>
drivers/dma-buf/fence.c