linux/drivers/gpu/drm/virtio
Gerd Hoffmann da758d5196 drm/virtio: rework virtio_gpu_execbuffer_ioctl fencing
Rework fencing workflow, starting with virtio_gpu_execbuffer_ioctl.
Stop using ttm helpers, use the virtio_gpu_array_* helpers (which work
on the reservation objects directly) instead.

Also store the object array in struct virtio_gpu_vbuffer, so we
explicitly keep a reference of all buffers used instead of depending
on ttm_bo_put() checking whenever the object is actually idle before
releasing it.

New workflow:

 (1) All gem objects needed by a command are added to a
     virtio_gpu_object_array.
 (2) All reservation objects will be locked (virtio_gpu_array_lock_resv).
 (3) virtio_gpu_fence_emit() completes fence initialization.
 (4) fence gets added to the objects, reservation objects are unlocked
     (virtio_gpu_array_add_fence, virtio_gpu_array_unlock_resv).
 (5) virtio command is submitted to the host.
 (6) The completion callback (virtio_gpu_dequeue_ctrl_func)
     will drop object references and free virtio_gpu_object_array.

v6: rewrite most of the patch.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20190829103301.3539-9-kraxel@redhat.com
2019-09-04 06:54:09 +02:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile drm/virtio: drop framebuffer dirty tracking code 2019-06-13 08:47:15 +02:00
virtgpu_debugfs.c drm/virtgpu: drop use of drmP.h 2019-07-15 18:11:31 +02:00
virtgpu_display.c drm/virtgpu: drop use of drmP.h 2019-07-15 18:11:31 +02:00
virtgpu_drv.c drm: drop resource_id parameter from drm_fb_helper_remove_conflicting_pci_framebuffers 2019-08-23 10:48:31 +02:00
virtgpu_drv.h drm/virtio: rework virtio_gpu_execbuffer_ioctl fencing 2019-09-04 06:54:09 +02:00
virtgpu_fence.c drm/virtgpu: drop use of drmP.h 2019-07-15 18:11:31 +02:00
virtgpu_gem.c drm/virtio: add virtio_gpu_object_array & helpers 2019-09-04 06:54:09 +02:00
virtgpu_ioctl.c drm/virtio: rework virtio_gpu_execbuffer_ioctl fencing 2019-09-04 06:54:09 +02:00
virtgpu_kms.c drm/virtgpu: drop use of drmP.h 2019-07-15 18:11:31 +02:00
virtgpu_object.c drm/virtio: remove virtio_gpu_object_wait 2019-09-04 06:54:08 +02:00
virtgpu_plane.c drm/virtio: simplify cursor updates 2019-09-04 06:54:08 +02:00
virtgpu_prime.c drm/ttm: use gem vma_node 2019-08-06 08:21:54 +02:00
virtgpu_trace_points.c drm/virtio: add trace events for commands 2019-05-06 10:52:58 +02:00
virtgpu_trace.h drm/virtio: add trace events for commands 2019-05-06 10:52:58 +02:00
virtgpu_ttm.c drm/virtgpu: drop use of drmP.h 2019-07-15 18:11:31 +02:00
virtgpu_vq.c drm/virtio: rework virtio_gpu_execbuffer_ioctl fencing 2019-09-04 06:54:09 +02:00