From 80fba10a860e6c7900367a6a9dfd9bbbe5ef2cd2 Mon Sep 17 00:00:00 2001 From: Rebecca Schultz Zavin Date: Tue, 3 Jul 2012 09:50:33 -0700 Subject: Fixup ion change to old library Missed a few places that needed updating Change-Id: I1a483d9d85858e752df0f1d970559fcac6695856 Signed-off-by: Rebecca Schultz Zavin --- camera/Android.mk | 2 +- domx/domx/Android.mk | 2 +- ion/ion.c | 4 ++-- ion/ion.h | 4 ++-- ion/linux_ion.h | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++ ion/omap_ion.h | 59 ++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 131 insertions(+), 6 deletions(-) create mode 100644 ion/linux_ion.h create mode 100644 ion/omap_ion.h diff --git a/camera/Android.mk b/camera/Android.mk index 2d8da11..f1d7cb4 100644 --- a/camera/Android.mk +++ b/camera/Android.mk @@ -124,7 +124,7 @@ LOCAL_SHARED_LIBRARIES:= \ libcutils \ libtiutils \ libcamera_client \ - libion \ + libion_ti \ LOCAL_CFLAGS := -fno-short-enums -DCOPY_IMAGE_BUFFER diff --git a/domx/domx/Android.mk b/domx/domx/Android.mk index 0997db5..3a47878 100644 --- a/domx/domx/Android.mk +++ b/domx/domx/Android.mk @@ -26,7 +26,7 @@ LOCAL_SHARED_LIBRARIES := \ libmm_osal \ libc \ liblog \ - libion + libion_ti LOCAL_MODULE:= libdomx LOCAL_MODULE_TAGS:= optional diff --git a/ion/ion.c b/ion/ion.c index 7170915..54579db 100644 --- a/ion/ion.c +++ b/ion/ion.c @@ -27,8 +27,8 @@ #define LOG_TAG "ion" #include -#include -#include +#include "linux_ion.h" +#include "omap_ion.h" #include "ion.h" int ion_open() diff --git a/ion/ion.h b/ion/ion.h index 871b9bc..c0d9476 100644 --- a/ion/ion.h +++ b/ion/ion.h @@ -18,8 +18,8 @@ * limitations under the License. */ -#include -#include +#include "linux_ion.h" +#include "omap_ion.h" int ion_open(); int ion_close(int fd); diff --git a/ion/linux_ion.h b/ion/linux_ion.h new file mode 100644 index 0000000..b8715a3 --- /dev/null +++ b/ion/linux_ion.h @@ -0,0 +1,66 @@ +/**************************************************************************** + **************************************************************************** + *** + *** This header was automatically generated from a Linux kernel header + *** of the same name, to make information necessary for userspace to + *** call into the kernel available to libc. It contains only constants, + *** structures, and macros generated from the original header, and thus, + *** contains no copyrightable information. + *** + *** To edit the content of this header, modify the corresponding + *** source file (e.g. under external/kernel-headers/original/) then + *** run bionic/libc/kernel/tools/update_all.py + *** + *** Any manual change here will be lost the next time this script will + *** be run. You've been warned! + *** + **************************************************************************** + ****************************************************************************/ +#ifndef _LINUX_ION_H +#define _LINUX_ION_H +#include +struct ion_handle; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +enum ion_heap_type { + ION_HEAP_TYPE_SYSTEM, + ION_HEAP_TYPE_SYSTEM_CONTIG, + ION_HEAP_TYPE_CARVEOUT, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + ION_HEAP_TYPE_CUSTOM, + ION_NUM_HEAPS, +}; +#define ION_HEAP_SYSTEM_MASK (1 << ION_HEAP_TYPE_SYSTEM) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define ION_HEAP_SYSTEM_CONTIG_MASK (1 << ION_HEAP_TYPE_SYSTEM_CONTIG) +#define ION_HEAP_CARVEOUT_MASK (1 << ION_HEAP_TYPE_CARVEOUT) +struct ion_allocation_data { + size_t len; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + size_t align; + unsigned int flags; + struct ion_handle *handle; +}; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +struct ion_fd_data { + struct ion_handle *handle; + int fd; +}; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +struct ion_handle_data { + struct ion_handle *handle; +}; +struct ion_custom_data { +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + unsigned int cmd; + unsigned long arg; +}; +#define ION_IOC_MAGIC 'I' +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define ION_IOC_ALLOC _IOWR(ION_IOC_MAGIC, 0, struct ion_allocation_data) +#define ION_IOC_FREE _IOWR(ION_IOC_MAGIC, 1, struct ion_handle_data) +#define ION_IOC_MAP _IOWR(ION_IOC_MAGIC, 2, struct ion_fd_data) +#define ION_IOC_SHARE _IOWR(ION_IOC_MAGIC, 4, struct ion_fd_data) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#define ION_IOC_IMPORT _IOWR(ION_IOC_MAGIC, 5, int) +#define ION_IOC_CUSTOM _IOWR(ION_IOC_MAGIC, 6, struct ion_custom_data) +#endif diff --git a/ion/omap_ion.h b/ion/omap_ion.h new file mode 100644 index 0000000..65af914 --- /dev/null +++ b/ion/omap_ion.h @@ -0,0 +1,59 @@ +/**************************************************************************** + **************************************************************************** + *** + *** This header was automatically generated from a Linux kernel header + *** of the same name, to make information necessary for userspace to + *** call into the kernel available to libc. It contains only constants, + *** structures, and macros generated from the original header, and thus, + *** contains no copyrightable information. + *** + *** To edit the content of this header, modify the corresponding + *** source file (e.g. under external/kernel-headers/original/) then + *** run bionic/libc/kernel/tools/update_all.py + *** + *** Any manual change here will be lost the next time this script will + *** be run. You've been warned! + *** + **************************************************************************** + ****************************************************************************/ +#ifndef _LINUX_OMAP_ION_H +#define _LINUX_OMAP_ION_H +#include +struct omap_ion_tiler_alloc_data { +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + size_t w; + size_t h; + int fmt; + unsigned int flags; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + struct ion_handle *handle; + size_t stride; + size_t offset; +}; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +enum { + OMAP_ION_HEAP_TYPE_TILER = ION_HEAP_TYPE_CUSTOM + 1, +}; +#define OMAP_ION_HEAP_TILER_MASK (1 << OMAP_ION_HEAP_TYPE_TILER) +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +enum { + OMAP_ION_TILER_ALLOC, +}; +enum { +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + TILER_PIXEL_FMT_MIN = 0, + TILER_PIXEL_FMT_8BIT = 0, + TILER_PIXEL_FMT_16BIT = 1, + TILER_PIXEL_FMT_32BIT = 2, +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + TILER_PIXEL_FMT_PAGE = 3, + TILER_PIXEL_FMT_MAX = 3 +}; +enum { +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ + OMAP_ION_HEAP_LARGE_SURFACES, + OMAP_ION_HEAP_TILER, + OMAP_ION_HEAP_SECURE_INPUT, +}; +/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ +#endif -- cgit v1.1