Lines Matching refs:vaddr
26 void *vaddr; member
48 buf->vaddr = vmalloc_user(buf->size); in vb2_vmalloc_alloc()
49 if (!buf->vaddr) { in vb2_vmalloc_alloc()
69 vfree(buf->vaddr); in vb2_vmalloc_put()
74 static void *vb2_vmalloc_get_userptr(struct device *dev, unsigned long vaddr, in vb2_vmalloc_get_userptr() argument
88 offset = vaddr & ~PAGE_MASK; in vb2_vmalloc_get_userptr()
90 vec = vb2_create_framevec(vaddr, size); in vb2_vmalloc_get_userptr()
107 buf->vaddr = (__force void *) in vb2_vmalloc_get_userptr()
110 buf->vaddr = vm_map_ram(frame_vector_pages(vec), n_pages, -1); in vb2_vmalloc_get_userptr()
113 if (!buf->vaddr) in vb2_vmalloc_get_userptr()
115 buf->vaddr += offset; in vb2_vmalloc_get_userptr()
129 unsigned long vaddr = (unsigned long)buf->vaddr & PAGE_MASK; in vb2_vmalloc_put_userptr() local
137 if (vaddr) in vb2_vmalloc_put_userptr()
138 vm_unmap_ram((void *)vaddr, n_pages); in vb2_vmalloc_put_userptr()
144 iounmap((__force void __iomem *)buf->vaddr); in vb2_vmalloc_put_userptr()
154 if (!buf->vaddr) { in vb2_vmalloc_vaddr()
159 return buf->vaddr; in vb2_vmalloc_vaddr()
178 ret = remap_vmalloc_range(vma, buf->vaddr, 0); in vb2_vmalloc_mmap()
218 void *vaddr = buf->vaddr; in vb2_vmalloc_dmabuf_ops_attach() local
233 struct page *page = vmalloc_to_page(vaddr); in vb2_vmalloc_dmabuf_ops_attach()
241 vaddr += PAGE_SIZE; in vb2_vmalloc_dmabuf_ops_attach()
321 return buf->vaddr; in vb2_vmalloc_dmabuf_ops_vmap()
351 if (WARN_ON(!buf->vaddr)) in vb2_vmalloc_get_dmabuf()
374 buf->vaddr = dma_buf_vmap(buf->dbuf); in vb2_vmalloc_map_dmabuf()
376 return buf->vaddr ? 0 : -EFAULT; in vb2_vmalloc_map_dmabuf()
383 dma_buf_vunmap(buf->dbuf, buf->vaddr); in vb2_vmalloc_unmap_dmabuf()
384 buf->vaddr = NULL; in vb2_vmalloc_unmap_dmabuf()
391 if (buf->vaddr) in vb2_vmalloc_detach_dmabuf()
392 dma_buf_vunmap(buf->dbuf, buf->vaddr); in vb2_vmalloc_detach_dmabuf()
429 .vaddr = vb2_vmalloc_vaddr,