Lines Matching refs:vgdev

34 int virtio_gpu_resource_id_get(struct virtio_gpu_device *vgdev, uint32_t *resid)  in virtio_gpu_resource_id_get()  argument
49 int handle = ida_alloc(&vgdev->resource_ida, GFP_KERNEL); in virtio_gpu_resource_id_get()
57 static void virtio_gpu_resource_id_put(struct virtio_gpu_device *vgdev, uint32_t id) in virtio_gpu_resource_id_put() argument
60 ida_free(&vgdev->resource_ida, id - 1); in virtio_gpu_resource_id_put()
66 struct virtio_gpu_device *vgdev = bo->base.base.dev->dev_private; in virtio_gpu_cleanup_object() local
68 virtio_gpu_resource_id_put(vgdev, bo->hw_res_handle); in virtio_gpu_cleanup_object()
74 spin_lock(&vgdev->host_visible_lock); in virtio_gpu_cleanup_object()
78 spin_unlock(&vgdev->host_visible_lock); in virtio_gpu_cleanup_object()
89 struct virtio_gpu_device *vgdev = bo->base.base.dev->dev_private; in virtio_gpu_free_object() local
92 virtio_gpu_cmd_unref_resource(vgdev, bo); in virtio_gpu_free_object()
93 virtio_gpu_notify(vgdev); in virtio_gpu_free_object()
135 static int virtio_gpu_object_shmem_init(struct virtio_gpu_device *vgdev, in virtio_gpu_object_shmem_init() argument
140 bool use_dma_api = !virtio_has_dma_quirk(vgdev->vdev); in virtio_gpu_object_shmem_init()
179 int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, in virtio_gpu_object_create() argument
194 shmem_obj = drm_gem_shmem_create(vgdev->ddev, params->size); in virtio_gpu_object_create()
199 ret = virtio_gpu_resource_id_get(vgdev, &bo->hw_res_handle); in virtio_gpu_object_create()
205 ret = virtio_gpu_object_shmem_init(vgdev, bo, &ents, &nents); in virtio_gpu_object_create()
225 virtio_gpu_cmd_resource_create_blob(vgdev, bo, params, in virtio_gpu_object_create()
228 virtio_gpu_cmd_resource_create_3d(vgdev, bo, params, in virtio_gpu_object_create()
230 virtio_gpu_object_attach(vgdev, bo, ents, nents); in virtio_gpu_object_create()
232 virtio_gpu_cmd_create_resource(vgdev, bo, params, in virtio_gpu_object_create()
234 virtio_gpu_object_attach(vgdev, bo, ents, nents); in virtio_gpu_object_create()
245 virtio_gpu_resource_id_put(vgdev, bo->hw_res_handle); in virtio_gpu_object_create()