Lines Matching refs:vgdev
9 struct virtio_gpu_device *vgdev = obj->dev->dev_private; in virtio_gpu_vram_free() local
14 spin_lock(&vgdev->host_visible_lock); in virtio_gpu_vram_free()
16 spin_unlock(&vgdev->host_visible_lock); in virtio_gpu_vram_free()
19 virtio_gpu_cmd_unmap(vgdev, bo); in virtio_gpu_vram_free()
21 virtio_gpu_cmd_unref_resource(vgdev, bo); in virtio_gpu_vram_free()
22 virtio_gpu_notify(vgdev); in virtio_gpu_vram_free()
36 struct virtio_gpu_device *vgdev = obj->dev->dev_private; in virtio_gpu_vram_mmap() local
44 wait_event(vgdev->resp_wq, vram->map_state != STATE_INITIALIZING); in virtio_gpu_vram_mmap()
73 struct virtio_gpu_device *vgdev = bo->base.base.dev->dev_private; in virtio_gpu_vram_map_dma_buf() local
86 if (!is_virtio_device(dev) || !vgdev->has_resource_assign_uuid) { in virtio_gpu_vram_map_dma_buf()
146 struct virtio_gpu_device *vgdev = bo->base.base.dev->dev_private; in virtio_gpu_vram_map() local
149 if (!vgdev->has_host_visible) in virtio_gpu_vram_map()
152 spin_lock(&vgdev->host_visible_lock); in virtio_gpu_vram_map()
153 ret = drm_mm_insert_node(&vgdev->host_visible_mm, &vram->vram_node, in virtio_gpu_vram_map()
155 spin_unlock(&vgdev->host_visible_lock); in virtio_gpu_vram_map()
168 offset = vram->vram_node.start - vgdev->host_visible_region.addr; in virtio_gpu_vram_map()
170 ret = virtio_gpu_cmd_map(vgdev, objs, offset); in virtio_gpu_vram_map()
179 spin_lock(&vgdev->host_visible_lock); in virtio_gpu_vram_map()
181 spin_unlock(&vgdev->host_visible_lock); in virtio_gpu_vram_map()
185 int virtio_gpu_vram_create(struct virtio_gpu_device *vgdev, in virtio_gpu_vram_create() argument
201 drm_gem_private_object_init(vgdev->ddev, obj, params->size); in virtio_gpu_vram_create()
210 ret = virtio_gpu_resource_id_get(vgdev, &vram->base.hw_res_handle); in virtio_gpu_vram_create()
216 virtio_gpu_cmd_resource_create_blob(vgdev, &vram->base, params, NULL, in virtio_gpu_vram_create()