summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2009-12-15 19:58:23 +0000
committerjkim <jkim@FreeBSD.org>2009-12-15 19:58:23 +0000
commit59d89f70e970921e538ee7c0061e56d31e26a121 (patch)
tree5cc3829ce1a1e3b6e1ca327c3cb351ced4621f5b /sys
parent38b08bc77904d09e711cd0d6d27ed8e88f11b92c (diff)
downloadFreeBSD-src-59d89f70e970921e538ee7c0061e56d31e26a121.zip
FreeBSD-src-59d89f70e970921e538ee7c0061e56d31e26a121.tar.gz
Attach dpms(4) to vgapm and make sure to restore DPMS state after
VGA is resumed properly. Reviewed by: jhb
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/dpms/dpms.c5
-rw-r--r--sys/isa/vga_isa.c3
2 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/dpms/dpms.c b/sys/dev/dpms/dpms.c
index 60aafc6..fdfed2f 100644
--- a/sys/dev/dpms/dpms.c
+++ b/sys/dev/dpms/dpms.c
@@ -118,15 +118,14 @@ static driver_t dpms_driver = {
static devclass_t dpms_devclass;
-DRIVER_MODULE(dpms, vgapci, dpms_driver, dpms_devclass, NULL, NULL);
+DRIVER_MODULE(dpms, vgapm, dpms_driver, dpms_devclass, NULL, NULL);
MODULE_DEPEND(dpms, x86bios, 1, 1, 1);
static void
dpms_identify(driver_t *driver, device_t parent)
{
- if (device_get_flags(parent) != 0 &&
- x86bios_match_device(0xc0000, parent))
+ if (x86bios_match_device(0xc0000, device_get_parent(parent)))
device_add_child(parent, "dpms", 0);
}
diff --git a/sys/isa/vga_isa.c b/sys/isa/vga_isa.c
index 96336d9..f9b2630 100644
--- a/sys/isa/vga_isa.c
+++ b/sys/isa/vga_isa.c
@@ -328,6 +328,9 @@ static int
vgapm_attach(device_t dev)
{
+ bus_generic_probe(dev);
+ bus_generic_attach(dev);
+
return (0);
}
OpenPOWER on IntegriCloud