CVSROOT:        /cvs
Module name:    src
Changes by:     [email protected]    2009/02/26 10:19:47

Modified files:
        sys/arch/amd64/include: apmvar.h 
        sys/arch/arm/include: apmvar.h 
        sys/arch/arm/xscale: pxa2x0_apm.c 
        sys/arch/i386/i386: apm.c 
        sys/arch/i386/include: apmvar.h 
        sys/arch/macppc/dev: apm.c 
        sys/arch/macppc/include: apmvar.h 
        sys/arch/sparc/dev: tctrl.c 
        sys/arch/sparc/include: apmvar.h 
        sys/arch/sparc64/include: apmvar.h 

Log message:
Add a two new ioctls to the apm(4) interface.

APM_IOC_{SUSPEND,STANDBY}_REQ: This is to fix an issue with apm suspend
where a call to zzz suspended the machine immediately, not giving anyone
listening for apm events (other than apmd) a chance to deal with the
upcoming change. This hit X hard since the introduction of drm, since it
needs to have time to idle the 3d engine and otherwise get the device
into a recoverable state. Such things are needed until we support
modesetting in the kernel.

Now, instead of forcing a suspend, using ioctl sends out an event similar
to if you had put the lid down, giving all userland applications a
chance to reply.

tested by sthen@ and beck@, especial thanks to sthen for sitting there
while I tried to debug this remotely, I owe him beer.

Prompted by and ok deraadt@

Reply via email to