msm: devices-8960: bring in kgsl updates
gpu: ion: repurpose flags field for heap_mask and caching

In the latest Ion API, userspace clients specify the heap_mask for an
allocation in the `heap_mask' field of the ion_allocation_data
structure, and they specify caching in the `flags' field. Before, the
heap_mask was in the `flags' field and caching was specified with the
O_DSYNC file open flag.

We would like to support the new API without actually updating Ion. To
do this, | the heap_mask back into the flags field on an allocation
ioctl (since the internal kernel APIs still expect to see it
there). Also make sure that caching is taken from the buffer flags
field rather than the O_DSYNC file flag.

Change-Id: I872afb40d9bf7c49bb31f19c5e9726ac714ef850
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
msm: ion: Only return Ion flags in ion_handle_get_flags

Since the ion_buffer.flags field is shared between the actual Ion
flags as well as the Ion heap mask, make sure that we're only
returning flags. The heap_mask bits should be masked off.

Change-Id: Ibdaf0ea374b7b80a036bddd11d19c4bafa173ef6
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
gpu: ion: Add O_DSYNC flag to generated file

Ion uses the O_DSYNC flag of a file to indicate an uncached mapping.
When generating a file for mmaping, the new file needs to have the
same O_DSYNC flag as the parent (the file of the ioctl open call)
to indicate if the mapping should be cached or uncached.

Signed-off-by: Laura Abbott <lauraa@codeaurora.org>

Conflicts:
	drivers/gpu/ion/ion.c

Change-Id: I9e9d3718e572f0fdc5c43a50ff7cacf9be2a5f54
gpu: ion: move msm-specific ioctls to custom_ioctl

To avoid collisions with future ioctls that may be added to ion,
msm-specific ioctls should use the `custom_ioctl' interface provided
by struct ion_device, as originally intended.

Change-Id: Ic36f1ff37ce79926482942f70d466acf95c9c170
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>

Conflicts:
	drivers/gpu/ion/ion.c
	drivers/gpu/ion/msm/msm_ion.c
ion: More back-compatibility, now ioctls

Camera, at least, is still invoking the old allocator

Change-Id: I65e04ecd2ed12bf2cfb7bf2bb0d1cbcd24b0e938
updating ION headers to support JB_chocolate kernel and mr 1 HAL

(cherry picked from commit 9dd583b5dfafaf5077e72b89df3708b99c0cb679)

Change-Id: I92de796d0697f70db19a42fd0381782b0eac5f7e
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>