[PATCH 0/9] per-device idle counters

Jamey Sharp jamey at minilop.net
Wed Mar 14 09:01:13 PDT 2012

This series seems like a good idea to me! I have a few review comments though:

Patch 1 seems strange. Shouldn't the counters themselves get freed at
reset? If they are, shouldn't that lead to the number of counters
reaching 0?

I guess the input ABI should get bumped for the patch that stores
per-device idle times. We decided to bump ABI more aggressively,

I haven't checked: is it possible to build xserver without SYNC, or to
disable it at runtime? If so, the final patch needs some conditionals,
I assume.

Here's a request you can ignore if you like: Please consider making
SYSCOUNTERPRIV a static inline instead of a macro, and removing the
cast from inside it. That'd be different from the usual idiom in the X
server, but the usual idiom is dumb. :-) I'd prefer to see all the
callers assign their "pointer pCounter"s to an appropriately-typed
local once right at the beginning of the function, which also serves
as documentation for what type you're supposed to pass in there.

The series looks fine generally; these are just minor details.


On 3/13/12, Peter Hutterer <peter.hutterer at who-t.net> wrote:
> We currently have one global idlecounter. This patch series adds additional
> counters named "DEVICEIDLETIME n" (where n is the device id) that apply to
> that device only.
> One use-case here is as syndaemon replacement. A client can simply put an
> idlecounter on the keyboard above the touchpad. When that keyboard goes out
> of idle, disable the touchpad, then re-enable when the keyboard goes idle
> again.
> Cheers,
>   Peter
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel

More information about the xorg-devel mailing list