Lines Matching refs:dmabuf_fd
105 unsigned int heap_flags, int *dmabuf_fd)
115 if (!dmabuf_fd)
121 *dmabuf_fd = (int)data.fd;
126 int *dmabuf_fd)
129 dmabuf_fd);
145 int heap_fd = -1, dmabuf_fd = -1, importer_fd = -1;
155 ret = dmabuf_heap_alloc(heap_fd, ONE_MEG, 0, &dmabuf_fd);
166 dmabuf_fd,
174 dmabuf_sync(dmabuf_fd, DMA_BUF_SYNC_START);
177 dmabuf_sync(dmabuf_fd, DMA_BUF_SYNC_END);
184 ret = import_vgem_fd(importer_fd, dmabuf_fd, &handle);
191 ret = dmabuf_sync(dmabuf_fd, DMA_BUF_SYNC_START);
198 ret = dmabuf_sync(dmabuf_fd, DMA_BUF_SYNC_END);
212 if (dmabuf_fd >= 0)
213 close(dmabuf_fd);
222 int heap_fd = -1, dmabuf_fd[32];
234 ret = dmabuf_heap_alloc(heap_fd, size, 0, &dmabuf_fd[i]);
240 p = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, dmabuf_fd[i], 0);
246 dmabuf_sync(dmabuf_fd[i], DMA_BUF_SYNC_START);
248 dmabuf_sync(dmabuf_fd[i], DMA_BUF_SYNC_END);
253 close(dmabuf_fd[i]);
257 ret = dmabuf_heap_alloc(heap_fd, size, 0, &dmabuf_fd[i]);
264 p = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, dmabuf_fd[i], 0);
270 dmabuf_sync(dmabuf_fd[i], DMA_BUF_SYNC_START);
278 dmabuf_sync(dmabuf_fd[i], DMA_BUF_SYNC_END);
283 close(dmabuf_fd[i]);
291 close(dmabuf_fd[i]);
300 int *dmabuf_fd)
316 if (!dmabuf_fd)
322 *dmabuf_fd = (int)data.fd;
328 int *dmabuf_fd)
352 if (!dmabuf_fd)
359 *dmabuf_fd = (int)data.fd;
365 int heap_fd = -1, dmabuf_fd = -1;
373 ret = dmabuf_heap_alloc_older(heap_fd, ONE_MEG, 0, &dmabuf_fd);
379 close(dmabuf_fd);
383 ret = dmabuf_heap_alloc_newer(heap_fd, ONE_MEG, 0, &dmabuf_fd);
391 if (dmabuf_fd >= 0)
392 close(dmabuf_fd);
401 int heap_fd = -1, dmabuf_fd = -1;
409 ret = dmabuf_heap_alloc(0, ONE_MEG, 0x111111, &dmabuf_fd);
416 ret = dmabuf_heap_alloc(heap_fd, ONE_MEG, 0x111111, &dmabuf_fd);
424 ~(O_RDWR | O_CLOEXEC), 0, &dmabuf_fd);
434 if (dmabuf_fd >= 0)
435 close(dmabuf_fd);