hwc: Ensure pipe unset and commit is called correctly
In certain scenario, waiting for 2 vsync cycle may not be enough
for composition to trigger. In this case there is possibility of
wfd commit happening before pipe unset results in pipe not getting
cleaned up properly. Reusing pipe which is not cleaned up can lead
to crash or undetermined behaviour.
In certain scenario, waiting for 2 vsync cycle is too much time which
may cause commit to be delayed after unset. This may again lead to pipe
allocation failure in next cycle.
Instead of relying on 2 vsync cycle, Use wait and signal which ensures
that wait is only for 1 composition cycle.
Change-Id: Ib5273e2d265ed19827204ab5316d1b5b1a27bd3d
3 files changed