Commit 6c3252bc authored by Mario Kleiner's avatar Mario Kleiner Committed by Ben Skeggs

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: default avatarMario Kleiner <mario.kleiner.de@gmail.com>
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent dcd9262b
...@@ -105,7 +105,7 @@ nouveau_display_scanoutpos_head(struct drm_crtc *crtc, int *vpos, int *hpos, ...@@ -105,7 +105,7 @@ nouveau_display_scanoutpos_head(struct drm_crtc *crtc, int *vpos, int *hpos,
if (retry) ndelay(crtc->linedur_ns); if (retry) ndelay(crtc->linedur_ns);
} while (retry--); } while (retry--);
*hpos = calc(args.hblanks, args.hblanke, args.htotal, args.hline); *hpos = args.hline;
*vpos = calc(args.vblanks, args.vblanke, args.vtotal, args.vline); *vpos = calc(args.vblanks, args.vblanke, args.vtotal, args.vline);
if (stime) *stime = ns_to_ktime(args.time[0]); if (stime) *stime = ns_to_ktime(args.time[0]);
if (etime) *etime = ns_to_ktime(args.time[1]); if (etime) *etime = ns_to_ktime(args.time[1]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment