nohz/sched: delay going tickless when CPU is loaded (bananacakes)
PM: Back off suspend if repeated attempts fail

    If 10 attempts to suspend either fail or immediately resume within
    1 second, back off suspending for 5 seconds multiplied by the
    number of consecutive backoffs.  That is, pause suspends for 5
    seconds after the first 10 failures, 10 seconds after the next
    10 failures, and so on.

    Avoid continually trying to suspend in situations in which a
    driver is repeatedly rejecting suspend or a pending wakeup
    interrupt is not handled, burning CPU in the continuous suspend
    attempts.

    Change-Id: I32289676d95a307ea3aa5e78f6c126ca979c0fec
    Signed-off-by: Todd Poynor <toddpoynor@google.com>

    Conflicts:

    	kernel/power/wakelock.c
PM: wakelocks: Don't report wake up wakelock if suspend aborted

If the wakelock driver aborts suspend due to an already-held
wakelock, don't report the next wakelock held as the "wake up
wakelock".

Change-Id: I582ffbb87a3c361739a77d839a0c62921cff11a6
Signed-off-by: Todd Poynor <toddpoynor@google.com>
PM: wakelocks: Display wakelocks preventing suspend by default

Use DEBUG_WAKEUP flag to show wakelocks that abort suspend, in
addition to showing wakelocks held during system resume.
DEBUG_WAKEUP is enabled by default.

Change-Id: If6fa68e8afbc482a5300ffab2964694b02b34f41
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Updated the built-in wakelock (ACA)
wakelocks: Allow independent debugging of wake_lock_destroy() Some people have battery life issues with a major contributor ofdeleted_wake_locks.  This is impossible to debug without enablingDEBUG_WAKE_LOCK, which spams the dmesg with a lot of info irrelevantto deleted_wake_locks.  This allows an independent debug_mask settingfor wake_lock_destroy()
Updated EarlySuspend and WakeLock (ACA)
msm: camera: patched the wrong file before
Makefile: add some building optimization options
pmem: respect PMEM_DEBUG config
fs: lower vfs_cache_pressure
msm_fb: fix framebuffer console (CAF)
vidc: 720p: Fix for H264 thumbnail generation

Core is sending non frame data error for SPS and
PPS, which is communicated as a fatal error to
the component in case of idr only mode. Fixed this
by sending it as a bit stream error.

CRs-Fixed: 326563
Signed-off-by: Rajeshwar Kurapaty <rkurapat@codeaurora.org>
(cherry picked from commit f365b26933818f0073aa99b2b2624c703e19a833)

Change-Id: I9b5346a53d55d2a651c2e425c43388df610d7a16
Signed-off-by: Srivalli Oguri <oguri@codeaurora.org>
net: pppox: add stub PX_PROTO_PPTP macro to be compatible with newer kernel headers
msm: kgsl: Make sure kmemleak tool does not report incorrect mem leak.

Certain memory allocations are not properly tracked by kmemleak tool,
which makes it to incorrectly detect memory leak. Notify the tool by using
kmemleak_not_leak() to ignore the memory allocation so that incorrect leaks
report are avoided.

CRs-Fixed: 334294
Signed-off-by: Anshuman Dani <adani@codeaurora.org>
(cherry picked from commit eecd52061a50325db02d2396bfd455b306a04f34)

Change-Id: If2c955f95c650a73a04aca01977dc7ac13319878
Signed-off-by: Ram Kumar Chakravarthy Chebathini <rcheba@codeaurora.org>
msm: kgsl: Do not BUG in GPU recovery if a valid context can't be found

Don't BUG() if we can't find a valid context to recover to; just fail and
go into a zombie state. This usually happens after a first hang goes bad
and the system keeps hanging while trying to find its way. The problem with
a BUG() in this case is that the system goes down and we can't recover the
snapshot or other debug information.

Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
(cherry picked from commit a400d8da2d5464a47b3fe19b96a3bb04af82114e)

Change-Id: I68581017f6e78a866a6d91033f980ecd06d96360
Signed-off-by: Gopal G Goberu <ggober@codeaurora.org>
msm_fb: display: fix incorrect MDP formats components unpack pattern

Many of MDP input formats don't have correct unpack pattern, so image
displayed on screen is not in the actual format set.

CRs-fixed: 339114,337040
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
(cherry picked from commit c5638f898324df37e40e402d208b0e97337d536b)

Change-Id: I66a404db039502d0511cd3d7dc34e81c0eca1d61
Signed-off-by: Gopal G Goberu <ggober@codeaurora.org>
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
msm: kgsl: set the dma_address field of scatterlists

Ion carveout and content protect heap buffers do not
have a struct page associated with them. Thus
sg_phys() will not work reliably on these buffers.
Set the dma_address field on physically contiguous
buffers.  When mapping a scatterlist to the gpummu
use sg_dma_address() first and if it returns 0
then use sg_phys().

Change-Id: Ie5f19986446be4383dfbfffa2534136b592e8e46
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
(cherry picked from commit 582fe31d2719b45fd0accf85bf2351f1a15b97b7)
msm: audio: qdsp5v2: Update PCM driver to use pmem memory (squashed commit)
vidc: Add metabuffer mode support for encoder driver.

Video encoder driver when configured in meta buffer mode,
will allow clients to register buffers in data path.

Change-Id: I23e2cb07386461275da5731134d8aad7df1cd060
Signed-off-by: Gopikrishnaiah Anandan <gopikr@codeaurora.org>