msm: kgsl: Ensure correct GPU patch ID is set.

Correct the patch ID that is returned by newer versions of
the GPU hardware.  This ensures the correct firmware is used
for the GPU.

Change-Id: I5c29d28a88f8f2e34ea0b6962b74358a55939f86
Signed-off-by: Akshat Saha <asaha@codeaurora.org>
seq_file: Allocate memory using vmalloc when kmalloc failed

When dumpstate access /proc/xxx/binder, this binder include lots of info,
it will use seq_read in kernel, in this function, it will trigger
high order memory alloc, when read binder info or other large file,
this will cause memory presure when system don't have contious high order
memory, it will lead to high kswap workload to reclaim the page. so change
kmalloc to vmalloc, it can avoid continuously high order memory allocating.

CRs-fixed: 514982

Change-Id: I463d5f72c24b7bb298e14b0da49c5fc96091ecc1
Patch-mainline: linux-arm-kernel(lkml) @ Thu, 31 Jan 2013 14:11:32 +0800
Link : https://lkml.org/lkml/2013/1/31/20
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
msm: scm: Add scm_call_noalloc and helper macros

Currently, scm_call internally calls kmalloc() to allocate a command
buffer structure. This prevents scm_call from working before kmalloc
structures are initialized or during atomic contexts. Allow clients
to pass in a pre-allocated buffer for scm_call to be used for internal
structures.

Change-Id: Id09500c8c696298228aefdcc2a61953e654677c9
CRs-Fixed: 498392
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
arm: Add ARCH_RANDOM Kconfig

Some boards may support architecture generated random numbers. Add
the appropriate Kconfig.

Change-Id: I0077a982c9bb6d3a35435cc27fe40b7e0596ca84
CRs-Fixed: 498392
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
msm: implement ARCH_RANDOM

Currently, the software random number generator is not intialized
until relatively late in the boot process. Software that relies on
random numbers early will not be reliable. Entropy sources are
available early but not early enough for some use cases which means
that moving the software random number generation earlier is not an
option. As an alternate solution, implement the functions associated
with CONFIG_ARCH_RANDOM. These functions currently make a call into
trustzone to get reliable random numbers. The functions are disabled
once the regular random number generator is sufficiently reliable.

Change-Id: If40cfcb96b091fa26a28047c10a902287b26f6c1
CRs-Fixed: 498392
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
init: Move stack canary initialization after setup_arch

Stack canary intialization involves getting a random number.
Getting this random number may involve accessing caches or other
architectural specific features which are not available until
after the architecture is setup. Move the stack canary initialization
later to accomodate this.

Change-Id: I00b564a2c3172229a44339c061fa380c17fe7d8e
CRs-Fixed: 498392
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Merge "seq_file: Allocate memory using vmalloc when kmalloc failed"
base: sync: Debug Traces for sync alloc & free calls

Change-Id: I0cf913f38df7601c712702066fd513d9190a1c78
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
staging: logger: hold mutex while removing reader

The readers list is traversed under the log->mutex lock
(for example from fix_up_readers()), but the deletion of
elements from this list is not being done under this lock.

CRs-Fixed:534569

Change-Id: I3f05fccb56106d00b684e33ee949e97de44b19d0
Cc: Brian Swetland <swetland@google.com>
Cc: Dima Zavin <dima@android.com>
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Merge "staging: logger: hold mutex while removing reader"
msm: display: Add missing wait_for_fence in overlay_commit

wait_for_fence was missing in overlay_commit.
This is needed to make sure buffer is ready before composition.

CRs-Fixed:531517

Change-Id: I78c757b45dc61ead61b1e952aa31833815c88524
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
Signed-off-by: Nirmal Abraham <nabrah@codeaurora.org>
Merge "msm: display: Add missing wait_for_fence in overlay_commit"
msm : kgsl: Poke adreno for every 200ms

Poking adreno_idle for every 200ms to ensure that
the WPTR is updated properly.

Change-Id: I3680b8b2aa38a09233c74cd468c155ea64abab62
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
msm: kgsl: Fix memory leak of DRM GEM object structure.

This changes frees the DRM GEM object structure in
kgsl_gem_free_object function. kgsl_gem_free_object is
called from DRM module after the last refrence to the
object has been lost.

Change-Id: I21d91e9706cf46909168ab99b130ef4d833886e6
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
Merge "msm: kgsl: Ensure correct GPU patch ID is set."
Merge "base: sync: Debug Traces for sync alloc & free calls"
Merge "msm : kgsl: Poke adreno for every 200ms"
Merge "msm: kgsl: Fix memory leak of DRM GEM object structure."
msm:vidc: Fix buffer pool index

While searching for the available buffer entry
in the buffer pool the search should begin from
index 1 as zeroth entry is reserved.

CRs-fixed: 366361,531513
Change-Id: I051b0232bb782f073ba9ad0b757a799703814df3
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
defconfig: Enable Bluetooth HID for Bluedroid

This patch enables Bluetooth HID for Bluedroid on 8960.

Change-Id: Iaf6efb62fe61786cf521b9e1fc100b8fb8ce6786
Signed-off-by: Srinu Jella <sjella@codeaurora.org>