Synchronization with CRT refresh

Felix Schulte felix.schulte at gmail.com
Tue May 3 11:01:00 PDT 2005


On 5/3/05, Adam Jackson <ajax at nwnk.net> wrote:
> 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();
Roland's proposal for Vectormaps may be better. You only wait for the
vsync event and  then let the vectormap (1 XCopyArea() instruction on
wire) do all the drawing.

-- 
      _        Felix Schulte
    _|_|_     mailto:felix.schulte at gmail.com
    (0 0)        
ooO--(_)--Ooo



More information about the xorg mailing list