Commit graph

4 commits

Author SHA1 Message Date
Laura Abbott
30313f8bc0 libion: Adapt to new ION interface
4.12+ kernels have substantially different ION interface. Adapt
libion to the new one.

In doing so, for sake of clarity, rename ION_IOC_ALLOC to
ION_IOC_NEW_ALLOC the to denote new mechanism.

An ion_is_legacy() is provided to check whether the kernel supports old
ION interface or new. Userspace has the responsibility to use it
accordingly.

Devices using kernels without the 4.12 ION updates, can continue to use libion
as before, and will have no impact.

Only devices using libion with 4.12+ kernels (or kernels with backported ION
updates) will need to update their users of libion, including gralloc.

Test: validated with hikey gralloc, with both old and new kernels

Signed-off-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
  [sumits: keep old abi compatibility]

Change-Id: I7899af9e812d0cf5e73b443a3f0248118b42a382
2017-08-10 09:30:38 +05:30
Colin Cross
51b6e42231 libion: add include for size_t
Add sys/types.h include for size_t

Change-Id: Ica764b1f5eca2df21d82c86493fc4e0d70b6628a
2013-12-18 18:27:57 -08:00
Colin Cross
92d7ca6af3 libion: clean up whitespace
Convert everything to 4 space indents, no tabs.

Change-Id: I376fad866864f0579b91ffad406e872fcce566ad
2013-12-18 18:27:54 -08:00
Colin Cross
03c932dffa libion: move ion.h into local include directory
Export it to users of libion with LOCAL_C_EXPORT_INCLUDE_DIRS

Change-Id: I4d00a9dd2e99953723994d0304ca77e0ad50a3a9
2013-12-18 18:24:50 -08:00