display-legacy: add support for new ion api

Change-Id: I864491595fdee9924f807b553c646a431a28ea34

Conflicts:

	libgralloc/ionalloc.cpp
libgralloc: force 1M alignment for secure buffers

Align secure buffers to 1M alignment as TZ expects this for
protecting the buffers, MDP5 onwards.
Update the buffer-size to the same alignment used.

Change-Id: I369932a4a72b28c05a3ea216a8bba681de1f9dad

Conflicts:

	libgralloc/gpu.cpp
gralloc: Remove update rect

SurfaceFlinger does not use this feature any more.
Removing this to avoid usage of reserved flags.
If this is needed again, it can be added with metadata
in the display commit ioctl

Change-Id: Iaf3f14a910ad64c83abb0910fad4a999b663c545
display: Use GRALLOC_USAGE_PROTECTED to indicate secure content

For secure content, use GRALLOC_USAGE_PROTECTED flag instead of
the obsolete flag GRALLOC_USAGE_PRIVATE_CP_BUFFER.

Change-Id: I69bf8cfd3a978fd472608beb44056e1bf55c1414

Conflicts:

	liboverlay/overlayMem.h
gralloc: Do not set ION_SECURE for non-contiguous heaps

The GRALLOC_USAGE_PROTECTED flag is being used for non TZ DRM
if non contiguous heaps such as IOMMU are used. Hence do not
set the ION_SECURE flag for such heaps as they cannot be secured
through trustzone.

Change-Id: I48e9460ef66abb827c9df1b3c55037e8e4214f81
libgralloc: Add Perform function to get the stride.

- Introduce a new class to Get the Adreno computed stride information.
This class has been added to allow adreno library computed strides to
be propagated to the allocation function as well as those clients
requesting it.
- Add a new Perform function to get the stride. The width and the format
can be passed from the calling functions (like EGL) to get the stride of
the buffer.

Change-Id: I4c2b4a02deff327f0ea5558c478997527fe9d3cf

Conflicts:

	libgralloc/gralloc_priv.h
	libgralloc/mapper.cpp
libgralloc: Get the stride information from libadreno_utils.so

libadreno_utils.so is an adreno utility library. It computes the
optimal stride required for a surface of a particular width and
bpp. Using this computed stride allows us to efficiently use the
dual memory channels and increase performance.
Currently the utility library only computes the optimal stride
for RGB surfaces.

Change-Id: I0f70bd11602a5144515ab07c3bd2b80a01586a06

Conflicts:

	libgralloc/Android.mk
gralloc: Allow IOMMU memory to be uncached

The IOMMU heap can give us uncached memory, so remove this
erroneous check.

Change-Id: Ie141c55821221a1c2f75b7cf2248794d93ea6c6a
gralloc: Stride information fix

The perform enum for the stride is defined in gralloc_priv so it
is OK to keep the case outside.

Change-Id: Id31556f76c2a2ae93a15a2e2dc4169b07360e4e6
gralloc: merge fix

Change-Id: I0850b9da11e6b23eca9c6706b195fe12aed13d42
gralloc: Let gralloc_priv.h be overloaded by device trees

Adjustments to private_handle_t may be necessary for device-specific
blob compatibility, so don't enforce usage of the local header

Change-Id: I588ca59ed76b1a063a4b663ac2c98589865b7738

Conflicts:

	libgralloc/gpu.h
Updates from mr1

Change-Id: Ib813f04c2701f5f1f2c1f87eca92e2ef8fe33beb
Revert "gralloc: Let gralloc_priv.h be overloaded by device trees"

This reverts commit e187c7b5756de5e9e34c52bdd32786d974a4e710.
fix up

Change-Id: I30194272067b16f656fc8c555bb2ea78f206bb15