Home
last modified time | relevance | path

Searched refs:vgdev (Results 1 – 12 of 12) sorted by relevance

/kernel/linux/linux-5.10/drivers/gpu/drm/virtio/
Dvirtgpu_kms.c36 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 …]
Dvirtgpu_vq.c57 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 …]
Dvirtgpu_ioctl.c39 struct virtio_gpu_device *vgdev = dev->dev_private; in virtio_gpu_create_context() local
48 virtio_gpu_cmd_context_create(vgdev, vfpriv->ctx_id, in virtio_gpu_create_context()
59 struct virtio_gpu_device *vgdev = dev->dev_private; in virtio_gpu_map_ioctl() local
62 return virtio_gpu_mode_dumb_mmap(file, vgdev->ddev, in virtio_gpu_map_ioctl()
77 struct virtio_gpu_device *vgdev = dev->dev_private; in virtio_gpu_execbuffer_ioctl() local
89 if (vgdev->has_virgl_3d == false) in virtio_gpu_execbuffer_ioctl()
111 if (!dma_fence_match_context(in_fence, vgdev->fence_drv.context)) in virtio_gpu_execbuffer_ioctl()
162 out_fence = virtio_gpu_fence_alloc(vgdev); in virtio_gpu_execbuffer_ioctl()
180 virtio_gpu_cmd_submit(vgdev, buf, exbuf->size, in virtio_gpu_execbuffer_ioctl()
183 virtio_gpu_notify(vgdev); in virtio_gpu_execbuffer_ioctl()
[all …]
Dvirtgpu_drv.h104 typedef void (*virtio_gpu_resp_cb)(struct virtio_gpu_device *vgdev,
266 void virtio_gpu_array_put_free_delayed(struct virtio_gpu_device *vgdev,
271 int virtio_gpu_alloc_vbufs(struct virtio_gpu_device *vgdev);
272 void virtio_gpu_free_vbufs(struct virtio_gpu_device *vgdev);
273 void virtio_gpu_cmd_create_resource(struct virtio_gpu_device *vgdev,
278 void virtio_gpu_cmd_unref_resource(struct virtio_gpu_device *vgdev,
280 void virtio_gpu_cmd_transfer_to_host_2d(struct virtio_gpu_device *vgdev,
286 void virtio_gpu_cmd_resource_flush(struct virtio_gpu_device *vgdev,
290 void virtio_gpu_cmd_set_scanout(struct virtio_gpu_device *vgdev,
294 void virtio_gpu_object_attach(struct virtio_gpu_device *vgdev,
[all …]
Dvirtgpu_object.c34 static int virtio_gpu_resource_id_get(struct virtio_gpu_device *vgdev, in virtio_gpu_resource_id_get() argument
50 int handle = ida_alloc(&vgdev->resource_ida, GFP_KERNEL); in virtio_gpu_resource_id_get()
58 static void virtio_gpu_resource_id_put(struct virtio_gpu_device *vgdev, uint32_t id) in virtio_gpu_resource_id_put() argument
61 ida_free(&vgdev->resource_ida, id - 1); in virtio_gpu_resource_id_put()
67 struct virtio_gpu_device *vgdev = bo->base.base.dev->dev_private; in virtio_gpu_cleanup_object() local
69 virtio_gpu_resource_id_put(vgdev, bo->hw_res_handle); in virtio_gpu_cleanup_object()
75 dma_unmap_sgtable(vgdev->vdev->dev.parent, in virtio_gpu_cleanup_object()
93 struct virtio_gpu_device *vgdev = bo->base.base.dev->dev_private; in virtio_gpu_free_object() local
96 virtio_gpu_cmd_unref_resource(vgdev, bo); in virtio_gpu_free_object()
97 virtio_gpu_notify(vgdev); in virtio_gpu_free_object()
[all …]
Dvirtgpu_gem.c37 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()
112 struct virtio_gpu_device *vgdev = obj->dev->dev_private; in virtio_gpu_gem_object_open() local
116 if (!vgdev->has_virgl_3d) in virtio_gpu_gem_object_open()
129 virtio_gpu_cmd_context_attach_resource(vgdev, vfpriv->ctx_id, in virtio_gpu_gem_object_open()
132 virtio_gpu_notify(vgdev); in virtio_gpu_gem_object_open()
139 struct virtio_gpu_device *vgdev = obj->dev->dev_private; in virtio_gpu_gem_object_close() local
143 if (!vgdev->has_virgl_3d) in virtio_gpu_gem_object_close()
151 virtio_gpu_cmd_context_detach_resource(vgdev, vfpriv->ctx_id, in virtio_gpu_gem_object_close()
153 virtio_gpu_notify(vgdev); in virtio_gpu_gem_object_close()
[all …]
Dvirtgpu_display.c88 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()
249 static int vgdev_output_init(struct virtio_gpu_device *vgdev, int index) in vgdev_output_init() argument
251 struct drm_device *dev = vgdev->ddev; in vgdev_output_init()
252 struct virtio_gpu_output *output = vgdev->outputs + index; in vgdev_output_init()
265 primary = virtio_gpu_plane_init(vgdev, DRM_PLANE_TYPE_PRIMARY, index); in vgdev_output_init()
[all …]
Dvirtgpu_debugfs.c46 struct virtio_gpu_device *vgdev = node->minor->dev->dev_private; in virtio_gpu_features() local
48 virtio_add_bool(m, "virgl", vgdev->has_virgl_3d); in virtio_gpu_features()
49 virtio_add_bool(m, "edid", vgdev->has_edid); in virtio_gpu_features()
50 virtio_add_bool(m, "indirect", vgdev->has_indirect); in virtio_gpu_features()
51 virtio_add_bool(m, "resource uuid", vgdev->has_resource_assign_uuid); in virtio_gpu_features()
52 virtio_add_int(m, "cap sets", vgdev->num_capsets); in virtio_gpu_features()
53 virtio_add_int(m, "scanouts", vgdev->num_scanouts); in virtio_gpu_features()
61 struct virtio_gpu_device *vgdev = node->minor->dev->dev_private; in virtio_gpu_debugfs_irq_info() local
64 (u64)atomic64_read(&vgdev->fence_drv.last_seq), in virtio_gpu_debugfs_irq_info()
65 vgdev->fence_drv.sync_seq); in virtio_gpu_debugfs_irq_info()
Dvirtgpu_plane.c106 static void virtio_gpu_update_dumb_bo(struct virtio_gpu_device *vgdev, in virtio_gpu_update_dumb_bo() argument
125 virtio_gpu_cmd_transfer_to_host_2d(vgdev, off, w, h, x, y, in virtio_gpu_update_dumb_bo()
133 struct virtio_gpu_device *vgdev = dev->dev_private; in virtio_gpu_primary_plane_update() local
147 virtio_gpu_cmd_set_scanout(vgdev, output->index, 0, in virtio_gpu_primary_plane_update()
151 virtio_gpu_notify(vgdev); in virtio_gpu_primary_plane_update()
160 virtio_gpu_update_dumb_bo(vgdev, plane->state, &rect); in virtio_gpu_primary_plane_update()
177 virtio_gpu_cmd_set_scanout(vgdev, output->index, in virtio_gpu_primary_plane_update()
185 virtio_gpu_cmd_resource_flush(vgdev, bo->hw_res_handle, in virtio_gpu_primary_plane_update()
190 virtio_gpu_notify(vgdev); in virtio_gpu_primary_plane_update()
197 struct virtio_gpu_device *vgdev = dev->dev_private; in virtio_gpu_cursor_prepare_fb() local
[all …]
Dvirtgpu_fence.c76 struct virtio_gpu_fence *virtio_gpu_fence_alloc(struct virtio_gpu_device *vgdev) in virtio_gpu_fence_alloc() argument
78 struct virtio_gpu_fence_driver *drv = &vgdev->fence_drv; in virtio_gpu_fence_alloc()
95 void virtio_gpu_fence_emit(struct virtio_gpu_device *vgdev, in virtio_gpu_fence_emit() argument
99 struct virtio_gpu_fence_driver *drv = &vgdev->fence_drv; in virtio_gpu_fence_emit()
114 void virtio_gpu_fence_event_process(struct virtio_gpu_device *vgdev, in virtio_gpu_fence_event_process() argument
117 struct virtio_gpu_fence_driver *drv = &vgdev->fence_drv; in virtio_gpu_fence_event_process()
122 atomic64_set(&vgdev->fence_drv.last_seq, last_seq); in virtio_gpu_fence_event_process()
Dvirtgpu_prime.c35 struct virtio_gpu_device *vgdev = obj->dev->dev_private; in virtgpu_virtio_get_uuid() local
37 wait_event(vgdev->resp_wq, bo->uuid_state != UUID_INITIALIZING); in virtgpu_virtio_get_uuid()
67 struct virtio_gpu_device *vgdev = dev->dev_private; in virtgpu_gem_prime_export() local
73 if (vgdev->has_resource_assign_uuid) { in virtgpu_gem_prime_export()
79 ret = virtio_gpu_cmd_resource_assign_uuid(vgdev, objs); in virtgpu_gem_prime_export()
82 virtio_gpu_notify(vgdev); in virtgpu_gem_prime_export()
Dvirtgpu_drv.c148 struct virtio_gpu_device *vgdev = dev->dev_private; in virtio_gpu_config_changed() local
150 schedule_work(&vgdev->config_changed_work); in virtio_gpu_config_changed()