msm: kgsl: Faster GPU hang detection

Check global GPU status registers in intervals of 2 seconds,
if the registers did not change after 2 seconds trigger a hang.
When there is an actual GPU hang and GPU is stalled, this reduces
the current hang detection time from 10 seconds to 2 seconds.
Faster GPU hang detection reduces the overall time to recover
from GPU hang.

Change-Id: If432ccacc1b77b4fc7f08b756886bd3ae5edf04f
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>

Conflicts:

	drivers/gpu/msm/adreno.c
Signed-off-by: Ranjhith Kalisamy <ranjhith@codeaurora.org>

Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
msm: kgsl: Ensure glitch free changing of the GPU frequency

If there are requests to skip levels while the clocks are on
be sure to hit the intermediate frequencies.

Change-Id: Ib69bcbc7eb87532c090b4ede28d967e4cd0f08ec
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
Signed-off-by: Ranjhith Kalisamy <ranjhith@codeaurora.org>
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
msm: kgsl: Allow the wait_timeout to be disabled

With the improved hang detection we don't technically need a upper
timeout bound for a process to wait in waitfortimestamp().  Allow
for a idle_timestamp of '0' to allow the loop to wait for ever.
The infrastructure for changing the idle_timeout still exists
so it can be changed to whatever value is appropriate for debugging
or testing.

CRs-fixed: 382366
CRs-fixed: 383999
Change-Id: Ic0dedbadf2c100eb56ed2338914575061776e725
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Michael Street <mstreet@codeaurora.org>

Conflicts:

	drivers/gpu/msm/adreno.c
Signed-off-by: Ranjhith Kalisamy <ranjhith@codeaurora.org>

Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
bcmdhd: Update from upstream jb_chocolate
msm: kgsl: Don't use 'wait_timeout' in the idle functions

There are two distinct parts of the code that may need to loop waiting
for the GPU to complete a task: waiting for a timestamp and waiting
for the entire core to go idle. Waiting for a timestamp technically
doesn't need a timeout since the only downside is a process that sleeps
forever with an interruptible timeout. Waiting for the core to go idle
is more problematic because it is a busy wait and it is the last point
we can safely detect a GPU hang.

Beacuse we can (and will) not use a timeout in wait for timestamp, we
need to institute a new timeout value to be used in idle. Nowhere the
idle function is called uses a custom value for the timeout, so remove
that parameter from the calls and use a static timeout value in the
core specific functions.

Change-Id: Ic0dedbad9ecd2044c34e4cec551dc7f53b253f3d
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>

Signed-off-by: Michael Street <mstreet@codeaurora.org>

Conflicts:

	drivers/gpu/msm/adreno.c
	drivers/gpu/msm/adreno_a3xx.c
	drivers/gpu/msm/kgsl_gpummu.c
	drivers/gpu/msm/kgsl_iommu.c
	drivers/gpu/msm/z180.c
Signed-off-by: Ranjhith Kalisamy <ranjhith@codeaurora.org>

Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
bcmdhd: Add misc untracked source
Bluetooth: Prevents update of Low Energy connection parameters

The start encryption command fails when the LE update
connection parameters request is pending.
Hence, prevent the update of LE connection parameters during the
bonding process. The update of connection parameters is
not necessary during bonding process.

CRs-fixed: 380257
Change-Id: I41cb3998fecc2297d61ec97d66ac35a0bd41ca80
Signed-off-by: Subramanian Srinivasan <subrsrin@codeaurora.org>
Bluetooth: Update latest from msm8260 drivers CF
sensors: mt9v113: set correct mode for Doubleshot FFC orientation

Change-Id: I0e725903969a7bc3c8e5e324e31bfdbe9df3b757