Lines Matching refs:vaddr

25 	void				*vaddr;  member
46 buf->vaddr = vmalloc_user(buf->size); in vb2_vmalloc_alloc()
52 if (!buf->vaddr) { in vb2_vmalloc_alloc()
67 vfree(buf->vaddr); in vb2_vmalloc_put()
72 static void *vb2_vmalloc_get_userptr(void *alloc_ctx, unsigned long vaddr, in vb2_vmalloc_get_userptr() argument
85 offset = vaddr & ~PAGE_MASK; in vb2_vmalloc_get_userptr()
87 vec = vb2_create_framevec(vaddr, size, dma_dir == DMA_FROM_DEVICE); in vb2_vmalloc_get_userptr()
102 buf->vaddr = (__force void *) in vb2_vmalloc_get_userptr()
105 buf->vaddr = vm_map_ram(frame_vector_pages(vec), n_pages, -1, in vb2_vmalloc_get_userptr()
109 if (!buf->vaddr) in vb2_vmalloc_get_userptr()
111 buf->vaddr += offset; in vb2_vmalloc_get_userptr()
125 unsigned long vaddr = (unsigned long)buf->vaddr & PAGE_MASK; in vb2_vmalloc_put_userptr() local
133 if (vaddr) in vb2_vmalloc_put_userptr()
134 vm_unmap_ram((void *)vaddr, n_pages); in vb2_vmalloc_put_userptr()
139 iounmap((__force void __iomem *)buf->vaddr); in vb2_vmalloc_put_userptr()
149 if (!buf->vaddr) { in vb2_vmalloc_vaddr()
155 return buf->vaddr; in vb2_vmalloc_vaddr()
174 ret = remap_vmalloc_range(vma, buf->vaddr, 0); in vb2_vmalloc_mmap()
214 void *vaddr = buf->vaddr; in vb2_vmalloc_dmabuf_ops_attach() local
229 struct page *page = vmalloc_to_page(vaddr); in vb2_vmalloc_dmabuf_ops_attach()
237 vaddr += PAGE_SIZE; in vb2_vmalloc_dmabuf_ops_attach()
321 return buf->vaddr + pgnum * PAGE_SIZE; in vb2_vmalloc_dmabuf_ops_kmap()
328 return buf->vaddr; in vb2_vmalloc_dmabuf_ops_vmap()
360 if (WARN_ON(!buf->vaddr)) in vb2_vmalloc_get_dmabuf()
383 buf->vaddr = dma_buf_vmap(buf->dbuf); in vb2_vmalloc_map_dmabuf()
385 return buf->vaddr ? 0 : -EFAULT; in vb2_vmalloc_map_dmabuf()
392 dma_buf_vunmap(buf->dbuf, buf->vaddr); in vb2_vmalloc_unmap_dmabuf()
393 buf->vaddr = NULL; in vb2_vmalloc_unmap_dmabuf()
400 if (buf->vaddr) in vb2_vmalloc_detach_dmabuf()
401 dma_buf_vunmap(buf->dbuf, buf->vaddr); in vb2_vmalloc_detach_dmabuf()
438 .vaddr = vb2_vmalloc_vaddr,