From: Gerd Hoffmann Date: Tue, 15 Nov 2016 08:46:48 +0000 (+0100) Subject: drm/virtio: allocate some extra bufs X-Git-Tag: v4.10-rc1~154^2~22^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=348a4b6dd77d183ef4ea67673ecf30a09ae3f9d7;p=thirdparty%2Flinux.git drm/virtio: allocate some extra bufs virtio-gpu guest driver appearently can run out of buffers. allocate some extra buffers, as quick stopgap for 4.9. analyzing root cause and fixing it properly is TBD. Reported-by: Jiri Slaby Tested-by: Jiri Slaby Signed-off-by: Gerd Hoffmann --- diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c b/drivers/gpu/drm/virtio/virtgpu_vq.c index 5a0f8a745b9de..974f9410474b1 100644 --- a/drivers/gpu/drm/virtio/virtgpu_vq.c +++ b/drivers/gpu/drm/virtio/virtgpu_vq.c @@ -75,7 +75,7 @@ void virtio_gpu_cursor_ack(struct virtqueue *vq) int virtio_gpu_alloc_vbufs(struct virtio_gpu_device *vgdev) { struct virtio_gpu_vbuffer *vbuf; - int i, size, count = 0; + int i, size, count = 16; void *ptr; INIT_LIST_HEAD(&vgdev->free_vbufs);