drm/virtio: allocate fences with GFP_KERNEL
authorChia-I Wu <olvaffe@gmail.com>
Mon, 29 Apr 2019 22:10:21 +0000 (15:10 -0700)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 6 May 2019 08:52:58 +0000 (10:52 +0200)
It was changed to GFP_ATOMIC in commit ec2f0577c (add & use
virtio_gpu_queue_fenced_ctrl_buffer) because the allocation happened
with a spinlock held.  That was no longer true after commit
9fdd90c0f (add virtio_gpu_alloc_fence()).

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Robert Foss <robert.foss@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20190429221021.159784-1-olvaffe@gmail.com
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Gustavo Padovan <gustavo.padovan@collabora.com>
Cc: Robert Foss <robert.foss@collabora.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
drivers/gpu/drm/virtio/virtgpu_fence.c

index e22918ca621b71dcab6d0e1bac7853c543ff04a4..8aecc36a04178549cefc4a87d436354b953f82ca 100644 (file)
@@ -70,7 +70,7 @@ struct virtio_gpu_fence *virtio_gpu_fence_alloc(struct virtio_gpu_device *vgdev)
 {
        struct virtio_gpu_fence_driver *drv = &vgdev->fence_drv;
        struct virtio_gpu_fence *fence = kzalloc(sizeof(struct virtio_gpu_fence),
-                                                       GFP_ATOMIC);
+                                                       GFP_KERNEL);
        if (!fence)
                return fence;