[3.13.y.z extended stable] Patch "drm/nouveau/kms/nv04-nv40: fix pageflip events via special case." has been added to staging queue
Kamal Mostafa
kamal at canonical.com
Tue Jul 15 21:29:39 UTC 2014
This is a note to let you know that I have just added a patch titled
drm/nouveau/kms/nv04-nv40: fix pageflip events via special case.
to the linux-3.13.y-queue branch of the 3.13.y.z extended stable tree
which can be found at:
http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.13.y-queue
This patch is scheduled to be released in version 3.13.11.5.
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.13.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Kamal
------
>From 95dd225767f47080be005b089e1bd1b86db1e4d5 Mon Sep 17 00:00:00 2001
From: Mario Kleiner <mario.kleiner.de at gmail.com>
Date: Tue, 13 May 2014 00:42:08 +0200
Subject: drm/nouveau/kms/nv04-nv40: fix pageflip events via special case.
commit af4870e406126b7ac0ae7c7ce5751f25ebe60f28 upstream.
Cards with nv04 display engine can't reliably use vblank
counts and timestamps computed via drm_handle_vblank(), as
the function gets invoked after sending the pageflip events.
Fix this by defaulting to the old crtcid = -1 fallback path
on <= NV-50 cards, and only using the precise path on NV-50
and later.
Signed-off-by: Mario Kleiner <mario.kleiner.de at gmail.com>
Signed-off-by: Ben Skeggs <bskeggs at redhat.com>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
drivers/gpu/drm/nouveau/nouveau_display.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
index a0b2b87..cdaee13 100644
--- a/drivers/gpu/drm/nouveau/nouveau_display.c
+++ b/drivers/gpu/drm/nouveau/nouveau_display.c
@@ -692,6 +692,7 @@ nouveau_finish_page_flip(struct nouveau_channel *chan,
struct drm_device *dev = drm->dev;
struct nouveau_page_flip_state *s;
unsigned long flags;
+ int crtcid = -1;
spin_lock_irqsave(&dev->event_lock, flags);
@@ -702,8 +703,13 @@ nouveau_finish_page_flip(struct nouveau_channel *chan,
}
s = list_first_entry(&fctx->flip, struct nouveau_page_flip_state, head);
- if (s->event)
- drm_send_vblank_event(dev, s->crtc, s->event);
+ if (s->event) {
+ /* Vblank timestamps/counts are only correct on >= NV-50 */
+ if (nv_device(drm->device)->card_type >= NV_50)
+ crtcid = s->crtc;
+
+ drm_send_vblank_event(dev, crtcid, s->event);
+ }
list_del(&s->head);
if (ps)
--
1.9.1
More information about the kernel-team
mailing list