msm_fb: Update MDP fence wait behaviour

The current fence wait times out too early in cases where the GPU
is under a heavy workload. Change this behaviour to warn and wait
for a longer time for GPU to complete it's work.

Change-Id: I8b20c22733a77c1aaea4a1fd1e4daaa14b5ec2fd
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
(cherry picked from commit 1cd460f10cbff449c8048a9a6a23bcdb9e32494b)

Conflicts:
	drivers/video/msm/msm_fb.c
msm_fb: Increase base fence timeout

The earlier value of 1 second caused unnecessary warnings on
heavy workloads by the GPU.

Change-Id: Ib4a5b098267251d5c63c4d8d2a2f51b339acc1d2
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
Signed-off-by: Lynus Vaz <lvaz@codeaurora.org>
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
(cherry picked from commit b88d7750988c01f97cfe8215dad8baa071cee005)
msm: add msm_hdmi_modes header

Change-Id: I3805809c71e2fbf4e8a0464f976c82d58a32d3cf
(cherry picked from commit 90276a584daa5ee0a6cd513cec798a2660716b87)
msm: kgsl: hold a process_private refcount in process_mem_print

There is a possible race condition where the process can be going
away while its debugfs 'mem' file is being read, which could cause
memory corruption.

Conflicts:
	drivers/gpu/msm/kgsl.c
	drivers/gpu/msm/kgsl_device.h

CRs-Fixed: 627780
Change-Id: I697486faeb3f186fd1220d0acc1e449a4f7b77b0
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
(cherry picked from commit ea38d2f34e5d097ae8d22cdda3b891bc3226c4eb)
msm: kgsl: Look up the process struct in process_mem_open()

The pointer to an active process struct stands the risk of going stale
if process_mem_open() is called just before the debugfs dentry is
destroyed.  Instead of storing and using the pointer pass the process pid
to process_mem_open() and do a lookup to ensure that we always get active
processes.

Conflicts:
	drivers/gpu/msm/kgsl.c
	drivers/gpu/msm/kgsl_debugfs.c

Change-Id: Ic0dedbad3a3b54dc96251663fdf89c466fef3ca5
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Gaurav Gagrani <ggagrani@codeaurora.org>
(cherry picked from commit 711e90aee07a4b4871cf215530c91a0e9dd2df24)

Conflicts:
	drivers/gpu/msm/kgsl_debugfs.c
msm: kgsl: prevent kgsl_get_pagetable from returning a destroyed pt

A race condition exists between kref_get_pagetable and
kref_put_pagetable such that is is possible to put the last
reference to a pagetable slightly before it has been removed
from the list. By checking kref_get_unless_zero we can determine
if the last reference has already been released. This is safe
because the list is protected by a ptlock.

Change-Id: If6a75e9ca0dec6a12bda5739f835c936a4c3a3b4
Signed-off-by: Jeff Boody <jboody@codeaurora.org>
(cherry picked from commit 571213170daea66efd971e82c7c03a2129e7e868)
msm: kgsl: Fix spinlock recursion in destroy pagetable

pagetable list is protected by ptlock. Few functions
while iterating over a pagetable list takes same ptlock,
kgsl_destroy_pagetable() also need same lock. This will
cause spinlock recursion if kgsl_destroy_pagetable()
called while iterating over a list. Created two versions
of same function one is with lock and other is without
lock.

CRs-Fixed: 621172
Change-Id: I61440f99022fce8629a57bb5661e2eef9613187b
Signed-off-by: Prakash Kamliya <pkamliya@codeaurora.org>
Signed-off-by: Gaurav Gagrani <ggagrani@codeaurora.org>
(cherry picked from commit b14ae3883255e03fcef0814a63aac2d311526d90)
radio-tavarua; update too kk_2.7-stable

Change-Id: I49160c36e8fefa3e66d4235dd6c15a4a1d33b3dc
(cherry picked from commit 27186f8862daeef8bbc162f15b3592d3871d9ff3)

Conflicts:
	drivers/media/radio/radio-tavarua.c
msm: kgsl: bulk update to kk_2.7

(cherry picked from commit 7e7599c7e1db87cd7cb6b4472fa619f19da2175e)

Conflicts:
	drivers/gpu/msm/a2xx_reg.h
	drivers/gpu/msm/adreno.c
	drivers/gpu/msm/adreno.h
	drivers/gpu/msm/adreno_a2xx.c
	drivers/gpu/msm/adreno_a3xx.c
	drivers/gpu/msm/kgsl.c
	drivers/gpu/msm/kgsl_debugfs.c
	drivers/gpu/msm/kgsl_device.h
	drivers/gpu/msm/kgsl_iommu.c
	drivers/gpu/msm/kgsl_mmu.c
	drivers/gpu/msm/kgsl_mmu.h
	drivers/gpu/msm/z180.c
	drivers/gpu/msm/z180.h
gpu: ion: bulk update to kk_2.7

(cherry picked from commit 64974a3dd6b6c210dbc79bf2809c981ea3e5c687)