Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1362939
| From | Gustavo Padovan <gustavo@padovan.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2] drm/virtio: send vblank event after crtc updates |
| Date | 2016-03-22 21:20 +0100 |
| Message-ID | <rfAWu-1e6-9@gated-at.bofh.it> (permalink) |
| References | <rfdGz-1FG-59@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
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 <gustavo.padovan@collabora.co.uk>
---
drivers/gpu/drm/virtio/virtgpu_display.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c b/drivers/gpu/drm/virtio/virtgpu_display.c
index b70bb8b..4f372e0 100644
--- a/drivers/gpu/drm/virtio/virtgpu_display.c
+++ b/drivers/gpu/drm/virtio/virtgpu_display.c
@@ -274,12 +274,24 @@ static int virtio_gpu_crtc_atomic_check(struct drm_crtc *crtc,
return 0;
}
+static void virtio_gpu_crtc_atomic_flush(struct drm_crtc *crtc,
+ struct drm_crtc_state *old_state)
+{
+ unsigned long flags;
+
+ spin_lock_irqsave(&crtc->dev->event_lock, flags);
+ if (crtc->state->event)
+ drm_crtc_send_vblank_event(crtc, crtc->state->event);
+ spin_unlock_irqrestore(&crtc->dev->event_lock, flags);
+}
+
static const struct drm_crtc_helper_funcs virtio_gpu_crtc_helper_funcs = {
.enable = virtio_gpu_crtc_enable,
.disable = virtio_gpu_crtc_disable,
.mode_fixup = virtio_gpu_crtc_mode_fixup,
.mode_set_nofb = virtio_gpu_crtc_mode_set_nofb,
.atomic_check = virtio_gpu_crtc_atomic_check,
+ .atomic_flush = virtio_gpu_crtc_atomic_flush,
};
static void virtio_gpu_enc_mode_set(struct drm_encoder *encoder,
--
2.5.0
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 2/2] drm/virtio: send vblank event on plane atomic update Gustavo Padovan <gustavo@padovan.org> - 2016-03-21 20:30 +0100 Re: [PATCH 2/2] drm/virtio: send vblank event on plane atomic update Daniel Stone <daniel@fooishbar.org> - 2016-03-22 14:20 +0100 [PATCH v2] drm/virtio: send vblank event after crtc updates Gustavo Padovan <gustavo@padovan.org> - 2016-03-22 21:20 +0100
csiph-web