msm: kgsl: Force the ME off before reading the microcode.

On A3XX reading the microcode while the CP is running is dangerous
beyond words.  By setting the offset address for the read, we are
essentially changing the instruction pointer for the ME while it
is running causing opcode errors, gpu faults and/or system errors.

We do not want to stop the CP at the beginning of the snapshot
process beacuse doing so changes the RBBM status and the state of
the CP registers which may damage the debug effort.  But by the
time we get to the microcode read we no longer care about the state
of the registers so we can freely halt the ME just before starting
the read.

Change-Id: I66a6b46d9d269da5a6898f177ee1e4e8b68ebc01
CRs-fixed: 585449
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Panwar Vivek <vpanwa@codeaurora.org>
msm: kgsl: Ensure signals do not cause waits to end early.

Move to using uninterruptible (which will bail if any signal is received)
when waiting on events.  A signal was causing the wait to finish
prematurely, freeing memory while the GPU was still using it.  This caused
quite a few page faults and the device to become unstable.

Change-Id: Ied4dfc40649892ab37924cbec87a517b7bf5ef74
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Panwar Vivek <vpanwa@codeaurora.org>
msm: kgsl: Panic if global timestamp wait fails in context detach.

If we timeout while waiting for the last issued global timestamp for
a detaching context to expire (10 seconds!) then we are on a fast
train to crashville.  BUG_ON() so we can stand a chance of debugging
this very rare issue.

Change-Id: I3bd4cffe05127b07ede06a29b1701b65b8923706
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Panwar Vivek <vpanwa@codeaurora.org>
msm: vidc: Disable clock gating for 8x26

There are stability issue observed on 8x26 with
inter-frame clock gating enabled so disable
interframe clock gating on 8x26.

Change-Id: I0e2b89a0ce36ed4d5f15903ffe68b7c7275719c9
Signed-off-by: Vinay Kalia <vkalia@codeaurora.org>
msm: clock-a7: fix memory corruption due to out of boundary write

Out of bounds memory write is seen while reading the "qcom,speed-bin"
property from DTSI. Correct the memory allocation size to fix this
issue.

CRs-Fixed: 594553
Change-Id: Ica250132e9139b874102a7d6c388a76517dea6c3
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>