On Sun, 23 Sep 2001, Matthias Dahl wrote:

>  Now what confuses me is that I thought it isn't possible to get the retrace
>  information in user space - just in kernel space. I guess this is only true
>  if you want to make use of the hardware interrupt that is being issued (and
>  naturally that would be the best solution IMHO).

   You can do it from user space by polling, which isn't a solution
because you can easily eat up all your CPU.  Most hardware double buffer
their registers and the updates only go into effect at the retrace.
At least Intel, NVIDIA and ATI do that.  You only have to stall when 
you get ahead.  For frame rates lower than the refresh rate you'll
never get stuck polling.

>  
>  But I still think there should be an official way (through the kernel space
>  drm drivers for example) to get that information and handle it in the right
>  functions (for example  XvPutImage)  by  implementing  an  optional  double
>  buffering that is only used if a) retrace information is available  and  b)
>  if the programmer explicitly asked for the feature.

  NVIDIA's drivers (both "nv" and "nvidia") sync to the retrace by default  
for Xv(Shm)PutImage.  It can be turned off with the XV_DOUBLE_BUFFER port 
attribute.   I chose not to stall when clients send data quicker than
the retrace but stop worrying about syncing instead. 


                                Mark.

_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert

Reply via email to