Increment and decrement pending_flips only for flips, not blits

When a display is not flippable, OMAPDRI2ScheduleSwap falls back to
a blit, which causes switch to blit mode, which waits for all flips
to complete based on pending_flips counter which was incremented before
the decision was made whether to flip or fall back to blit causing a
deadlock. This change moves the pending_flips increment after the
decision is made to do the flip and only decrements it for completed
flips not blits.

BUG=chrome-os-partner:23877
TEST=move primary display to HDMI monitor, start playing a video, close
and open lid repeatedly.

Change-Id: Ieccb224ba03e9f863ffc64f2d2a2a091a8bce32e
Signed-off-by: Dominik Behr <dbehr@chromium.org>
Previous-Reviewed-on: https://chromium-review.googlesource.com/175978
(cherry picked from commit c04f8b8cc175c0dbe514051c8e35dab7dc6dd515)
Reviewed-on: https://chromium-review.googlesource.com/176545
Reviewed-by: Zelidrag Hornung <zelidrag@chromium.org>
1 file changed