msm: kgsl: Move cmdbatch destroy out of the drawctxt spinlock
While emptying the cmdbatch synclist which is an rcu list during
cmdbatch destroy, there is a wait_for_completion() which can cause
the thread to go to sleep. As a result, we cannot destroy the
cmdbatch while holding the drawctxt spinlock since that would
cause a BUG.
Move the invalid cmdbatches into a temporary list as we loop
through the drawctxt cmdqueue and destroy them after releasing
the drawctxt spinlock.
Change-Id: Ia21f96999d8b9bd342c50a516a2ab4bbeda5ba7b
Signed-off-by:
Shrenuj Bansal <shrenujb@codeaurora.org>
Loading
Please register or sign in to comment