drm/virtio: rework virtio_gpu_object_create fencing
authorGerd Hoffmann <kraxel@redhat.com>
Thu, 29 Aug 2019 10:32:52 +0000 (12:32 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 4 Sep 2019 04:54:09 +0000 (06:54 +0200)
commite2324300f427ffca99135b256a97f9fb62fc2483
tree100848d90d2c061ba85817cda287e43bb3ab024d
parentda758d51968a88fc879bdbd16a0da4784499b5bb
drm/virtio: rework virtio_gpu_object_create fencing

Rework fencing workflow.  Stop using ttm helpers, use the
virtio_gpu_array_* helpers instead.

Due to using the gem reservation object it is initialized and ready for
use before calling ttm_bo_init.  So we can simply use the standard
fencing workflow and drop the tricky logic which checks whenever the
command is in flight still.

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