search for: nv50_disp_get_scanoutpos

Displaying 1 result from an estimated 1 matches for "nv50_disp_get_scanoutpos".

2013 Aug 12
0
[RFC PATCH] drm/nv50-nvd0: implement precise vblank timing support on nv50/nvc0.
...veau/core/engine/disp/nv50.c @@ -1285,6 +1285,57 @@ nv50_disp_intr(struct nouveau_subdev *subdev) } } +u32 nv50_disp_get_vblank_count(struct nouveau_disp *disp, int head) +{ + if (head < 0 || head >= 2) + return 0; + + return nv_rd32(disp, 0x616340 + head * 0x800) >> 16; +} + +int nv50_disp_get_scanoutpos(struct nouveau_disp *disp, int head, int *vpos, int *hpos) +{ + u32 reg, vbias, hbias, vbl_start, vbl_end, hline, vline; + + if (head < 0 || head >= 2) + return -1; + + reg = nv_rd32(disp, 0x610ae8 + head * 4); + vbias = reg >> 16; + hbias = reg & 0xffff; + + vbl_start = nv_rd32(di...