This change provides fix for below issues :
1. If local handle is imported as global, synx takes extra reference
on global handles which were not released because on signal
callback data had local handle instead of global causing handle
leak.
2. If all the child handles of merge fence are local and
merged fence is global, upon merge its signaled incorrectly
as num_child == 0 even if no one signaled merged fence.
3. During merge synx takes one reference each child dma fences.
When merged fence is released, dma fence reference of child handles
were not released causing handle/dma fence leak. This change
signals underlying child fences if the merged handle is ACTIVE
during release and release reference on dma fence.
4. If local handle is imported as global, map_count was not getting
incremented because of which object was destroyed more than once.
This change increases the map_count variable when local handle is
imported as global or vice-versa.
5. In synx_signal API, synx_signal_offload_job followed by signaling
dma fence. synx_signal_offload_job internally calls
synx_signal_handler which signals dma fence and because of which
sometimes synx_signal was returning failure. This fix ensures that
synx_signal_handler does not overtake synx signal API.
Change-Id: Ia8d2eb969514347cac30f8ae33ce2028119dfd47
Signed-off-by: Urvesh Rathod <quic_urathod@quicinc.com>