/drivers/gpu/drm/virtio/ |
D | virtgpu_kms.c | 36 struct virtio_gpu_device *vgdev = in virtio_gpu_config_changed_work_func() local 42 virtio_cread_le(vgdev->vdev, struct virtio_gpu_config, in virtio_gpu_config_changed_work_func() 45 if (vgdev->has_edid) in virtio_gpu_config_changed_work_func() 46 virtio_gpu_cmd_get_edids(vgdev); in virtio_gpu_config_changed_work_func() 47 virtio_gpu_cmd_get_display_info(vgdev); in virtio_gpu_config_changed_work_func() 48 virtio_gpu_notify(vgdev); in virtio_gpu_config_changed_work_func() 49 drm_helper_hpd_irq_event(vgdev->ddev); in virtio_gpu_config_changed_work_func() 52 virtio_cwrite_le(vgdev->vdev, struct virtio_gpu_config, in virtio_gpu_config_changed_work_func() 64 static void virtio_gpu_get_capsets(struct virtio_gpu_device *vgdev, in virtio_gpu_get_capsets() argument 69 vgdev->capsets = kcalloc(num_capsets, in virtio_gpu_get_capsets() [all …]
|
D | virtgpu_vq.c | 57 struct virtio_gpu_device *vgdev = dev->dev_private; in virtio_gpu_ctrl_ack() local 59 schedule_work(&vgdev->ctrlq.dequeue_work); in virtio_gpu_ctrl_ack() 65 struct virtio_gpu_device *vgdev = dev->dev_private; in virtio_gpu_cursor_ack() local 67 schedule_work(&vgdev->cursorq.dequeue_work); in virtio_gpu_cursor_ack() 70 int virtio_gpu_alloc_vbufs(struct virtio_gpu_device *vgdev) in virtio_gpu_alloc_vbufs() argument 72 vgdev->vbufs = kmem_cache_create("virtio-gpu-vbufs", in virtio_gpu_alloc_vbufs() 76 if (!vgdev->vbufs) in virtio_gpu_alloc_vbufs() 81 void virtio_gpu_free_vbufs(struct virtio_gpu_device *vgdev) in virtio_gpu_free_vbufs() argument 83 kmem_cache_destroy(vgdev->vbufs); in virtio_gpu_free_vbufs() 84 vgdev->vbufs = NULL; in virtio_gpu_free_vbufs() [all …]
|
D | virtgpu_ioctl.c | 43 struct virtio_gpu_device *vgdev = dev->dev_private; in virtio_gpu_create_context() local 52 virtio_gpu_cmd_context_create(vgdev, vfpriv->ctx_id, in virtio_gpu_create_context() 63 struct virtio_gpu_device *vgdev = dev->dev_private; in virtio_gpu_map_ioctl() local 66 return virtio_gpu_mode_dumb_mmap(file, vgdev->ddev, in virtio_gpu_map_ioctl() 81 struct virtio_gpu_device *vgdev = dev->dev_private; in virtio_gpu_execbuffer_ioctl() local 93 if (vgdev->has_virgl_3d == false) in virtio_gpu_execbuffer_ioctl() 115 if (!dma_fence_match_context(in_fence, vgdev->fence_drv.context)) in virtio_gpu_execbuffer_ioctl() 166 out_fence = virtio_gpu_fence_alloc(vgdev); in virtio_gpu_execbuffer_ioctl() 184 virtio_gpu_cmd_submit(vgdev, buf, exbuf->size, in virtio_gpu_execbuffer_ioctl() 187 virtio_gpu_notify(vgdev); in virtio_gpu_execbuffer_ioctl() [all …]
|
D | virtgpu_debugfs.c | 45 struct virtio_gpu_device *vgdev = node->minor->dev->dev_private; in virtio_gpu_features() local 47 virtio_gpu_add_bool(m, "virgl", vgdev->has_virgl_3d); in virtio_gpu_features() 48 virtio_gpu_add_bool(m, "edid", vgdev->has_edid); in virtio_gpu_features() 49 virtio_gpu_add_bool(m, "indirect", vgdev->has_indirect); in virtio_gpu_features() 52 vgdev->has_resource_assign_uuid); in virtio_gpu_features() 54 virtio_gpu_add_bool(m, "blob resources", vgdev->has_resource_blob); in virtio_gpu_features() 55 virtio_gpu_add_int(m, "cap sets", vgdev->num_capsets); in virtio_gpu_features() 56 virtio_gpu_add_int(m, "scanouts", vgdev->num_scanouts); in virtio_gpu_features() 57 if (vgdev->host_visible_region.len) { in virtio_gpu_features() 59 (unsigned long)vgdev->host_visible_region.addr, in virtio_gpu_features() [all …]
|
D | virtgpu_drv.h | 126 typedef void (*virtio_gpu_resp_cb)(struct virtio_gpu_device *vgdev, 295 void virtio_gpu_array_put_free_delayed(struct virtio_gpu_device *vgdev, 300 int virtio_gpu_alloc_vbufs(struct virtio_gpu_device *vgdev); 301 void virtio_gpu_free_vbufs(struct virtio_gpu_device *vgdev); 302 void virtio_gpu_cmd_create_resource(struct virtio_gpu_device *vgdev, 307 void virtio_gpu_cmd_unref_resource(struct virtio_gpu_device *vgdev, 309 void virtio_gpu_cmd_transfer_to_host_2d(struct virtio_gpu_device *vgdev, 315 void virtio_gpu_cmd_resource_flush(struct virtio_gpu_device *vgdev, 321 void virtio_gpu_cmd_set_scanout(struct virtio_gpu_device *vgdev, 325 void virtio_gpu_object_attach(struct virtio_gpu_device *vgdev, [all …]
|
D | virtgpu_vram.c | 7 struct virtio_gpu_device *vgdev = obj->dev->dev_private; in virtio_gpu_vram_free() local 12 spin_lock(&vgdev->host_visible_lock); in virtio_gpu_vram_free() 14 spin_unlock(&vgdev->host_visible_lock); in virtio_gpu_vram_free() 17 virtio_gpu_cmd_unmap(vgdev, bo); in virtio_gpu_vram_free() 19 virtio_gpu_cmd_unref_resource(vgdev, bo); in virtio_gpu_vram_free() 20 virtio_gpu_notify(vgdev); in virtio_gpu_vram_free() 34 struct virtio_gpu_device *vgdev = obj->dev->dev_private; in virtio_gpu_vram_mmap() local 42 wait_event(vgdev->resp_wq, vram->map_state != STATE_INITIALIZING); in virtio_gpu_vram_mmap() 85 struct virtio_gpu_device *vgdev = bo->base.base.dev->dev_private; in virtio_gpu_vram_map() local 88 if (!vgdev->has_host_visible) in virtio_gpu_vram_map() [all …]
|
D | virtgpu_object.c | 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 dma_unmap_sgtable(vgdev->vdev->dev.parent, in virtio_gpu_cleanup_object() 89 spin_lock(&vgdev->host_visible_lock); in virtio_gpu_cleanup_object() 93 spin_unlock(&vgdev->host_visible_lock); in virtio_gpu_cleanup_object() 104 struct virtio_gpu_device *vgdev = bo->base.base.dev->dev_private; in virtio_gpu_free_object() local [all …]
|
D | virtgpu_gem.c | 37 struct virtio_gpu_device *vgdev = dev->dev_private; in virtio_gpu_gem_create() local 42 ret = virtio_gpu_object_create(vgdev, params, &obj, NULL); in virtio_gpu_gem_create() 67 struct virtio_gpu_device *vgdev = dev->dev_private; in virtio_gpu_mode_dumb_create() local 84 if (vgdev->has_resource_blob && !vgdev->has_virgl_3d) { in virtio_gpu_mode_dumb_create() 120 struct virtio_gpu_device *vgdev = obj->dev->dev_private; in virtio_gpu_gem_object_open() local 124 if (!vgdev->has_virgl_3d) in virtio_gpu_gem_object_open() 137 virtio_gpu_cmd_context_attach_resource(vgdev, vfpriv->ctx_id, in virtio_gpu_gem_object_open() 140 virtio_gpu_notify(vgdev); in virtio_gpu_gem_object_open() 147 struct virtio_gpu_device *vgdev = obj->dev->dev_private; in virtio_gpu_gem_object_close() local 151 if (!vgdev->has_virgl_3d) in virtio_gpu_gem_object_close() [all …]
|
D | virtgpu_display.c | 88 struct virtio_gpu_device *vgdev = dev->dev_private; in virtio_gpu_crtc_mode_set_nofb() local 91 virtio_gpu_cmd_set_scanout(vgdev, output->index, 0, in virtio_gpu_crtc_mode_set_nofb() 94 virtio_gpu_notify(vgdev); in virtio_gpu_crtc_mode_set_nofb() 106 struct virtio_gpu_device *vgdev = dev->dev_private; in virtio_gpu_crtc_atomic_disable() local 109 virtio_gpu_cmd_set_scanout(vgdev, output->index, 0, 0, 0, 0, 0); in virtio_gpu_crtc_atomic_disable() 110 virtio_gpu_notify(vgdev); in virtio_gpu_crtc_atomic_disable() 253 static int vgdev_output_init(struct virtio_gpu_device *vgdev, int index) in vgdev_output_init() argument 255 struct drm_device *dev = vgdev->ddev; in vgdev_output_init() 256 struct virtio_gpu_output *output = vgdev->outputs + index; in vgdev_output_init() 269 primary = virtio_gpu_plane_init(vgdev, DRM_PLANE_TYPE_PRIMARY, index); in vgdev_output_init() [all …]
|
D | virtgpu_plane.c | 155 static void virtio_gpu_update_dumb_bo(struct virtio_gpu_device *vgdev, in virtio_gpu_update_dumb_bo() argument 174 virtio_gpu_cmd_transfer_to_host_2d(vgdev, off, w, h, x, y, in virtio_gpu_update_dumb_bo() 183 struct virtio_gpu_device *vgdev = dev->dev_private; in virtio_gpu_resource_flush() local 197 virtio_gpu_cmd_resource_flush(vgdev, bo->hw_res_handle, x, y, in virtio_gpu_resource_flush() 199 virtio_gpu_notify(vgdev); in virtio_gpu_resource_flush() 206 virtio_gpu_cmd_resource_flush(vgdev, bo->hw_res_handle, x, y, in virtio_gpu_resource_flush() 208 virtio_gpu_notify(vgdev); in virtio_gpu_resource_flush() 218 struct virtio_gpu_device *vgdev = dev->dev_private; in virtio_gpu_primary_plane_update() local 232 virtio_gpu_cmd_set_scanout(vgdev, output->index, 0, in virtio_gpu_primary_plane_update() 236 virtio_gpu_notify(vgdev); in virtio_gpu_primary_plane_update() [all …]
|
D | virtgpu_prime.c | 35 struct virtio_gpu_device *vgdev = obj->dev->dev_private; in virtgpu_virtio_get_uuid() local 37 wait_event(vgdev->resp_wq, bo->uuid_state != STATE_INITIALIZING); in virtgpu_virtio_get_uuid() 62 int virtio_gpu_resource_assign_uuid(struct virtio_gpu_device *vgdev, in virtio_gpu_resource_assign_uuid() argument 73 ret = virtio_gpu_cmd_resource_assign_uuid(vgdev, objs); in virtio_gpu_resource_assign_uuid() 85 struct virtio_gpu_device *vgdev = dev->dev_private; in virtgpu_gem_prime_export() local 92 if (vgdev->has_resource_assign_uuid) { in virtgpu_gem_prime_export() 93 ret = virtio_gpu_resource_assign_uuid(vgdev, bo); in virtgpu_gem_prime_export() 97 virtio_gpu_notify(vgdev); in virtgpu_gem_prime_export()
|
D | virtgpu_fence.c | 74 struct virtio_gpu_fence *virtio_gpu_fence_alloc(struct virtio_gpu_device *vgdev) in virtio_gpu_fence_alloc() argument 76 struct virtio_gpu_fence_driver *drv = &vgdev->fence_drv; in virtio_gpu_fence_alloc() 94 void virtio_gpu_fence_emit(struct virtio_gpu_device *vgdev, in virtio_gpu_fence_emit() argument 98 struct virtio_gpu_fence_driver *drv = &vgdev->fence_drv; in virtio_gpu_fence_emit() 113 void virtio_gpu_fence_event_process(struct virtio_gpu_device *vgdev, in virtio_gpu_fence_event_process() argument 116 struct virtio_gpu_fence_driver *drv = &vgdev->fence_drv; in virtio_gpu_fence_event_process() 121 atomic64_set(&vgdev->fence_drv.last_fence_id, fence_id); in virtio_gpu_fence_event_process()
|
D | virtgpu_drv.c | 153 struct virtio_gpu_device *vgdev = dev->dev_private; in virtio_gpu_config_changed() local 155 schedule_work(&vgdev->config_changed_work); in virtio_gpu_config_changed()
|