Lines Matching refs:dmabuf_fd
106 unsigned int heap_flags, int *dmabuf_fd) in dmabuf_heap_alloc_fdflags() argument
116 if (!dmabuf_fd) in dmabuf_heap_alloc_fdflags()
122 *dmabuf_fd = (int)data.fd; in dmabuf_heap_alloc_fdflags()
127 int *dmabuf_fd) in dmabuf_heap_alloc() argument
130 dmabuf_fd); in dmabuf_heap_alloc()
146 int heap_fd = -1, dmabuf_fd = -1, importer_fd = -1; in test_alloc_and_import() local
156 ret = dmabuf_heap_alloc(heap_fd, ONE_MEG, 0, &dmabuf_fd); in test_alloc_and_import()
167 dmabuf_fd, in test_alloc_and_import()
175 dmabuf_sync(dmabuf_fd, DMA_BUF_SYNC_START); in test_alloc_and_import()
178 dmabuf_sync(dmabuf_fd, DMA_BUF_SYNC_END); in test_alloc_and_import()
185 ret = import_vgem_fd(importer_fd, dmabuf_fd, &handle); in test_alloc_and_import()
192 ret = dmabuf_sync(dmabuf_fd, DMA_BUF_SYNC_START); in test_alloc_and_import()
199 ret = dmabuf_sync(dmabuf_fd, DMA_BUF_SYNC_END); in test_alloc_and_import()
213 if (dmabuf_fd >= 0) in test_alloc_and_import()
214 close(dmabuf_fd); in test_alloc_and_import()
223 int heap_fd = -1, dmabuf_fd[32]; in test_alloc_zeroed() local
235 ret = dmabuf_heap_alloc(heap_fd, size, 0, &dmabuf_fd[i]); in test_alloc_zeroed()
241 p = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, dmabuf_fd[i], 0); in test_alloc_zeroed()
247 dmabuf_sync(dmabuf_fd[i], DMA_BUF_SYNC_START); in test_alloc_zeroed()
249 dmabuf_sync(dmabuf_fd[i], DMA_BUF_SYNC_END); in test_alloc_zeroed()
254 close(dmabuf_fd[i]); in test_alloc_zeroed()
258 ret = dmabuf_heap_alloc(heap_fd, size, 0, &dmabuf_fd[i]); in test_alloc_zeroed()
265 p = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, dmabuf_fd[i], 0); in test_alloc_zeroed()
271 dmabuf_sync(dmabuf_fd[i], DMA_BUF_SYNC_START); in test_alloc_zeroed()
279 dmabuf_sync(dmabuf_fd[i], DMA_BUF_SYNC_END); in test_alloc_zeroed()
284 close(dmabuf_fd[i]); in test_alloc_zeroed()
292 close(dmabuf_fd[i]); in test_alloc_zeroed()
301 int *dmabuf_fd) in dmabuf_heap_alloc_older() argument
317 if (!dmabuf_fd) in dmabuf_heap_alloc_older()
323 *dmabuf_fd = (int)data.fd; in dmabuf_heap_alloc_older()
329 int *dmabuf_fd) in dmabuf_heap_alloc_newer() argument
353 if (!dmabuf_fd) in dmabuf_heap_alloc_newer()
360 *dmabuf_fd = (int)data.fd; in dmabuf_heap_alloc_newer()
366 int heap_fd = -1, dmabuf_fd = -1; in test_alloc_compat() local
374 ret = dmabuf_heap_alloc_older(heap_fd, ONE_MEG, 0, &dmabuf_fd); in test_alloc_compat()
380 close(dmabuf_fd); in test_alloc_compat()
384 ret = dmabuf_heap_alloc_newer(heap_fd, ONE_MEG, 0, &dmabuf_fd); in test_alloc_compat()
392 if (dmabuf_fd >= 0) in test_alloc_compat()
393 close(dmabuf_fd); in test_alloc_compat()
402 int heap_fd = -1, dmabuf_fd = -1; in test_alloc_errors() local
410 ret = dmabuf_heap_alloc(0, ONE_MEG, 0x111111, &dmabuf_fd); in test_alloc_errors()
417 ret = dmabuf_heap_alloc(heap_fd, ONE_MEG, 0x111111, &dmabuf_fd); in test_alloc_errors()
425 ~(O_RDWR | O_CLOEXEC), 0, &dmabuf_fd); in test_alloc_errors()
435 if (dmabuf_fd >= 0) in test_alloc_errors()
436 close(dmabuf_fd); in test_alloc_errors()