This is a note to let you know that I've just added the patch titled
drm/nouveau/kms/nv04-nv40: fix pageflip events via special case.
to the 3.14-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
drm-nouveau-kms-nv04-nv40-fix-pageflip-events-via-special-case.patch
and it can be found in the queue-3.14 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From af4870e406126b7ac0ae7c7ce5751f25ebe60f28 Mon Sep 17 00:00:00 2001
From: Mario Kleiner <[email protected]>
Date: Tue, 13 May 2014 00:42:08 +0200
Subject: drm/nouveau/kms/nv04-nv40: fix pageflip events via special case.
From: Mario Kleiner <[email protected]>
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 <[email protected]>
Signed-off-by: Ben Skeggs <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/gpu/drm/nouveau/nouveau_display.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
--- a/drivers/gpu/drm/nouveau/nouveau_display.c
+++ b/drivers/gpu/drm/nouveau/nouveau_display.c
@@ -796,6 +796,7 @@ nouveau_finish_page_flip(struct nouveau_
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);
@@ -806,8 +807,13 @@ nouveau_finish_page_flip(struct nouveau_
}
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)
Patches currently in stable-queue which might be from
[email protected] are
queue-3.14/drm-nouveau-kms-reference-vblank-for-crtc-during-pageflip.patch
queue-3.14/drm-nouveau-disp-nv04-nv40-abort-scanoutpos-query-on-vga-analog.patch
queue-3.14/drm-nouveau-kms-nv04-nv40-fix-pageflip-events-via-special-case.patch
queue-3.14/drm-nv50-mc-fix-kms-pageflip-events-by-reordering-irq-handling-order.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html