drm/virtio: allocate some extra bufs
authorGerd Hoffmann <kraxel@redhat.com>
Tue, 15 Nov 2016 08:46:48 +0000 (09:46 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 15 Nov 2016 08:46:48 +0000 (09:46 +0100)
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 <jslaby@suse.cz>
Tested-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
drivers/gpu/drm/virtio/virtgpu_vq.c

index 5a0f8a745b9de370e19e291ea46240bf8d9086dc..974f9410474b1fb1c18279b231db0c36e64b9632 100644 (file)
@@ -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);