Revert "gpu: ion: Change secure heap allocation restrictions"

This reverts commit 805a17fc2b2d47dc306d05ce1cd666cbb935b4cb.
gpu: ion: Restrict access to CP heap

On certain targets, the CP heap should only be used
for secure allocations. Add a check to determine which
targets are allowed to make non-secure allocations from
the CP heap type. Targets with this restriction will
fall back to an alternate heap.

Change-Id: Ieaa9e76cbf2dc3ea1da6f4e75a4de903c39a3077
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>

Conflicts:
	arch/arm/mach-msm/board-8960.c
gpu: ion: Add flag for forcing contiguous allocations

Previously, a parameter was added to secure heaps to only
allow secure allocations. Some clients still require
non-secure contiguous allocations even though the SMMU is
supported. Add support for those clients to force contiguous
allocations to go through.

Change-Id: I0d18d8a9ed3ab267b55c84c4ad160f8cec2c2b32
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
gpu: ion: handle allocation error during heap protection in CP heap

Return error and do not increment ref count in case of failure to
protect the CP heap.
CRs-Fixed: 445400

Change-Id: Ia615773fe2c52386d9522de7a182edd633a66e1c
Signed-off-by: Praveen Chavan <pchava@codeaurora.org>
gpu: ion: Add null-pointer check after allocation

Check for failed allocation and return appropritate
return code if memory allocation fails.

Change-Id: Iefb83b5e30c3cc581ccecaf6e59eae621be98083
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
Signed-off-by: Ajay Dudani <adudani@codeaurora.org>
gproj: gpu: ion: Restrict access to CP heap
Revert "gpu: ion: Add support for securing indiviudal buffers"

This reverts commit c4a5b75092f3c41ed8bb8a1409a2b29c9448f9d7.
Revert "gpu: ion: Add extra metadata for secure buffers"

This reverts commit bb058ea5cd1fcd541f33023544589259f7fd153d.
msm: Add support for ION Flushing without virtual address

Video has very large buffers to be flushed. Due to lack of
vmalloc space, ion_map_kernel cannot be called on each of
the video buffers. With this change the ion handle can be
flushed without the need of the kernel mapping.

Change-Id: If026f21e44a2cce6c2b8c232fc80a69d0dabcd14
Signed-off-by: Neeti Desai <neetid@codeaurora.org>

Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
Revert "gpu: ion: Make secure buffers 1MB chunks"

This reverts commit 0d4fba8c6eb43564b3e3f2c1260600cfb2f9a435.
gpu: ion: Add ION compat ioctls to the CP heap
Merge branch 'cm-10.2' into martincz