[PATCH 5/7] sync: if the idle time was reset, force alarms to trigger (#70476)

Peter Hutterer peter.hutterer at who-t.net
Thu Oct 17 20:42:12 PDT 2013


On Thu, Oct 17, 2013 at 03:55:29PM -0700, Keith Packard wrote:
> Peter Hutterer <peter.hutterer at who-t.net> writes:
> 
> > The time between the idle reset and the IdleTimeWakeupHandler to be called is
> > indeterminate. Clients with an PositiveTransition or NegativeTransition alarm
> > on a low threshold may miss an alarm.
> >
> > Work around this by keeping a reset flag for each device. When the
> > WakeupHandler triggers and the reset flag is set, we force a re-calculation of
> > everything and pretend the current idle time is zero. Immediately after is the
> > next calculation with the real idle time.
> >
> > Relatively reproducible test case: Set up a XSyncNegativeTransition alarm for
> > a threshold of 1 ms. May trigger, may not.
> >
> > X.Org Bug 70476 <http://bugs.freedesktop.org/show_bug.cgi?id=70476>
> 
> This all looks quite reasonable, although I would have declared the
> reset flag as Bool and used TRUE/FALSE everywhere instead of int 0/1.

amended locally, thanks.

Cheers,
   Peter

> 
> Reviewed-by: Keith Packard <keithp at keithp.com>
> 
> -- 
> keith.packard at intel.com




More information about the xorg-devel mailing list