[PATCH] drm/virtio: call drm_plane_cleanup() at destroy phase

2017-02-15 Thread Gustavo Padovan
From: Gustavo Padovan virtio was missing this call to clean up core plane usage. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/virtio/virtgpu_plane.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c b/drivers/gpu/drm/virtio/virtgpu_plane.c index

Re: [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 5/5] drm/virtio: bump driver version after explicit synchronization addition

2016-12-12 Thread Gustavo Padovan
From: Gustavo Padovan To reflect the (backward compatible) changes in the uabi we are bumping the driver's version. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/virtio/virtgpu_drv.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/v

[RFC 4/5] drm/virtio: add out-fences support for explicit synchronization

2016-12-12 Thread Gustavo Padovan
From: Gustavo Padovan On the out-fence side we get fence returned by the submitted draw call and attach it to a sync_file and send the sync_file fd to userspace. On error -1 is returned to userspace. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/virtio/virtgpu_ioctl.c | 51

[RFC 3/5] drm/virtio: add in-fences support for explicit synchronization

2016-12-12 Thread Gustavo Padovan
From: Gustavo Padovan When the execbuf call receives an in-fence it will get the dma_fence related to that fence fd and wait on it before submitting the draw call. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/virtio/virtgpu_ioctl.c | 41 ++ 1 file changed

[RFC 2/5] drm/virtio: add uapi for in and out explicit fences

2016-12-12 Thread Gustavo Padovan
From: Gustavo Padovan Add a new field called fence_fd that will be used by userspace to send in-fences to the kernel and receive out-fences created by the kernel. This uapi enables virtio to take advantage of explicit synchronization of dma-bufs. There are two new flags

[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

[PATCH] drm/virtio: call drm_plane_cleanup() at destroy phase

2016-12-12 Thread Gustavo Padovan
From: Gustavo Padovan virtio was missing this call to clean up core plane usage. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/virtio/virtgpu_plane.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/virtio/virtgpu_plane.c b/drivers/gpu/drm/virtio/virtgpu_plane.c index

[PATCH 2/2] drm/virtio: add real fence context and seqno

2016-08-31 Thread Gustavo Padovan
From: Gustavo Padovan virtio fences were created with no fence context, which would make then clash with an allocated fence context. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/virtio/virtgpu_drv.h | 1 + drivers/gpu/drm/virtio/virtgpu_fence.c | 2 +- drivers/gpu/drm/virtio

[PATCH 1/2] drm/virtio: drop virtio_gpu_execbuffer_ioctl() wrapping

2016-08-31 Thread Gustavo Padovan
From: Gustavo Padovan Instead of wrapping virtio_gpu_execbuffer() to execute the ioctl just execute it directly. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/virtio/virtgpu_ioctl.c | 24 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/drivers/gpu

[PATCH RESEND 06/14] drm/virtio: use drm_crtc_send_vblank_event()

2016-06-06 Thread Gustavo Padovan
From: Gustavo Padovan Replace the legacy drm_send_vblank_event() with the new helper function. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/virtio/virtgpu_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c b/drivers

[PATCH RESEND] drm/virtio: send vblank event after crtc updates

2016-04-14 Thread Gustavo Padovan
From: Gustavo Padovan virtio_gpu was failing to send vblank events when using the atomic IOCTL with the DRM_MODE_PAGE_FLIP_EVENT flag set. This patch fixes each and enables atomic pageflips updates. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/virtio/virtgpu_display.c | 12

[PATCH 13/14] drm/virtio: use drm_crtc_send_vblank_event()

2016-04-14 Thread Gustavo Padovan
From: Gustavo Padovan Replace the legacy drm_send_vblank_event() with the new helper function. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/virtio/virtgpu_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c b/drivers

Re: [PATCH v2] drm/virtio: send vblank event after crtc updates

2016-04-05 Thread Gustavo Padovan
Hi, Any comment on this? Gustavo 2016-03-22 Gustavo Padovan : > From: Gustavo Padovan > > virtio_gpu was failing to send vblank events when using the atomic IOCTL > with the DRM_MODE_PAGE_FLIP_EVENT flag set. This patch fixes each and > enables atomic pageflips updat

[PATCH v2] drm/virtio: send vblank event after crtc updates

2016-03-23 Thread Gustavo Padovan
From: Gustavo Padovan virtio_gpu was failing to send vblank events when using the atomic IOCTL with the DRM_MODE_PAGE_FLIP_EVENT flag set. This patch fixes each and enables atomic pageflips updates. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/virtio/virtgpu_display.c | 12

[PATCH 2/2] drm/virtio: send vblank event on plane atomic update

2016-03-23 Thread Gustavo Padovan
From: Gustavo Padovan virtio_gpu was failing to send vblank events when using the atomic IOCTL with the DRM_MODE_PAGE_FLIP_EVENT flag set. This patch fixes each and enables atomic pageflips updates. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/virtio/virtgpu_plane.c | 9 - 1

[PATCH 1/2] drm/virtio: use new drm_crtc_send_vblank_event()

2016-03-23 Thread Gustavo Padovan
From: Gustavo Padovan Simplify code by using the new vblank crtc helpers. Signed-off-by: Gustavo Padovan --- drivers/gpu/drm/virtio/virtgpu_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c b/drivers/gpu/drm/virtio