CVSROOT: /cvs Module name: src Changes by: o...@cvs.openbsd.org 2010/03/30 11:40:55
Modified files: sys/arch/arm/xscale: pxa2x0_apm.c sys/arch/i386/i386: apm.c sys/arch/zaurus/dev: zaurus_apm.c sys/dev/acpi : acpi.c sys/dev/wscons : wsdisplay.c wsdisplayvar.h Log message: Prevent the apmd/x races for good. When we hit suspend time, go through all wsdisplays on the system. if they are in mode MAPPED, but not MODE_DUMBFB then if possible do a full vt switch to a !mapped vt, and prevent switching back until resume time. This has to be called from MD code because this involves userland running so that X can run the vt switch signal handler. This way, any case where we are using the "poke registers from userland" model, we will not be on the hardware when we go down, so the kernel can actually handle thing properly. Tested on several acpi laptops (by kettenis@ and ian@), x40 (me and beck@ at LEAST) and zaurus (me). Maybe others, but if so I forgot who at this time.. Idea from deraadt somewhere over the Faroe Islands (I thought of a similar thing myself a while ago). Much prompting from him. Ok and comments miod@