freebsd-dev/sys/dev/vt
Andriy Gapon 85f95fffd7 hook userland threads suspend + resume into acpi suspend code
Also, split power_suspend into power_suspend and power_suspend_early.

power_suspend_early is called before the userland is frozen.
power_suspend is called after the userland is frozen.

Currently only VT switching is hooked to power_suspend_early.
This is needed because switching away from X server requires its
cooperation, so obviously X server must not be frozen when that happens.

Freezing userland during ACPI suspend is useful because not all drivers
correctly handle suspension concurrent with other activity.  This is
especially applicable to drivers ported from other operating systems
that suspend all software activity between placing drivers and hardware
into suspended state.
In particular drm2/radeon (radeonkms) depends on the described
procedure.  The driver does not have any internal synchronization
between suspension activities and processing of userland requests.

Many thanks to kib for the code that allows to freeze and thaw all
userland threads.

Note that ideally we also need to park / inhibit (non-special) kernel
threads as well to ensure that they do not call into drivers.

MFC after:	17 days
2015-01-27 17:33:18 +00:00
..
colors vt(4): Colors are indexed against a console palette, not a VGA palette 2014-08-10 17:04:10 +00:00
font vt(4): Rename the "mouse_cursor" structure to "vt_mouse_cursor" 2014-08-21 19:42:24 +00:00
hw vt(4): Use power_{suspend,resume} event handlers to implement 2015-01-27 15:28:46 +00:00
logo Remove stray whitespaces. 2014-09-12 14:07:20 +00:00
vt_buf.c vt(4): Adjust the cursor position after changing the window size 2014-11-01 17:05:15 +00:00
vt_consolectl.c Remove stray whitespaces. 2014-09-12 14:07:20 +00:00
vt_core.c hook userland threads suspend + resume into acpi suspend code 2015-01-27 17:33:18 +00:00
vt_font.c Increase vt(9) max glyph data to 1MB for CJK fonts with many glyphs 2014-01-01 19:38:15 +00:00
vt_sysmouse.c vt(4): Handle global and per-window mouse cursor toggle in one place 2014-08-21 13:04:34 +00:00
vt.h vt(4): Use power_{suspend,resume} event handlers to implement 2015-01-27 15:28:46 +00:00