summaryrefslogtreecommitdiff
path: root/sys/dev/isa
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2009-08-12 15:58:32 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2009-08-12 15:58:32 +0000
commit71c1c313d7a054c7699c03b66e1e598b1d7ae5b0 (patch)
treed17455d7161d214f4928b32f2075317054f5aa49 /sys/dev/isa
parentb6c1a50d5d1b9d2bb2a9081166fcae595ab222e6 (diff)
Backing store for ega and vga virtual console is not allocated until the
second vc is created. However, it was allocated using the geometry of the second vc to allocate backing store for the first. Be sure to use the proper values in case geometries differ.
Diffstat (limited to 'sys/dev/isa')
-rw-r--r--sys/dev/isa/ega.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/isa/ega.c b/sys/dev/isa/ega.c
index 3fcda238a0f..2790cb02c52 100644
--- a/sys/dev/isa/ega.c
+++ b/sys/dev/isa/ega.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ega.c,v 1.13 2009/03/29 21:53:52 sthen Exp $ */
+/* $OpenBSD: ega.c,v 1.14 2009/08/12 15:58:31 miod Exp $ */
/* $NetBSD: ega.c,v 1.4.4.1 2000/06/30 16:27:47 simonb Exp $ */
/*
@@ -622,8 +622,10 @@ ega_alloc_screen(v, type, cookiep, curxp, curyp, defattrp)
* for the first one too.
* XXX We could be more clever and use video RAM.
*/
- LIST_FIRST(&vc->screens)->pcs.mem =
- malloc(type->ncols * type->nrows * 2, M_DEVBUF, M_WAITOK);
+ scr = LIST_FIRST(&vs->screens);
+ scr->pcs.mem =
+ malloc(scr->pcs.type->ncols * scr->pcs.type->nrows * 2,
+ M_DEVBUF, M_WAITOK);
}
scr = malloc(sizeof(struct egascreen), M_DEVBUF, M_WAITOK);