summaryrefslogtreecommitdiff
path: root/sys/dev/ic/vga.c
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2010-08-08 17:21:08 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2010-08-08 17:21:08 +0000
commitaaa746a215e8737262be3bc9291170911ed5fa68 (patch)
treee5583e2b6d2cdaffc5282af4024279b18ea5cf18 /sys/dev/ic/vga.c
parentfbb1d5ba236b30f2accaa83aa69118a5ec56fe6b (diff)
Try to save the vga hardware state around suspend, and also redisplay the
textmode video memory contents if we had to POST the vga bios. ok deraadt@ kettenis@
Diffstat (limited to 'sys/dev/ic/vga.c')
-rw-r--r--sys/dev/ic/vga.c30
1 files changed, 7 insertions, 23 deletions
diff --git a/sys/dev/ic/vga.c b/sys/dev/ic/vga.c
index f351b216f9b..af6374c1cf1 100644
--- a/sys/dev/ic/vga.c
+++ b/sys/dev/ic/vga.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vga.c,v 1.52 2009/09/05 14:09:35 miod Exp $ */
+/* $OpenBSD: vga.c,v 1.53 2010/08/08 17:21:05 miod Exp $ */
/* $NetBSD: vga.c,v 1.28.2.1 2000/06/30 16:27:47 simonb Exp $ */
/*-
@@ -96,21 +96,6 @@ static struct vgafont {
0
};
-struct vgascreen {
- struct pcdisplayscreen pcs;
-
- LIST_ENTRY(vgascreen) next;
-
- struct vga_config *cfg;
-
- /* videostate */
- struct vgafont *fontset1, *fontset2;
- /* font data */
-
- int mindispoffset, maxdispoffset;
- int vga_rollover;
-};
-
int vgaconsole, vga_console_type, vga_console_attached;
struct vgascreen vga_console_screen;
struct vga_config vga_console_vc;
@@ -522,9 +507,6 @@ vga_init(vc, iot, memt)
LIST_INIT(&vc->screens);
vc->active = NULL;
vc->currenttype = vh->vh_mono ? &vga_stdscreen_mono : &vga_stdscreen;
-#if 0
- callout_init(&vc->vc_switch_callout);
-#endif
vc->vc_fonts[0] = &vga_builtinfont;
for (i = 1; i < 8; i++)
@@ -535,16 +517,16 @@ vga_init(vc, iot, memt)
vga_save_palette(vc);
}
-void
+struct vga_config *
vga_common_attach(self, iot, memt, type)
struct device *self;
bus_space_tag_t iot, memt;
int type;
{
- vga_extended_attach(self, iot, memt, type, NULL);
+ return vga_extended_attach(self, iot, memt, type, NULL);
}
-void
+struct vga_config *
vga_extended_attach(self, iot, memt, type, map)
struct device *self;
bus_space_tag_t iot, memt;
@@ -563,7 +545,7 @@ vga_extended_attach(self, iot, memt, type, map)
} else {
vc = malloc(sizeof(*vc), M_DEVBUF, M_NOWAIT | M_ZERO);
if (vc == NULL)
- return;
+ return NULL;
vga_init(vc, iot, memt);
}
@@ -578,6 +560,8 @@ vga_extended_attach(self, iot, memt, type, map)
aa.defaultscreens = 0;
config_found_sm(self, &aa, wsemuldisplaydevprint, displaysubmatch);
+
+ return vc;
}
int