On Wed, 17 Oct 2001, Billy Biggs wrote:
>
> To port this to the X world, maybe:
>
> o Can the driver tell me an exact value of the refresh rate? I bet
> most cards can. Does xvidtune display that information? It must
> get it from somewhere.
You can already get the refresh rate via the VidMode extension
but I'm not sure how accurate it is. The drivers rarely use the
exact clock frequency specified in the modeline. Any value the
driver would give you would only be as accurate as the clock on
the card, which I suspect is not very accurate.
> o Why would the timestamps from X be with only millisecond accuracy?
That's the accuracy of X's internal clock. I suspect we could
call get time of day and give it to you in microseconds since most
platforms support that. Those timestamps would have no relation
to X's normal times stamps like the ones in Events though.
> I'm sure most video cards can trigger an interrupt on the vertical
> refresh, that would be pretty accurate. Even if I could just query
Handling the interrupt requires kernel support. The X-server is
a user-space app.
> the state: am I during a refresh or not, and have an accurate
> timestamp for that, then I think I could probe this enough to get
> some notion of a reference point.
That won't work. You'll never be in the refresh. The X-server
won't even be scheduled most of the time.
The only thing that would be useful would be the scanline number
and a timestamp if we can give you something other than X's normal
millisecond time stamps, like the gettimeofday timeval.
Mark.
_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert