summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/virtio/virtgpu_fence.c
diff options
context:
space:
mode:
authorGerd Hoffmann2015-08-19 23:44:15 +0200
committerGerd Hoffmann2015-10-16 10:44:00 +0200
commitec2f0577c7b1fccc7a5d7ee8002a4f162061498f (patch)
tree218790a9de25b9f7f415d94f51d4114c9f730ca5 /drivers/gpu/drm/virtio/virtgpu_fence.c
parentvirtio-gpu: add virtio_gpu_queue_ctrl_buffer_locked (diff)
downloadkernel-qcow2-linux-ec2f0577c7b1fccc7a5d7ee8002a4f162061498f.tar.gz
kernel-qcow2-linux-ec2f0577c7b1fccc7a5d7ee8002a4f162061498f.tar.xz
kernel-qcow2-linux-ec2f0577c7b1fccc7a5d7ee8002a4f162061498f.zip
virtio-gpu: add & use virtio_gpu_queue_fenced_ctrl_buffer
Add helper function to handle the submission of fenced control requests. Make sure we initialize the fence while holding the virtqueue lock, so requests can't be reordered. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/virtio/virtgpu_fence.c')
-rw-r--r--drivers/gpu/drm/virtio/virtgpu_fence.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/virtio/virtgpu_fence.c b/drivers/gpu/drm/virtio/virtgpu_fence.c
index 1da632631dac..793ad9f631fd 100644
--- a/drivers/gpu/drm/virtio/virtgpu_fence.c
+++ b/drivers/gpu/drm/virtio/virtgpu_fence.c
@@ -81,7 +81,7 @@ int virtio_gpu_fence_emit(struct virtio_gpu_device *vgdev,
struct virtio_gpu_fence_driver *drv = &vgdev->fence_drv;
unsigned long irq_flags;
- *fence = kmalloc(sizeof(struct virtio_gpu_fence), GFP_KERNEL);
+ *fence = kmalloc(sizeof(struct virtio_gpu_fence), GFP_ATOMIC);
if ((*fence) == NULL)
return -ENOMEM;