Lines Matching refs:dmabuf_fd
107 unsigned int heap_flags, int *dmabuf_fd) in dmabuf_heap_alloc_fdflags() argument
117 if (!dmabuf_fd) in dmabuf_heap_alloc_fdflags()
123 *dmabuf_fd = (int)data.fd; in dmabuf_heap_alloc_fdflags()
128 int *dmabuf_fd) in dmabuf_heap_alloc() argument
131 dmabuf_fd); in dmabuf_heap_alloc()
147 int heap_fd = -1, dmabuf_fd = -1, importer_fd = -1; in test_alloc_and_import() local
155 ret = dmabuf_heap_alloc(heap_fd, ONE_MEG, 0, &dmabuf_fd); in test_alloc_and_import()
162 p = mmap(NULL, ONE_MEG, PROT_READ | PROT_WRITE, MAP_SHARED, dmabuf_fd, 0); in test_alloc_and_import()
168 dmabuf_sync(dmabuf_fd, DMA_BUF_SYNC_START); in test_alloc_and_import()
171 dmabuf_sync(dmabuf_fd, DMA_BUF_SYNC_END); in test_alloc_and_import()
177 ret = import_vgem_fd(importer_fd, dmabuf_fd, &handle); in test_alloc_and_import()
181 ret = dmabuf_sync(dmabuf_fd, DMA_BUF_SYNC_START); in test_alloc_and_import()
188 ret = dmabuf_sync(dmabuf_fd, DMA_BUF_SYNC_END); in test_alloc_and_import()
204 close(dmabuf_fd); in test_alloc_and_import()
210 int heap_fd = -1, dmabuf_fd[32]; in test_alloc_zeroed() local
220 ret = dmabuf_heap_alloc(heap_fd, size, 0, &dmabuf_fd[i]); in test_alloc_zeroed()
227 p = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, dmabuf_fd[i], 0); in test_alloc_zeroed()
233 dmabuf_sync(dmabuf_fd[i], DMA_BUF_SYNC_START); in test_alloc_zeroed()
235 dmabuf_sync(dmabuf_fd[i], DMA_BUF_SYNC_END); in test_alloc_zeroed()
240 close(dmabuf_fd[i]); in test_alloc_zeroed()
245 ret = dmabuf_heap_alloc(heap_fd, size, 0, &dmabuf_fd[i]); in test_alloc_zeroed()
252 p = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, dmabuf_fd[i], 0); in test_alloc_zeroed()
258 dmabuf_sync(dmabuf_fd[i], DMA_BUF_SYNC_START); in test_alloc_zeroed()
263 dmabuf_sync(dmabuf_fd[i], DMA_BUF_SYNC_END); in test_alloc_zeroed()
268 dmabuf_sync(dmabuf_fd[i], DMA_BUF_SYNC_END); in test_alloc_zeroed()
278 close(dmabuf_fd[k]); in test_alloc_zeroed()
286 int *dmabuf_fd) in dmabuf_heap_alloc_older() argument
302 if (!dmabuf_fd) in dmabuf_heap_alloc_older()
308 *dmabuf_fd = (int)data.fd; in dmabuf_heap_alloc_older()
314 int *dmabuf_fd) in dmabuf_heap_alloc_newer() argument
338 if (!dmabuf_fd) in dmabuf_heap_alloc_newer()
345 *dmabuf_fd = (int)data.fd; in dmabuf_heap_alloc_newer()
351 int ret, heap_fd = -1, dmabuf_fd = -1; in test_alloc_compat() local
356 ret = dmabuf_heap_alloc_older(heap_fd, ONE_MEG, 0, &dmabuf_fd); in test_alloc_compat()
357 if (dmabuf_fd >= 0) in test_alloc_compat()
358 close(dmabuf_fd); in test_alloc_compat()
362 ret = dmabuf_heap_alloc_newer(heap_fd, ONE_MEG, 0, &dmabuf_fd); in test_alloc_compat()
363 if (dmabuf_fd >= 0) in test_alloc_compat()
364 close(dmabuf_fd); in test_alloc_compat()
372 int heap_fd = -1, dmabuf_fd = -1; in test_alloc_errors() local
378 ret = dmabuf_heap_alloc(0, ONE_MEG, 0x111111, &dmabuf_fd); in test_alloc_errors()
381 ret = dmabuf_heap_alloc(heap_fd, ONE_MEG, 0x111111, &dmabuf_fd); in test_alloc_errors()
385 ~(O_RDWR | O_CLOEXEC), 0, &dmabuf_fd); in test_alloc_errors()
388 if (dmabuf_fd >= 0) in test_alloc_errors()
389 close(dmabuf_fd); in test_alloc_errors()