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>
if (ret) {
list_del_init(&cb->node);
if (list_empty(&fence->cb_list))
+#ifdef CONFIG_AMLOGIC_MODIFY
+ if (fence->ops->disable_signaling) {
+ fence->ops->disable_signaling(fence);
+ clear_bit(FENCE_FLAG_ENABLE_SIGNAL_BIT,
+ &fence->flags);
+ }
+#else
if (fence->ops->disable_signaling)
fence->ops->disable_signaling(fence);
+#endif
}
spin_unlock_irqrestore(fence->lock, flags);