drm/virtio: notify before waiting
authorGerd Hoffmann <kraxel@redhat.com>
Fri, 14 Feb 2020 12:55:31 +0000 (13:55 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 17 Feb 2020 13:50:49 +0000 (14:50 +0100)
Before we are going to wait for virtqueue entries becoming available
call virtio_gpu_notify() to make sure the host has seen everything
we've submitted.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/20200214125535.26349-3-kraxel@redhat.com
drivers/gpu/drm/virtio/virtgpu_vq.c

index 6cc259cfa517a87c808e939d646fcd79c25b2696..653efb26bcd97ecfcbce2e21150ca89f022cdfc9 100644 (file)
@@ -346,6 +346,7 @@ again:
 
        if (vq->num_free < elemcnt) {
                spin_unlock(&vgdev->ctrlq.qlock);
+               virtio_gpu_notify(vgdev);
                wait_event(vgdev->ctrlq.ack_queue, vq->num_free >= elemcnt);
                goto again;
        }