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.

Conflicts:
	drivers/gpu/msm/adreno_a3xx_snapshot.c

Change-Id: Ic0dedbad85d7ec26915f054dd597e226e8101a29
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Sunil Khatri <sunilkh@codeaurora.org>
Staging: android: binder: More offset validation.

Make sure offsets don't point to overlapping flat_binder_object
structs.

Conflicts:
	drivers/staging/android/binder.c

Change-Id: I425ab0c46fbe2b00ed679c5becf9e8140395eb40
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Git-commit: 457c3cd05958b8397211ae1f6dd3c3d325f4c0ea
Git-repo: https://android.googlesource.com/kernel/common/
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
Signed-off-by: Ajay Dudani <adudani@codeaurora.org>
Signed-off-by: Nirmal Abraham <nabrah@codeaurora.org>
Signed-off-by: Prados Das <prados@codeaurora.org>
msm: kgsl: Increase the timeout value for fault detection

Increment the timeout value for detecting faults from 50ms to
200ms. The fault detection mechanism is a backup to hardware
fault detection. 50ms is small since it has been observed that
this mechanism triggers false positives with 50ms.

CRs-Fixed: 672164
Change-Id: I8f382051e06bdc47f152309a2868092e1980604e
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
Signed-off-by: Sunil Khatri <sunilkh@codeaurora.org>
msm: kgsl: Don't hold the refernce to the process private in kgsl create context

There is a possible race condition for dev_priv where the kgsl_release
is called, while adreno_ft_detect has reference for the same context.
This change will avoid to use dev_priv in context destroy, which is
already freed in kgsl_release.

CRs-Fixed: 688521
Change-Id: I0411873b605c4e264057eaa3f79c6439004c427c
Signed-off-by: Gaurav Gagrani <ggagrani@codeaurora.org>
msm: display: non-blocking for overlay update

Display commit will work as overlay commit when
MDP_DISPLAY_COMMIT_OVERLAY flag is set. It will be
non-blocking if wait_for_finish is false.

Signed-off-by: Ken Zhang <kenz@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
Change-Id: Ibd143dbfcd2fdd7a8fab3038c5af4e2fbc9ea198
msm_fb: display: update var in display commit

Need the value of var in display commit to update the double buffers.
If not, double buffering doesn't work in minui (eg. recovery and off-charger
mode)

Change-Id: I1fba52243cc781f18742131759245911d32c9b18
Signed-off-by: Devin Kim <dojip.kim@lge.com>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
msm_fb: display: get mipi frame rate from panel file

If frame rate value for mipi video panel is coded in panel file it can
be directly used to avoid calculation error.

Change-Id: I6ad86226c81da4bcf36196385f9ff4bea0bef0ca
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
msm: mdp: Update sync pt. behaviour

Add a retire fence and clean up the existing release fence
implementation

Change-Id: Iaeff28aa77264a064280a0fc74408ce9c3792229
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>