From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S941487AbcKOIxq (ORCPT ); Tue, 15 Nov 2016 03:53:46 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58572 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755456AbcKOIxo (ORCPT ); Tue, 15 Nov 2016 03:53:44 -0500 From: Gerd Hoffmann To: David Airlie , dri-devel@lists.freedesktop.org Cc: Gerd Hoffmann , virtualization@lists.linux-foundation.org (open list:VIRTIO GPU DRIVER), linux-kernel@vger.kernel.org (open list) Subject: [PATCH for-4.9] drm/virtio: allocate some extra bufs Date: Tue, 15 Nov 2016 09:53:23 +0100 Message-Id: <1479200004-18163-1-git-send-email-kraxel@redhat.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 15 Nov 2016 08:53:43 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/gpu/drm/virtio/virtgpu_vq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c b/drivers/gpu/drm/virtio/virtgpu_vq.c index 5a0f8a7..974f941 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); -- 1.8.3.1