diff options
author | Rebecca Schultz Zavin | 2012-09-20 11:46:19 -0500 |
---|---|---|
committer | Rebecca Schultz Zavin | 2012-09-20 11:46:19 -0500 |
commit | 3cfcc300058070f0873763abfa604e07ec536da3 (patch) | |
tree | 52a4321c1d8e9f951da04a439f4182b7297198b6 | |
parent | 1683413f413eb1b77f527247db2df31eae93ee3a (diff) | |
download | platform-system-core-3cfcc300058070f0873763abfa604e07ec536da3.tar.gz platform-system-core-3cfcc300058070f0873763abfa604e07ec536da3.tar.xz platform-system-core-3cfcc300058070f0873763abfa604e07ec536da3.zip |
Add explicit sync call to ion library
Bug: 6854979
Change-Id: I535d55af897eeb4ed707b5da54f3fbf36afa452c
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
-rw-r--r-- | include/ion/ion.h | 1 | ||||
-rw-r--r-- | libion/ion.c | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/include/ion/ion.h b/include/ion/ion.h index 78a6e2e1c..018c0a1cb 100644 --- a/include/ion/ion.h +++ b/include/ion/ion.h | |||
@@ -31,6 +31,7 @@ int ion_alloc(int fd, size_t len, size_t align, unsigned int heap_mask, | |||
31 | unsigned int flags, struct ion_handle **handle); | 31 | unsigned int flags, struct ion_handle **handle); |
32 | int ion_alloc_fd(int fd, size_t len, size_t align, unsigned int heap_mask, | 32 | int ion_alloc_fd(int fd, size_t len, size_t align, unsigned int heap_mask, |
33 | unsigned int flags, int *handle_fd); | 33 | unsigned int flags, int *handle_fd); |
34 | int ion_sync_fd(int fd, int handle_fd); | ||
34 | int ion_free(int fd, struct ion_handle *handle); | 35 | int ion_free(int fd, struct ion_handle *handle); |
35 | int ion_map(int fd, struct ion_handle *handle, size_t length, int prot, | 36 | int ion_map(int fd, struct ion_handle *handle, size_t length, int prot, |
36 | int flags, off_t offset, unsigned char **ptr, int *map_fd); | 37 | int flags, off_t offset, unsigned char **ptr, int *map_fd); |
diff --git a/libion/ion.c b/libion/ion.c index 164cec96e..020c35bc4 100644 --- a/libion/ion.c +++ b/libion/ion.c | |||
@@ -146,3 +146,11 @@ int ion_import(int fd, int share_fd, struct ion_handle **handle) | |||
146 | *handle = data.handle; | 146 | *handle = data.handle; |
147 | return ret; | 147 | return ret; |
148 | } | 148 | } |
149 | |||
150 | int ion_sync_fd(int fd, int handle_fd) | ||
151 | { | ||
152 | struct ion_fd_data data = { | ||
153 | .fd = handle_fd, | ||
154 | }; | ||
155 | return ion_ioctl(fd, ION_IOC_SYNC, &data); | ||
156 | } | ||