diff options
author | Mario Kleiner <mario.kleiner.de@gmail.com> | 2014-03-19 05:02:11 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2014-03-26 00:08:23 -0400 |
commit | 6c3252bc83155ae69d78fefdc7458aa64d8a87db (patch) | |
tree | 4e8e3e270a4caef78068470262c2d8347b4ada01 | |
parent | dcd9262b3baf881285e9e0fd5459d54723cc992e (diff) |
drm/nouveau: fix small thinko in vblank timestamping.
*hpos horizontal scanout position doesn't need to be corrected
to count the pixels between hactive end and htotal negative.
That is only needed for *vpos to count lines until end of
vblank for the vblank timestamping.
Use hpos as is without correction.
Removes occassional spikes in timestamps of up to 1 scanline
duration, thereby improves accuracy to about +/- 2 usecs instead
of +/- 12 usecs, wrt. true onset time as measured with high
precision equipment on NV-A5.
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_display.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c index db19a56459f7..b1547b032150 100644 --- a/drivers/gpu/drm/nouveau/nouveau_display.c +++ b/drivers/gpu/drm/nouveau/nouveau_display.c | |||
@@ -105,7 +105,7 @@ nouveau_display_scanoutpos_head(struct drm_crtc *crtc, int *vpos, int *hpos, | |||
105 | if (retry) ndelay(crtc->linedur_ns); | 105 | if (retry) ndelay(crtc->linedur_ns); |
106 | } while (retry--); | 106 | } while (retry--); |
107 | 107 | ||
108 | *hpos = calc(args.hblanks, args.hblanke, args.htotal, args.hline); | 108 | *hpos = args.hline; |
109 | *vpos = calc(args.vblanks, args.vblanke, args.vtotal, args.vline); | 109 | *vpos = calc(args.vblanks, args.vblanke, args.vtotal, args.vline); |
110 | if (stime) *stime = ns_to_ktime(args.time[0]); | 110 | if (stime) *stime = ns_to_ktime(args.time[0]); |
111 | if (etime) *etime = ns_to_ktime(args.time[1]); | 111 | if (etime) *etime = ns_to_ktime(args.time[1]); |