msm: board-8930: Keep the GPU power rail on when display is on

Do not allow the GPU to go into SLUMBER while the display is still
on. This fixes issues seen on 8930 when this feature is enabled.

Change-Id: I8c76d1297c2215987bdd493cb9f04d45d9ec87dc
Signed-off-by: Lynus Vaz <lvaz@codeaurora.org>
msm: spm: set vdd directly for current cpu

In cases where a cpu is setting vdd for itself we need not
call msm_spm_smp_set_vdd through smp_call_function_single.

Without this change when CPU calls for itself when interrupts
are disabled we get following warning

[ 38.407752] ------------[ cut here ]------------
[ 38.407752] WARNING: at kernel/kernel/smp.c:320
smp_call_function_single+0xa8/0x1c8()
[ 38.407752] Modules linked in: adsprpc
[ 38.407752] [<c00149b8>] (unwind_backtrace+0x0/0x11c) from [<c0082afc>]
(warn_slowpath_common+0x4c/0x64)
[ 38.407752] [<c0082afc>] (warn_slowpath_common+0x4c/0x64) from
[<c0082b2c>] (warn_slowpath_null+0x18/0x1c)
[ 38.407752] [<c0082b2c>] (warn_slowpath_null+0x18/0x1c) from
[<c00c510c>] (smp_call_function_single+0xa8/0x1c8)
[ 38.407752] [<c00c510c>] (smp_call_function_single+0xa8/0x1c8) from
[<c0058f6c>] (msm_spm_set_vdd+0x48/0x70)
[ 38.407752] [<c0058f6c>] (msm_spm_set_vdd+0x48/0x70) from [<c0056a98>]
(msm_pm_power_collapse+0x13c/0x334)
[ 38.407752] [<c0056a98>] (msm_pm_power_collapse+0x13c/0x334) from
[<c0057120>] (msm_pm_enter+0x170/0x2dc)
[ 38.407752] [<c0057120>] (msm_pm_enter+0x170/0x2dc) from [<c00b7580>]
(suspend_devices_and_enter+0x1d0/0x334)
[ 38.407752] [<c00b7580>] (suspend_devices_and_enter+0x1d0/0x334) from
[<c00b7800>] (pm_suspend+0x11c/0x1f8)
[ 38.407752] [<c00b7800>] (pm_suspend+0x11c/0x1f8) from [<c00b87a4>]
(suspend+0x68/0x180)
[ 38.407752] [<c00b87a4>] (suspend+0x68/0x180) from [<c009b050>]
(process_one_work+0x280/0x488)
[ 38.407752] [<c009b050>] (process_one_work+0x280/0x488) from
[<c009b46c>] (worker_thread+0x214/0x3b4)
[ 38.407752] [<c009b46c>] (worker_thread+0x214/0x3b4) from [<c009f364>]
(kthread+0x84/0x90)
[ 38.407752] [<c009f364>] (kthread+0x84/0x90) from [<c000f108>]
(kernel_thread_exit+0x0/0x8)
[ 38.407752] ---[ end trace da227214a82491ba ]---

Change-Id: I1aa121f57d74860b6bc8620b40699567e55a9d02
CRs-Fixed: 480408
Signed-off-by: Venkat Devarasetty <vdevaras@codeaurora.org>
Merge "msm: spm: set vdd directly for current cpu"
msm: camera: Add null checks for stats module

Add null checks in stats driver before accessing the
data structures to avoid null pointer crash.

Change-Id: I87639848e94e69e3fa020344f936e7cc182e2c66
Signed-off-by: Nishant Pandit <npandit@codeaurora.org>
msm: kgsl: Submit a draw command on resume

For A305, submit an extra draw command while resuming the GPU from
SLUMBER state. This fixes corruption seen when the screen is
turned on.

Change-Id: Iafed90b617b0a700ac3f2afcb6d9ecadca590914
Signed-off-by: Lynus Vaz <lvaz@codeaurora.org>
Merge "msm: board-8930: Keep the GPU power rail on when display is on"
Merge "msm: kgsl: Submit a draw command on resume"
Merge "msm: camera: Add null checks for stats module"
mmc: core: Fix some driver hangs when dealing with broken devices

There are infinite loops in the mmc code that can be caused by bad
hardware.  The code will loop forever if the device never comes back
from program mode, R1_STATE_PRG, and it is not ready for data,
R1_READY_FOR_DATA.

A long timeout is added to prevent the code from looping forever.
The timeout will occur if the device never comes back from program
state or the device never becomes ready for data.

It's not clear whether the timeout will do more than log a pr_err()
and then start a fresh hang all over again.  We may need to extend
this patch later to perform some kind of reset of the device (is
that possible?) or rejection of new I/O to the device.

Change-Id: I1f3e5fddffb5134743fbfbcdef5e97803fd25fc6
Signed-off-by: Trey Ramsay <tramsay@linux.vnet.ibm.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Merge "mmc: core: Fix some driver hangs when dealing with broken devices"