Lines Matching refs:vaddr

26 	void				*vaddr;  member
48 buf->vaddr = vmalloc_user(buf->size); in vb2_vmalloc_alloc()
54 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, dma_dir == DMA_FROM_DEVICE || in vb2_vmalloc_get_userptr()
108 buf->vaddr = (__force void *) in vb2_vmalloc_get_userptr()
111 buf->vaddr = vm_map_ram(frame_vector_pages(vec), n_pages, -1, in vb2_vmalloc_get_userptr()
115 if (!buf->vaddr) in vb2_vmalloc_get_userptr()
117 buf->vaddr += offset; in vb2_vmalloc_get_userptr()
131 unsigned long vaddr = (unsigned long)buf->vaddr & PAGE_MASK; in vb2_vmalloc_put_userptr() local
139 if (vaddr) in vb2_vmalloc_put_userptr()
140 vm_unmap_ram((void *)vaddr, n_pages); in vb2_vmalloc_put_userptr()
146 iounmap((__force void __iomem *)buf->vaddr); in vb2_vmalloc_put_userptr()
156 if (!buf->vaddr) { in vb2_vmalloc_vaddr()
161 return buf->vaddr; in vb2_vmalloc_vaddr()
180 ret = remap_vmalloc_range(vma, buf->vaddr, 0); in vb2_vmalloc_mmap()
220 void *vaddr = buf->vaddr; in vb2_vmalloc_dmabuf_ops_attach() local
235 struct page *page = vmalloc_to_page(vaddr); in vb2_vmalloc_dmabuf_ops_attach()
243 vaddr += PAGE_SIZE; in vb2_vmalloc_dmabuf_ops_attach()
327 return buf->vaddr + pgnum * PAGE_SIZE; in vb2_vmalloc_dmabuf_ops_kmap()
334 return buf->vaddr; in vb2_vmalloc_dmabuf_ops_vmap()
365 if (WARN_ON(!buf->vaddr)) in vb2_vmalloc_get_dmabuf()
388 buf->vaddr = dma_buf_vmap(buf->dbuf); in vb2_vmalloc_map_dmabuf()
390 return buf->vaddr ? 0 : -EFAULT; in vb2_vmalloc_map_dmabuf()
397 dma_buf_vunmap(buf->dbuf, buf->vaddr); in vb2_vmalloc_unmap_dmabuf()
398 buf->vaddr = NULL; in vb2_vmalloc_unmap_dmabuf()
405 if (buf->vaddr) in vb2_vmalloc_detach_dmabuf()
406 dma_buf_vunmap(buf->dbuf, buf->vaddr); in vb2_vmalloc_detach_dmabuf()
443 .vaddr = vb2_vmalloc_vaddr,