• Home
  • Raw
  • Download

Lines Matching refs:mem

72 		struct videobuf_vmalloc_memory *mem;  in videobuf_vm_close()  local
88 mem = q->bufs[i]->priv; in videobuf_vm_close()
89 if (mem) { in videobuf_vm_close()
96 MAGIC_CHECK(mem->magic, MAGIC_VMAL_MEM); in videobuf_vm_close()
102 __func__, i, mem->vaddr); in videobuf_vm_close()
104 vfree(mem->vaddr); in videobuf_vm_close()
105 mem->vaddr = NULL; in videobuf_vm_close()
137 struct videobuf_vmalloc_memory *mem; in __videobuf_alloc_vb() local
140 vb = kzalloc(size + sizeof(*mem), GFP_KERNEL); in __videobuf_alloc_vb()
144 mem = vb->priv = ((char *)vb) + size; in __videobuf_alloc_vb()
145 mem->magic = MAGIC_VMAL_MEM; in __videobuf_alloc_vb()
149 mem, (long)sizeof(*mem)); in __videobuf_alloc_vb()
158 struct videobuf_vmalloc_memory *mem = vb->priv; in __videobuf_iolock() local
161 BUG_ON(!mem); in __videobuf_iolock()
163 MAGIC_CHECK(mem->magic, MAGIC_VMAL_MEM); in __videobuf_iolock()
170 if (!mem->vaddr) { in __videobuf_iolock()
189 mem->vaddr = vmalloc_user(pages); in __videobuf_iolock()
190 if (!mem->vaddr) { in __videobuf_iolock()
195 mem->vaddr, pages); in __videobuf_iolock()
213 struct videobuf_vmalloc_memory *mem; in __videobuf_mmap_mapper() local
229 mem = buf->priv; in __videobuf_mmap_mapper()
230 BUG_ON(!mem); in __videobuf_mmap_mapper()
231 MAGIC_CHECK(mem->magic, MAGIC_VMAL_MEM); in __videobuf_mmap_mapper()
234 mem->vaddr = vmalloc_user(pages); in __videobuf_mmap_mapper()
235 if (!mem->vaddr) { in __videobuf_mmap_mapper()
239 dprintk(1, "vmalloc is at addr %p (%d pages)\n", mem->vaddr, pages); in __videobuf_mmap_mapper()
242 retval = remap_vmalloc_range(vma, mem->vaddr, 0); in __videobuf_mmap_mapper()
245 vfree(mem->vaddr); in __videobuf_mmap_mapper()
263 mem = NULL; in __videobuf_mmap_mapper()
294 struct videobuf_vmalloc_memory *mem = buf->priv; in videobuf_to_vmalloc() local
295 BUG_ON(!mem); in videobuf_to_vmalloc()
296 MAGIC_CHECK(mem->magic, MAGIC_VMAL_MEM); in videobuf_to_vmalloc()
298 return mem->vaddr; in videobuf_to_vmalloc()
304 struct videobuf_vmalloc_memory *mem = buf->priv; in videobuf_vmalloc_free() local
315 if (!mem) in videobuf_vmalloc_free()
318 MAGIC_CHECK(mem->magic, MAGIC_VMAL_MEM); in videobuf_vmalloc_free()
320 vfree(mem->vaddr); in videobuf_vmalloc_free()
321 mem->vaddr = NULL; in videobuf_vmalloc_free()