Lines Matching refs:fd
36 int fd = open("/dev/ion", O_RDWR); in ion_open() local
37 if (fd < 0) in ion_open()
39 return fd; in ion_open()
42 int ion_close(int fd) in ion_close() argument
44 return close(fd); in ion_close()
47 static int ion_ioctl(int fd, int req, void *arg) in ion_ioctl() argument
49 int ret = ioctl(fd, req, arg); in ion_ioctl()
58 int ion_alloc(int fd, size_t len, size_t align, unsigned int flags, in ion_alloc() argument
68 ret = ion_ioctl(fd, ION_IOC_ALLOC, &data); in ion_alloc()
75 int ion_alloc_tiler(int fd, size_t w, size_t h, int fmt, unsigned int flags, in ion_alloc_tiler() argument
91 ret = ion_ioctl(fd, ION_IOC_CUSTOM, &custom_data); in ion_alloc_tiler()
99 int ion_free(int fd, struct ion_handle *handle) in ion_free() argument
104 return ion_ioctl(fd, ION_IOC_FREE, &data); in ion_free()
107 int ion_map(int fd, struct ion_handle *handle, size_t length, int prot, in ion_map() argument
113 int ret = ion_ioctl(fd, ION_IOC_MAP, &data); in ion_map()
116 *map_fd = data.fd; in ion_map()
129 int ion_share(int fd, struct ion_handle *handle, int *share_fd) in ion_share() argument
135 int ret = ion_ioctl(fd, ION_IOC_SHARE, &data); in ion_share()
138 *share_fd = data.fd; in ion_share()
146 int ion_import(int fd, int share_fd, struct ion_handle **handle) in ion_import() argument
149 .fd = share_fd, in ion_import()
151 int ret = ion_ioctl(fd, ION_IOC_IMPORT, &data); in ion_import()