diff options
Diffstat (limited to 'bmm_lib.c')
-rw-r--r-- | bmm_lib.c | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -565,6 +565,23 @@ int bmm_get_dmabuf_fd(void *vaddr) return ret < 0 ? -1 : io.output; } +int bmm_get_phys_dmabuf_fd(unsigned long paddr) +{ + int ret; + ioctl_arg_t io; + + if (bmm_init() < 0 || API_FEAT(bmm_api) < API_FEAT_GET_DMABUF_FD) + return -1; + + io.input = paddr; + io.output = 0; + io.arg = 0; + + ret = ioctl(bmm_fd, BMM_GET_PHYS_DMABUF_FD, &io); + + return ret < 0 ? -1 : io.output; +} + unsigned long bmm_get_mem_size(void *vaddr) { struct bmm_virt_buffer *vbuf; |