[4.2.y-ckt stable] Patch "drm/virtio: send vblank event after crtc updates" has been added to the 4.2.y-ckt tree
Kamal Mostafa
kamal at canonical.com
Mon May 9 19:43:34 UTC 2016
This is a note to let you know that I have just added a patch titled
drm/virtio: send vblank event after crtc updates
to the linux-4.2.y-queue branch of the 4.2.y-ckt extended stable tree
which can be found at:
https://git.launchpad.net/~canonical-kernel/linux/+git/linux-stable-ckt/log/?h=linux-4.2.y-queue
This patch is scheduled to be released in version 4.2.8-ckt10.
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 4.2.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Kamal
---8<------------------------------------------------------------
>From 900f5de68a7e5905172d98237747f8083f724551 Mon Sep 17 00:00:00 2001
From: Gustavo Padovan <gustavo.padovan at collabora.co.uk>
Date: Thu, 14 Apr 2016 10:58:54 -0700
Subject: drm/virtio: send vblank event after crtc updates
commit 9a11d2e7e66b6b8764a2430686b8716637bf812e upstream.
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 at collabora.co.uk>
Signed-off-by: Dave Airlie <airlied at redhat.com>
[ kamal: backport to 4.2-stable: older crtc api ]
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
drivers/gpu/drm/virtio/virtgpu_display.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c b/drivers/gpu/drm/virtio/virtgpu_display.c
index 54b70f1..7f9e96d 100644
--- a/drivers/gpu/drm/virtio/virtgpu_display.c
+++ b/drivers/gpu/drm/virtio/virtgpu_display.c
@@ -223,12 +223,23 @@ static int virtio_gpu_crtc_atomic_check(struct drm_crtc *crtc,
return 0;
}
+static void virtio_gpu_crtc_atomic_flush(struct drm_crtc *crtc)
+{
+ 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 bool virtio_gpu_enc_mode_fixup(struct drm_encoder *encoder,
--
2.7.4
More information about the kernel-team
mailing list