gpu: ion: Backport from CAF kk_2.7-stable

*Ported dma shared buffer system
*Patched for 3.0 kernels
*Reverted "gpu: ion: Add support for CMA allocations in cp heap" to avoid a massive update to dma-mapping (we don't use CMA anyway)

Signed-off-by: Sultanxda <sultanxda@gmail.com>
ion: ioctl compatibility with userland using old api

As far as I can tell, flags passed by userland are now used to determine
buffer caching.

Note in ION_IOC_ALLOC_COMPAT we are currently forcing uncached buffer
allocations (needed to make a choice here).  This
may need to change.

Signed-off-by: Flemmard <flemmard@gmail.com>
include: msm_ion: Use old ioctls

Our proprietary camera HAL could be calling these, so switch back to the old ioctls to avoid a possible mismatch.

Signed-off-by: Sultanxda <sultanxda@gmail.com>
msm: Enable ARM_HAS_SG_CHAIN

This is needed by the new Ion drivers.
gpu: ion: Restore old Ion functionality (non-dmabuf)

Our proprietary camera libraries were not designed for the new Ion API. Currently, with dma-buf, the kernel crashes when using the camera (crashes when trying to free Ion handle).

Restore old Ion functionality to maintain compatibility with our proprietary camera blobs. ion_import_dma_buf now emulates ion_import_fd.

Signed-off-by: Sultanxda <sultanxda@gmail.com>
audio: Backport from CAF kk_2.7-stable

*Patched for 3.0 kernels

Signed-off-by: Sultanxda <sultanxda@gmail.com>
gpu: msm: Import from CAF AU_LINUX_ANDROID_KK_2.7_RB1.04.04.04.007.067

Signed-off-by: Sultanxda <sultanxda@gmail.com>
gpu: msm: Fix compile errors

Signed-off-by: Sultanxda <sultanxda@gmail.com>
kgsl: Fix GPU freq being set to the max by default (320MHz)

Credit to SebastianFM: https://github.com/SebastianFM/SebastianFM-kernel/commit/831882790c5f09a4c9cf008322777f9aaa65d45b#diff-a20c5be16a95b59d8023e63f9ffa6523R987
gpu: msm: Fix regulator name for 3.0 footswitch drivers

Signed-off-by: Sultanxda <sultanxda@gmail.com>
msm: kgsl: Clean-up gpuaddr allocated from kgsl gen_pool

All GPU Mapping which are done using kgsl_mmu_map_global
API, allocates gpu address from kgsl gen_pool. Only calling
kgsl_mmu_unmap for such mappings doesn't free up the gpuaddr
assigned from KGSL gen_pool. This results in Kernel bug when
KGSL gen_pool is destroyed. This changes makes sure that
all KGSL gen_pool GPU address are freed before destroying
kgsl gen_pool.

Change-Id: Iba46f18e7fe4fba661f5fe142f3470f61a31baa0
Signed-off-by: Anshuman Dani <adani@codeaurora.org>
Sultan*_defconfig: Disable NETFILTER_XT_MATCH_QTAGUID

Fixes reboot when using AdAway to redirect ads to localhost. Bug report and fix from luxkore @ XDA.
Sultan*_defconfig: Set default CPU governor to Performance
Sultan*_defconfig: v1.4.0