Commit 58547d7d authored by Chia-I Wu's avatar Chia-I Wu Committed by Gerd Hoffmann

drm/virtio: fix a wait_event condition

outcnt may be greater than 1 since commit e1218b8c ("drm/virtio:
Use vmalloc for command buffer allocations.").

Fixes: e1218b8c ("drm/virtio: Use vmalloc for command buffer allocations.")
Signed-off-by: default avatarChia-I Wu <olvaffe@gmail.com>
Cc: David Riley <davidriley@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/20200205181955.202485-2-olvaffe@gmail.comSigned-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
parent e46e31cf
......@@ -391,7 +391,8 @@ static void virtio_gpu_queue_fenced_ctrl_buffer(struct virtio_gpu_device *vgdev,
*/
if (vq->num_free < 2 + outcnt) {
spin_unlock(&vgdev->ctrlq.qlock);
wait_event(vgdev->ctrlq.ack_queue, vq->num_free >= 3);
wait_event(vgdev->ctrlq.ack_queue,
vq->num_free >= 2 + outcnt);
goto again;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment