drm/virtio: Add missing virtqueue reset
authorEzequiel Garcia <ezequiel@collabora.com>
Wed, 2 Jan 2019 17:55:07 +0000 (14:55 -0300)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 8 Jan 2019 10:45:28 +0000 (11:45 +0100)
As per the VirtIO spec, the virtqueues must be reset during cleanup
(see "3.3.1 Driver Requirements: Device Cleanup").

Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20190102175507.4653-2-ezequiel@collabora.com
drivers/gpu/drm/virtio/virtgpu_kms.c

index 1072064a0db29e485d2f05da07500a5b40d2392e..c340be252fce9dc5f5802fb48aeca37752ebbdf8 100644 (file)
@@ -239,6 +239,7 @@ void virtio_gpu_driver_unload(struct drm_device *dev)
        flush_work(&vgdev->ctrlq.dequeue_work);
        flush_work(&vgdev->cursorq.dequeue_work);
        flush_work(&vgdev->config_changed_work);
+       vgdev->vdev->config->reset(vgdev->vdev);
        vgdev->vdev->config->del_vqs(vgdev->vdev);
 
        virtio_gpu_modeset_fini(vgdev);