From 6321ccd9c5a8b8498836bc66320556a309e38096 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Fri, 14 Feb 2020 13:55:31 +0100 Subject: [PATCH] drm/virtio: notify before waiting 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 Reviewed-by: Chia-I Wu Reviewed-by: Gurchetan Singh Link: http://patchwork.freedesktop.org/patch/msgid/20200214125535.26349-3-kraxel@redhat.com --- drivers/gpu/drm/virtio/virtgpu_vq.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c b/drivers/gpu/drm/virtio/virtgpu_vq.c index 6cc259cfa517a..653efb26bcd97 100644 --- a/drivers/gpu/drm/virtio/virtgpu_vq.c +++ b/drivers/gpu/drm/virtio/virtgpu_vq.c @@ -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; } -- 2.39.5