[PATCH] drm/virtio: allocate fences with GFP_KERNEL

Chia-I Wu olvaffe at gmail.com
Mon Apr 29 22:10:21 UTC 2019


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 at gmail.com>
Cc: Gerd Hoffmann <kraxel at redhat.com>
Cc: Gustavo Padovan <gustavo.padovan at collabora.com>
Cc: Robert Foss <robert.foss at collabora.com>
---
 drivers/gpu/drm/virtio/virtgpu_fence.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/virtio/virtgpu_fence.c b/drivers/gpu/drm/virtio/virtgpu_fence.c
index 87d1966192f4..b63ea4797afc 100644
--- a/drivers/gpu/drm/virtio/virtgpu_fence.c
+++ b/drivers/gpu/drm/virtio/virtgpu_fence.c
@@ -71,7 +71,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;
 
-- 
2.21.0.593.g511ec345e18-goog



More information about the dri-devel mailing list