msm: kgsl: Keep the active draw context until it is switched out
Instead of trying to make a decision to switch out the active
draw context for NULL at detach time leave the reference count
for it until the next context switch or until the next slumber
whichever comes first. This avoids races with the preemption
code and ensures a smooth transition.
A side effect is that we were depending heavily on the context
detach to reset the ringbuffer to the default at power down and
we didn't touch it on power up (though we did on soft reset and
wake from slumber. Curious). Obviously if we are no longer
switching we will need to force the default pagetable during start
but it seems to me like this would be the right thing to do even
if we were still switching out.
CRs-Fixed: 1009124
Change-Id: Ic0dedbadff8df192096292b221130c8ef5b31e12
Signed-off-by:
Jordan Crouse <jcrouse@codeaurora.org>
Loading
Please register or sign in to comment