diff options
author | Andriy Gapon <avg@FreeBSD.org> | 2015-01-27 15:28:46 +0000 |
---|---|---|
committer | Andriy Gapon <avg@FreeBSD.org> | 2015-01-27 15:28:46 +0000 |
commit | 6dfa4578d6458c9531a1b1d9a17563f78751ec38 (patch) | |
tree | 36dbe096d99a8bf61a83acd0afff2656a27318d4 /sys/dev/fb | |
parent | cda374fe00a687b28ce979ad4aa8c59ae8c06c10 (diff) | |
download | src-6dfa4578d6458c9531a1b1d9a17563f78751ec38.tar.gz src-6dfa4578d6458c9531a1b1d9a17563f78751ec38.zip |
vt(4): Use power_{suspend,resume} event handlers to implement
suspend/resume
The goal is to avoid that the vt(4) resume happens before the video
display is resumed. The original patch was provided by Andriy Gapon.
This new patch registers the handlers in vt_upgrade(). This is done
once, thanks to the VDF_ASYNC flag. I abused this flag because it was
already abused by the keyboard allocation. The event handlers then call
the backend if it provides callbacks for suspend/resume.
Differential Revision: https://reviews.freebsd.org/D1004
On behalf of: dumbbell
MFC after: 2 weeks
Notes
Notes:
svn path=/head/; revision=277795
Diffstat (limited to 'sys/dev/fb')
-rw-r--r-- | sys/dev/fb/fbd.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/sys/dev/fb/fbd.c b/sys/dev/fb/fbd.c index ff2488d537c6..6bd5766543b5 100644 --- a/sys/dev/fb/fbd.c +++ b/sys/dev/fb/fbd.c @@ -332,22 +332,6 @@ fbd_detach(device_t dev) return (err); } -static int -fbd_suspend(device_t dev) -{ - - vt_fb_suspend(); - return (bus_generic_suspend(dev)); -} - -static int -fbd_resume(device_t dev) -{ - - vt_fb_resume(); - return (bus_generic_resume(dev)); -} - static device_method_t fbd_methods[] = { /* Device interface */ DEVMETHOD(device_probe, fbd_probe), @@ -355,8 +339,6 @@ static device_method_t fbd_methods[] = { DEVMETHOD(device_detach, fbd_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), - DEVMETHOD(device_suspend, fbd_suspend), - DEVMETHOD(device_resume, fbd_resume), { 0, 0 } }; |