Lines Matching refs:vfpriv
310 struct virtio_gpu_fpriv *vfpriv; in virtio_gpu_driver_open() local
318 vfpriv = kzalloc(sizeof(*vfpriv), GFP_KERNEL); in virtio_gpu_driver_open()
319 if (!vfpriv) in virtio_gpu_driver_open()
322 mutex_init(&vfpriv->context_lock); in virtio_gpu_driver_open()
326 kfree(vfpriv); in virtio_gpu_driver_open()
330 vfpriv->ctx_id = handle + 1; in virtio_gpu_driver_open()
331 file->driver_priv = vfpriv; in virtio_gpu_driver_open()
338 struct virtio_gpu_fpriv *vfpriv = file->driver_priv; in virtio_gpu_driver_postclose() local
343 if (vfpriv->context_created) { in virtio_gpu_driver_postclose()
344 virtio_gpu_cmd_context_destroy(vgdev, vfpriv->ctx_id); in virtio_gpu_driver_postclose()
348 ida_free(&vgdev->ctx_id_ida, vfpriv->ctx_id - 1); in virtio_gpu_driver_postclose()
349 mutex_destroy(&vfpriv->context_lock); in virtio_gpu_driver_postclose()
350 kfree(vfpriv); in virtio_gpu_driver_postclose()