-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jesse Barnes wrote: > We've had some IRC and off-list discussions about how to improve the > DRM's vblank code to be a bit more power friendly. The core requirement > is that we only enable vblank interrupts when a client is actually waiting > for a vblank event (be it a signal or a wakeup). > > This patch updates the DRM core, requiring drivers to provide vblank > enable and disable hooks, as well as a counter updater, and adds some > i915 code to use it. > > When the DRM vblank code is called, the core will update the counter, > add the desired sequence value to it, and either setup a signal or > wait for the desired sequence number to be hit, enabling vblanks around > the operation. Once complete, vblank interrupts will again be disabled > to save power. > > The patch doesn't yet deal with two obvious cases (and probably more > that I'm missing, it's untested yet): > - the hardware counter resets on mode switch, we need to rebase > the appropriate last_counter at that point so it's not treated as > a counter wrap > - a client interested in signals but also blocked on a vblank event > may cause vblanks to be disabled if it received signal at the wrong > time > > I'll be happy to fix it up and/or restructure as requested. I think the > basic approach should be fairly sound (even devices that don't support a > counter register could fake it using total time/vrefresh or similar), but > if not I'd love to hear about it. :)
The problem is that a few of the GLX extensions (e.g., GLX_SGI_video_sync and GLX_OML_sync_control) allow applications to query the vblank counter directly. I don't know of other hardware that maintains an actual counter. I know that MGA doesn't, and I'm pretty sure that Via doesn't either. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQFGbZEVX1gOwKyEAw8RAhh/AJwJYPPFgeYeZ/1MaJg2aw4MT9kvmQCfU5+N IhDQvXWW/4s270aXLm+KzRU= =cdp9 -----END PGP SIGNATURE----- ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ -- _______________________________________________ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel