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>
Sultan*_defconfig: v1.4.0