[RFC 1/5] drm/virtio: add virtio_gpu_alloc_fence()

2016-12-13 Thread Gustavo Padovan
2016-12-13 Gerd Hoffmann : > Hi, > > > +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; > > + unsigned long irq_flags; > > + > > + fence = km

[RFC 1/5] drm/virtio: add virtio_gpu_alloc_fence()

2016-12-13 Thread Gerd Hoffmann
Hi, > +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; > + unsigned long irq_flags; > + > + fence = kmalloc(sizeof(struct virtio_gpu_fence), G

[RFC 1/5] drm/virtio: add virtio_gpu_alloc_fence()

2016-12-12 Thread Gustavo Padovan
From: Gustavo Padovan Refactor fence creation to remove the potential allocation failure from the cmd_submit and atomic_commit paths. Now the fence should be allocated first and just after we should proceed with the rest of the execution. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/virt