drm/virtio: fix a wait_event condition
outcnt may be greater than 1 since commit e1218b8c0cc1 ("drm/virtio: Use vmalloc for command buffer allocations."). Fixes: e1218b8c0cc1 ("drm/virtio: Use vmalloc for command buffer allocations.") Signed-off-by: Chia-I Wu <olvaffe@gmail.com> Cc: David Riley <davidriley@chromium.org> Link: http://patchwork.freedesktop.org/patch/msgid/20200205181955.202485-2-olvaffe@gmail.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
e46e31cf53
commit
58547d7d5c
@ -391,7 +391,8 @@ again:
|
||||
*/
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user