msm: kgsl: Increase REG_RBBM_CNTL value to 0xFFFF for A200

Increase number of clocks that RBBM will wait before de-asserting
the Register Clock Active signal. This fixes kernel panics during
stability tests on multiple devices

Change-Id: I50ad69f28b50444e88239c2332bd5756db1ae089
CRs-fixed: 372793
Signed-off-by: Rammohan Basavaraju <rammoh@codeaurora.org>
msm: kgsl: Update pagetable on context destruction for A20x

Ensure that pagetable is updated during context destruction. This
resolves stability issues during Camera launch/exit scenarios. Applies
only to A20x GPUs. This change is already done for Z180 device.

Change-Id: I955c7220aa8234009f5bca0a273093e47147279d
Signed-off-by: Rammohan Basavaraju <rammoh@codeaurora.org>
msm: pmem: Squashed update to version from msm 2.6.35 kernel

Conflicts:

	drivers/misc/pmem.c
pmem: Check for valid virtual address while flushing

Return invalid error if a NULL virtual address is
passed for pmem cache maintenance ioctl's

Change-Id: I18c369d4c2ac790b622408a988d171d6f75c4cd3
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
pmem: Correctly account for aligned blocks

when finding an aligned chunk, the allocator cannot assume that
bit 0 will point to an aligned block. The only way to guarantee
a block will be aligned is to pass in the starting bit of a block
that is aligned. if t is the start bit which points to an aligned
block, and s is the spacing, bit t+n*s is guaranteed to be aligned
to spacing s for positive integer values of n.

CRs-Fixed: 288000
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Use pmem from CAF

Conflicts:
	drivers/misc/pmem.c

Change-Id: Ic6b51d39ec98d027a03832043014ccf8c6db7b90
ashmem: Fix flush routine of ashmem

The ashmem flush function ashmem_flush_cache_range was calling
dmac_clean_range and dmac_flush_range with a user virtual address
which is not allowed. Instead of calling dmac_clean_range or
dmac_flush_range use flush_cache_user_range which can be called
with a user vitual address.

Change-Id: I5dd137fb248b45ef2c7ea5f7bdb4b540b8310af9
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
mm: ashmem: Add cache clean and invalidate ioctls for ashmem

Change-Id: Idc120f9f869c1a68e5f012327aa7f599ac065fce
CRs-fixed: 291124
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
mm: ashmem: Make sure vma is valid while flushing

Ensure that the vma that the ashmem region is tied to
is valid before flushing and hold the mm semaphore so
that the vma does not get destroyed from under while
it's being flushed.

CRs-Fixed: 326685
Change-Id: I86320ffe9e6570e6ffa7dda68ab26be7aed86afd
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
mm: ashmem: fix deadlock when system is low on memory

When system is low on memory, allocating memory while holding the
ashmem_mutex may try to directly reclaim memory. Then ashmem_shrink()
is called in same thread. It will deadlock at acquiring ashmem_mutex.
This change lets ashmem_shrink() return failure if ashmem_mutex is not
available. Memory will be reclaimed from others.

Change-Id: I3b6024d5477d37245f4ebde6d7069fb77af789ee
Signed-off-by: Yuanyuan Zhong <yuanyuan.zhong@gmail.com>
binder: Update to version from msm 3.0 kernel
msm: rotator: add downscale support in rotator

Rotator is capable of performing 1/2, 1/4 and 1/8 down scaling. Add
downscale_ratio parameter to provide support for this feature.

CRs-Fixed: 315874
Change-Id: I57dc3456ccc9bec2a125750b3e9909ffcbaf45f6
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Merge branch 'jellybean' of github.com:ColdFusionX/android_kernel_zte_msm7x27 into jellybean