msm: mdss: avoid race conditions during fb release

During fb release we should release all resources that are associated to
that process. However, in current release function this can lead to
kickoff being done, if this is done while display thread is running
there can be race condition between the updates from two different
threads. Fix this by pushing the commit through the display thread in
cases where display thread should be running, or otherwise shutdown this
thread and do it along with panel blanking.

Change-Id: I9ff6316c18adfdb67d0250a144ddc2f9f2634273
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
msm: mdss: fix deadlock between commit thread and shutdown

There is a deadlock in use cases where fb shutdown
is called. To avoid this condition we need to
kill display thread before release happens during
shutdown.

Change-Id: I24b03e60179c605a8572b5a011d746002e26ca18
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>