Home
last modified time | relevance | path

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

/drivers/gpu/drm/virtio/
Dvirtgpu_kms.c38 struct virtio_gpu_device *vgdev = in virtio_gpu_config_changed_work_func() local
44 virtio_cread(vgdev->vdev, struct virtio_gpu_config, in virtio_gpu_config_changed_work_func()
47 virtio_gpu_cmd_get_display_info(vgdev); in virtio_gpu_config_changed_work_func()
48 drm_helper_hpd_irq_event(vgdev->ddev); in virtio_gpu_config_changed_work_func()
51 virtio_cwrite(vgdev->vdev, struct virtio_gpu_config, in virtio_gpu_config_changed_work_func()
55 static void virtio_gpu_ctx_id_get(struct virtio_gpu_device *vgdev, in virtio_gpu_ctx_id_get() argument
61 spin_lock(&vgdev->ctx_id_idr_lock); in virtio_gpu_ctx_id_get()
62 handle = idr_alloc(&vgdev->ctx_id_idr, NULL, 1, 0, 0); in virtio_gpu_ctx_id_get()
63 spin_unlock(&vgdev->ctx_id_idr_lock); in virtio_gpu_ctx_id_get()
68 static void virtio_gpu_ctx_id_put(struct virtio_gpu_device *vgdev, uint32_t id) in virtio_gpu_ctx_id_put() argument
[all …]
Dvirtgpu_vq.c41 void virtio_gpu_resource_id_get(struct virtio_gpu_device *vgdev, in virtio_gpu_resource_id_get() argument
47 spin_lock(&vgdev->resource_idr_lock); in virtio_gpu_resource_id_get()
48 handle = idr_alloc(&vgdev->resource_idr, NULL, 1, 0, GFP_NOWAIT); in virtio_gpu_resource_id_get()
49 spin_unlock(&vgdev->resource_idr_lock); in virtio_gpu_resource_id_get()
54 void virtio_gpu_resource_id_put(struct virtio_gpu_device *vgdev, uint32_t id) in virtio_gpu_resource_id_put() argument
56 spin_lock(&vgdev->resource_idr_lock); in virtio_gpu_resource_id_put()
57 idr_remove(&vgdev->resource_idr, id); in virtio_gpu_resource_id_put()
58 spin_unlock(&vgdev->resource_idr_lock); in virtio_gpu_resource_id_put()
64 struct virtio_gpu_device *vgdev = dev->dev_private; in virtio_gpu_ctrl_ack() local
65 schedule_work(&vgdev->ctrlq.dequeue_work); in virtio_gpu_ctrl_ack()
[all …]
Dvirtgpu_ttm.c46 struct virtio_gpu_device *vgdev; in virtio_gpu_get_vgdev() local
49 vgdev = container_of(mman, struct virtio_gpu_device, mman); in virtio_gpu_get_vgdev()
50 return vgdev; in virtio_gpu_get_vgdev()
63 static int virtio_gpu_ttm_global_init(struct virtio_gpu_device *vgdev) in virtio_gpu_ttm_global_init() argument
68 vgdev->mman.mem_global_referenced = false; in virtio_gpu_ttm_global_init()
69 global_ref = &vgdev->mman.mem_global_ref; in virtio_gpu_ttm_global_init()
82 vgdev->mman.bo_global_ref.mem_glob = in virtio_gpu_ttm_global_init()
83 vgdev->mman.mem_global_ref.object; in virtio_gpu_ttm_global_init()
84 global_ref = &vgdev->mman.bo_global_ref.ref; in virtio_gpu_ttm_global_init()
92 drm_global_item_unref(&vgdev->mman.mem_global_ref); in virtio_gpu_ttm_global_init()
[all …]
Dvirtgpu_drv.h73 typedef void (*virtio_gpu_resp_cb)(struct virtio_gpu_device *vgdev,
224 int virtio_gpu_gem_init(struct virtio_gpu_device *vgdev);
225 void virtio_gpu_gem_fini(struct virtio_gpu_device *vgdev);
250 int virtio_gpu_fbdev_init(struct virtio_gpu_device *vgdev);
251 void virtio_gpu_fbdev_fini(struct virtio_gpu_device *vgdev);
256 int virtio_gpu_alloc_vbufs(struct virtio_gpu_device *vgdev);
257 void virtio_gpu_free_vbufs(struct virtio_gpu_device *vgdev);
258 void virtio_gpu_resource_id_get(struct virtio_gpu_device *vgdev,
260 void virtio_gpu_resource_id_put(struct virtio_gpu_device *vgdev, uint32_t id);
261 void virtio_gpu_cmd_create_resource(struct virtio_gpu_device *vgdev,
[all …]
Dvirtgpu_ioctl.c47 struct virtio_gpu_device *vgdev = dev->dev_private; in virtio_gpu_map_ioctl() local
50 return virtio_gpu_mode_dumb_mmap(file_priv, vgdev->ddev, in virtio_gpu_map_ioctl()
102 struct virtio_gpu_device *vgdev = dev->dev_private; in virtio_gpu_execbuffer_ioctl() local
116 if (vgdev->has_virgl_3d == false) in virtio_gpu_execbuffer_ioctl()
167 virtio_gpu_cmd_submit(vgdev, buf, exbuf->size, in virtio_gpu_execbuffer_ioctl()
189 struct virtio_gpu_device *vgdev = dev->dev_private; in virtio_gpu_getparam_ioctl() local
195 value = vgdev->has_virgl_3d == true ? 1 : 0; in virtio_gpu_getparam_ioctl()
210 struct virtio_gpu_device *vgdev = dev->dev_private; in virtio_gpu_resource_create_ioctl() local
224 if (vgdev->has_virgl_3d == false) { in virtio_gpu_resource_create_ioctl()
240 virtio_gpu_resource_id_get(vgdev, &res_id); in virtio_gpu_resource_create_ioctl()
[all …]
Dvirtgpu_display.c107 struct virtio_gpu_device *vgdev = dev->dev_private; in virtio_gpu_crtc_mode_set_nofb() local
110 virtio_gpu_cmd_set_scanout(vgdev, output->index, 0, in virtio_gpu_crtc_mode_set_nofb()
122 struct virtio_gpu_device *vgdev = dev->dev_private; in virtio_gpu_crtc_disable() local
125 virtio_gpu_cmd_set_scanout(vgdev, output->index, 0, 0, 0, 0, 0); in virtio_gpu_crtc_disable()
265 static int vgdev_output_init(struct virtio_gpu_device *vgdev, int index) in vgdev_output_init() argument
267 struct drm_device *dev = vgdev->ddev; in vgdev_output_init()
268 struct virtio_gpu_output *output = vgdev->outputs + index; in vgdev_output_init()
281 primary = virtio_gpu_plane_init(vgdev, DRM_PLANE_TYPE_PRIMARY, index); in vgdev_output_init()
284 cursor = virtio_gpu_plane_init(vgdev, DRM_PLANE_TYPE_CURSOR, index); in vgdev_output_init()
359 int virtio_gpu_modeset_init(struct virtio_gpu_device *vgdev) in virtio_gpu_modeset_init() argument
[all …]
Dvirtgpu_fb.c35 struct virtio_gpu_device *vgdev; member
44 struct virtio_gpu_device *vgdev = dev->dev_private; in virtio_gpu_dirty_update() local
105 virtio_gpu_cmd_transfer_to_host_2d(vgdev, obj->hw_res_handle, in virtio_gpu_dirty_update()
114 virtio_gpu_cmd_resource_flush(vgdev, obj->hw_res_handle, in virtio_gpu_dirty_update()
123 struct virtio_gpu_device *vgdev = vgfb->base.dev->dev_private; in virtio_gpu_surface_dirty() local
155 virtio_gpu_cmd_resource_flush(vgdev, obj->hw_res_handle, in virtio_gpu_surface_dirty()
215 static int virtio_gpu_vmap_fb(struct virtio_gpu_device *vgdev, in virtio_gpu_vmap_fb() argument
227 struct virtio_gpu_device *vgdev = dev->dev_private; in virtio_gpufb_create() local
303 virtio_gpu_resource_id_get(vgdev, &resid); in virtio_gpufb_create()
304 virtio_gpu_cmd_create_resource(vgdev, resid, format, in virtio_gpufb_create()
[all …]
Dvirtgpu_gem.c41 struct virtio_gpu_device *vgdev = dev->dev_private; in virtio_gpu_alloc_object() local
45 ret = virtio_gpu_object_create(vgdev, size, kernel, pinned, &obj); in virtio_gpu_alloc_object()
85 struct virtio_gpu_device *vgdev = dev->dev_private; in virtio_gpu_mode_dumb_create() local
101 virtio_gpu_resource_id_get(vgdev, &resid); in virtio_gpu_mode_dumb_create()
102 virtio_gpu_cmd_create_resource(vgdev, resid, in virtio_gpu_mode_dumb_create()
107 ret = virtio_gpu_object_attach(vgdev, obj, resid, NULL); in virtio_gpu_mode_dumb_create()
145 struct virtio_gpu_device *vgdev = obj->dev->dev_private; in virtio_gpu_gem_object_open() local
150 if (!vgdev->has_virgl_3d) in virtio_gpu_gem_object_open()
157 virtio_gpu_cmd_context_attach_resource(vgdev, vfpriv->ctx_id, in virtio_gpu_gem_object_open()
166 struct virtio_gpu_device *vgdev = obj->dev->dev_private; in virtio_gpu_gem_object_close() local
[all …]
Dvirtgpu_plane.c69 struct virtio_gpu_device *vgdev = dev->dev_private; in virtio_gpu_primary_plane_update() local
88 (vgdev, handle, 0, in virtio_gpu_primary_plane_update()
105 virtio_gpu_cmd_set_scanout(vgdev, output->index, handle, in virtio_gpu_primary_plane_update()
110 virtio_gpu_cmd_resource_flush(vgdev, handle, in virtio_gpu_primary_plane_update()
121 struct virtio_gpu_device *vgdev = dev->dev_private; in virtio_gpu_cursor_plane_update() local
147 (vgdev, handle, 0, in virtio_gpu_cursor_plane_update()
189 virtio_gpu_cursor_ping(vgdev, output); in virtio_gpu_cursor_plane_update()
202 struct drm_plane *virtio_gpu_plane_init(struct virtio_gpu_device *vgdev, in virtio_gpu_plane_init() argument
206 struct drm_device *dev = vgdev->ddev; in virtio_gpu_plane_init()
Dvirtgpu_object.c31 struct virtio_gpu_device *vgdev; in virtio_gpu_ttm_bo_destroy() local
34 vgdev = (struct virtio_gpu_device *)bo->gem_base.dev->dev_private; in virtio_gpu_ttm_bo_destroy()
37 virtio_gpu_cmd_unref_resource(vgdev, bo->hw_res_handle); in virtio_gpu_ttm_bo_destroy()
61 int virtio_gpu_object_create(struct virtio_gpu_device *vgdev, in virtio_gpu_object_create() argument
76 acc_size = ttm_bo_dma_acc_size(&vgdev->mman.bdev, size, in virtio_gpu_object_create()
83 ret = drm_gem_object_init(vgdev->ddev, &bo->gem_base, size); in virtio_gpu_object_create()
91 ret = ttm_bo_init(&vgdev->mman.bdev, &bo->tbo, size, type, in virtio_gpu_object_create()
Dvirtgpu_fence.c77 int virtio_gpu_fence_emit(struct virtio_gpu_device *vgdev, in virtio_gpu_fence_emit() argument
81 struct virtio_gpu_fence_driver *drv = &vgdev->fence_drv; in virtio_gpu_fence_emit()
102 void virtio_gpu_fence_event_process(struct virtio_gpu_device *vgdev, in virtio_gpu_fence_event_process() argument
105 struct virtio_gpu_fence_driver *drv = &vgdev->fence_drv; in virtio_gpu_fence_event_process()
110 atomic64_set(&vgdev->fence_drv.last_seq, last_seq); in virtio_gpu_fence_event_process()
Dvirtgpu_debugfs.c35 struct virtio_gpu_device *vgdev = node->minor->dev->dev_private; in virtio_gpu_debugfs_irq_info() local
38 (u64)atomic64_read(&vgdev->fence_drv.last_seq), in virtio_gpu_debugfs_irq_info()
39 vgdev->fence_drv.sync_seq); in virtio_gpu_debugfs_irq_info()
Dvirtgpu_drv.c63 struct virtio_gpu_device *vgdev = dev->dev_private; in virtio_gpu_config_changed() local
65 schedule_work(&vgdev->config_changed_work); in virtio_gpu_config_changed()