gpu: ion: Backport from CAF LA.AF.1.1_rb1.7

*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>
Revert "gpu: msm: kgsl: Fix compatibility with old Ion drivers"

This reverts commit 800c33f88e262a9885567ca78fc0c92f04a12016.
gpu: ion: Update ion_map_iommu_by_force for new Ion drivers

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