[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20200214125535.26349-3-kraxel@redhat.com>
Date: Fri, 14 Feb 2020 13:55:31 +0100
From: Gerd Hoffmann <kraxel@...hat.com>
To: dri-devel@...ts.freedesktop.org
Cc: gurchetansingh@...omium.org, olvaffe@...il.com,
Gerd Hoffmann <kraxel@...hat.com>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
virtualization@...ts.linux-foundation.org (open list:VIRTIO GPU DRIVER),
linux-kernel@...r.kernel.org (open list)
Subject: [PATCH v4 2/6] 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 <kraxel@...hat.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 6cc259cfa517..653efb26bcd9 100644
--- a/drivers/gpu/drm/virtio/virtgpu_vq.c
+++ b/drivers/gpu/drm/virtio/virtgpu_vq.c
@@ -346,6 +346,7 @@ static void virtio_gpu_queue_ctrl_sgs(struct virtio_gpu_device *vgdev,
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.18.2
Powered by blists - more mailing lists