projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e46e31c
)
drm/virtio: fix a wait_event condition
author
Chia-I Wu
<olvaffe@gmail.com>
Wed, 5 Feb 2020 18:19:45 +0000
(10:19 -0800)
committer
Gerd Hoffmann
<kraxel@redhat.com>
Thu, 6 Feb 2020 10:55:08 +0000
(11:55 +0100)
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>
drivers/gpu/drm/virtio/virtgpu_vq.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/virtio/virtgpu_vq.c
b/drivers/gpu/drm/virtio/virtgpu_vq.c
index 83f22933c3bb57d81a42ba1df4e884a8be10232b..301f47552aeaa37b76f98bf5720816a1445c06b9 100644
(file)
--- a/
drivers/gpu/drm/virtio/virtgpu_vq.c
+++ b/
drivers/gpu/drm/virtio/virtgpu_vq.c
@@
-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;
}