drm/virtio: add virtio_gpu_object_array & helpers
authorGerd Hoffmann <kraxel@redhat.com>
Thu, 29 Aug 2019 10:32:50 +0000 (12:32 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 4 Sep 2019 04:54:09 +0000 (06:54 +0200)
commit98abe21d07c84e03fddceabb238c9d548e5d4ddf
tree5e27431a60715feff628a5f5d2a96673fef2a9c8
parentcde14fd4a604e9abf4c9f25f9ab12ecc8fc3935a
drm/virtio: add virtio_gpu_object_array & helpers

Some helper functions to manage an array of gem objects.

v9: use dma_resv_lock_interruptible.
v6:
 - add ticket to struct virtio_gpu_object_array.
 - add virtio_gpu_array_{lock,unlock}_resv helpers.
 - add virtio_gpu_array_add_fence helper.
v5: some small optimizations (Chia-I Wu).
v4: make them virtio-private instead of generic helpers.

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-8-kraxel@redhat.com
drivers/gpu/drm/virtio/virtgpu_drv.h
drivers/gpu/drm/virtio/virtgpu_gem.c