Synchronization with CRT refresh
Adam Jackson
ajax at nwnk.net
Tue May 3 08:58:12 PDT 2005
On Tuesday 03 May 2005 11:02, Jim Gettys wrote:
> Unfortunately, this has never been implemented on Linux.
>
> Volunteers gratefully accepted...
I looked at doing this for i128 a while ago, and there's a few issues involved
in getting it right. The simple first one is actually wiring up the sync
counter from the driver, afaict there's no existing driver infrastructure for
this. Is there any sample implementation of a driver that exports a sync
counter?
There's an issue on multi-card servers: how do you determine which sync
counter to use? Key off the screen number, I suppose. Now think about
Xinerama systems, you can have two refresh rates per screen, and they might
never properly sync. Eew. Guess you'll just flicker when moving across the
Xinerama boundary. (Although in the compmgr case this doesn't happen.)
Either way you need a convention for naming these counters.
It wasn't entirely clear to me from reading the spec what the semantics are
for syncing. Is it: server gets sync notification from hardware, pokes
clients, clients draw in a mad rush, server blasts stuff to screen hoping
we're still in the vblank time? That would be terrible, but it looks like
that's what XSyncAwait does.
I was hoping for something more along the lines of: clients queue operations
to the server with an associated counter value, server holds these as display
lists and fires them on vblank. If nothing else, this lets you meaningfully
vsync clients running on remote hosts (where the round trip latency exceeds
the vblank interval). If all your clients are on the local machine the mad
dash approach might work, but.
So basically I want:
XSyncBegin(trigger_type);
XPutImage(blah);
XSyncEnd();
Finally just as a trivial note, it's not clear to me how to express the idiom
of "wait for the next increment of this counter, without caring what its
value is". For simple apps where you don't care about getting animation
exactly timed, this is precisely the vsync semantics you want.
Am I totally misinformed here?
- ajax
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20050503/d5a3140a/attachment.pgp>
More information about the xorg
mailing list