drm/virtio: allocate fences with GFP_KERNEL
Subsystems (3)
Chia-I Wu
reviewerPATCH 1/1 drm/virtio: allocate fences with GFP_KERNEL
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()).
--- drivers/gpu/drm/virtio/virtgpu_fence.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/virtio/virtgpu_fence.c +1 -1
@@ -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;
Signature · 6 lines
2.21.0.593.g511ec345e18-goog _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Hey Chia-I,
This looks good to me, I can't find any spinlocks being held during that allocation.
Quoted 19 lines · Chia-I Wu
It was changed to
GFP_ATOMICin commitec2f0577c(add & usevirtio_gpu_queue_fenced_ctrl_buffer) because the allocation happened with a spinlock held. That was no longer true after commit9fdd90c0f(addvirtio_gpu_alloc_fence()).Signed-off-by Chia-I Wu <[email protected]>Cc Gerd Hoffmann <[email protected]>Cc Gustavo Padovan <[email protected]>Cc Robert Foss <[email protected]>--- drivers/gpu/drm/virtio/virtgpu_fence.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/virtio/virtgpu_fence.c +0
-0
drivers/gpu/drm/virtio/virtgpu_fence.c struct virtio_gpu_fence *virtio_gpu_fence_alloc(struct virtio_gpu_device *vgdev) · line 77
Quoted 8 lines
drivers/gpu/drm/virtio/virtgpu_fence.c +1
-1@@ -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;
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 10 lines · Chia-I Wu
It was changed to
GFP_ATOMICin commitec2f0577c(add & usevirtio_gpu_queue_fenced_ctrl_buffer) because the allocation happened with a spinlock held. That was no longer true after commit9fdd90c0f(addvirtio_gpu_alloc_fence()).Signed-off-by Chia-I Wu <[email protected]>Cc Gerd Hoffmann <[email protected]>Cc Gustavo Padovan <[email protected]>Cc Robert Foss <[email protected]>
Side:
Rob, should we follow-up on 9fdd90c0f and drop the virtio_gpu_fence_emit() return type?
HTH
-Emil
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 12 lines · Emil Velikov
Quoted 10 lines · Chia-I Wu
It was changed to
GFP_ATOMICin commitec2f0577c(add & usevirtio_gpu_queue_fenced_ctrl_buffer) because the allocation happened with a spinlock held. That was no longer true after commit9fdd90c0f(addvirtio_gpu_alloc_fence()).Signed-off-by Chia-I Wu <[email protected]>Cc Gerd Hoffmann <[email protected]>Cc Gustavo Padovan <[email protected]>Cc Robert Foss <[email protected]>
Quoted 5 lines
Reviewed-by Emil Velikov <[email protected]>Side:
Rob, should we follow-up on9fdd90c0fand drop thevirtio_gpu_fence_emit()return type?
Good idea. None of the called functions return anything. I'll get right on it.
Rob.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Gerd Hoffmann
maintainerQuoted 4 lines · Chia-I Wu
It was changed to
GFP_ATOMICin commitec2f0577c(add & usevirtio_gpu_queue_fenced_ctrl_buffer) because the allocation happened with a spinlock held. That was no longer true after commit9fdd90c0f(addvirtio_gpu_alloc_fence()).
Added to drm-misc-next.
thanks,
Gerd
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel