Fixed multi-touch
pyramid: disable HTC perflocks in config
arm: Allow CPU-supported unaligned accesses

This change reconfigures the CPU to allow CPU-supported unaligned
accesses, which are generally faster than software-only fixups,
resulting in fewer alignment exceptions.

Signed-off-by: Brent DeGraaf <bdegraaf@codeaurora.org>

Conflicts:

	arch/arm/kernel/head.S
msm: qdsp6v2: Invalid memory access of timpani regset array

Adie codec write is accessing out of memory bound for
timpani regset array.

CRs-Fixed: 330562
Change-Id: I98f46d3b59c76ccfaf5edd6c04d1df01d431ef01
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
mfd: timpani-codec: Handle register write for numbers more than cached one

Add defense check for register write with numbers more than shadow cache.

CRs-Fixed: 312032
Change-Id: I2200b2fc8af32289e3a1a46f36756b909699c3a0
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
Makefile: Added Snapdragon optimizations

Conflicts:

	Makefile
pyramid: update aosp_pyramid_defconfig
htc-battery-core: Fixing once again... (srsly htc? That was already there in 2.6.x)
linux: update kernel to 3.0.26
base: genlock: Check for instances where handle is NULL

Check for the possibility of NULL handles passed into the
in-kernel API functions and return error where appropriate.
There is a non-zero chance that the private_data will be
cleared while the FD is still active, so check in the ioctl()
function as well.

(cherry picked from commit a73ed097420c53451e843ae61d9aadc8fefabc94)

Change-Id: If481b98a6a2ab01ab788c23bffe9df7ab8bc6aee
CRs-fixed: 332835
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
base: genlock: Remove genlock_release_lock and associated ioctl

Allowing a lock to be asynchronously released while a handle
was still active turned out to be too dangerous to use in a
multi-threaded environment and it served no pratical
purpose anyway.  Handles now hold an attached lock until they
are destroyed.

(cherry picked from commit 4df70a254d9ddea0ee4bede39d4d12e6360e5b99)

Change-Id: I969ac3cf84c5982cc7c03c5651c7fe328567c02b
CRs-fixed: 333141
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>

Conflicts:

	Documentation/genlock.txt
base: genlock: Use a signed long for the result from wait_timeout

interruptible_wait_timeout returns a signed long, so make sure that
we use a signed long to hold the result. Using an unsigned value would
horribly misinterpet an error such as -ERESTARTSYS.

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

Change-Id: Ifcf555f8719f9c74fdb6d8b5cf2a32582988335b
Signed-off-by: Ram Kumar Chakravarthy Chebathini <rcheba@codeaurora.org>

Conflicts:

	drivers/base/genlock.c
gpu: ion: Add ION Memory Manager

Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>

Conflicts:

	drivers/gpu/Makefile
	drivers/gpu/ion/Kconfig
	drivers/gpu/ion/Makefile
	drivers/video/Kconfig
	include/linux/ion.h
gpu: ion: Several fixes

Fix some cases where locks were not released on error paths
Change heap->prio to heap->id to make meaning clearer
Fix kernel doc to match sources
gpu: ion: Fix bug in ion_buffer_add

Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
gpu: ion: Remove incorrect error message

The function name is wrong here, and this function may
sometimes be called to see if a value passed from userspace
is an ion handle.  Since it's not really an error when it
fails, remove the log message.

Change-Id: I7bee0e7ffb72b4c4768774a3586f97e306700c21
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
gpu: ion: Fix bug in ion_client_create

If a process already had a client, ion_client_create
would loop forever.

Change-Id: I723207b5872dfc11be04ca27d38a3cf39c4a1426
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
gpu: ion: Fix bug in ion client destroy

ion_client_destroy kernel api should only delete the client
if it's refcount has gone to zero.

Change-Id: Iaa662bd82d67279a9807e01f9a24aebe3d21c17d
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
gpu: ion: Remove redunant code from ion_open

ion_client_create now does a lookup, so this need not
also be done from ion_open

Change-Id: Icb101bbf514bf2e40b4b5d9b320130bf185349aa
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
gpu: ion: Fix possible memory leak

Change-Id: I66f5ad2c95513dfab9f4fc5ae2fcb1316f486d34
Signed-off-by: Choi, Jong-Hwan <jhbird.choi@samsung.com>