Lines Matching refs:vfile
84 static struct dma_fence *vgem_fence_create(struct vgem_file *vfile, in vgem_fence_create() argument
130 struct vgem_file *vfile = file->driver_priv; in vgem_fence_attach_ioctl() local
147 fence = vgem_fence_create(vfile, arg->flags); in vgem_fence_attach_ioctl()
171 mutex_lock(&vfile->fence_mutex); in vgem_fence_attach_ioctl()
172 ret = idr_alloc(&vfile->fence_idr, fence, 1, 0, GFP_KERNEL); in vgem_fence_attach_ioctl()
173 mutex_unlock(&vfile->fence_mutex); in vgem_fence_attach_ioctl()
209 struct vgem_file *vfile = file->driver_priv; in vgem_fence_signal_ioctl() local
217 mutex_lock(&vfile->fence_mutex); in vgem_fence_signal_ioctl()
218 fence = idr_replace(&vfile->fence_idr, NULL, arg->fence); in vgem_fence_signal_ioctl()
219 mutex_unlock(&vfile->fence_mutex); in vgem_fence_signal_ioctl()
233 int vgem_fence_open(struct vgem_file *vfile) in vgem_fence_open() argument
235 mutex_init(&vfile->fence_mutex); in vgem_fence_open()
236 idr_init_base(&vfile->fence_idr, 1); in vgem_fence_open()
248 void vgem_fence_close(struct vgem_file *vfile) in vgem_fence_close() argument
250 idr_for_each(&vfile->fence_idr, __vgem_fence_idr_fini, vfile); in vgem_fence_close()
251 idr_destroy(&vfile->fence_idr); in vgem_fence_close()
252 mutex_destroy(&vfile->fence_mutex); in vgem_fence_close()