Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci don't crash when we're not the console
details: https://anonhg.NetBSD.org/src/rev/b4bbebdeb7e9
branches: trunk
changeset: 781911:b4bbebdeb7e9
user: macallan <macallan%NetBSD.org@localhost>
date: Sat Oct 06 14:41:40 2012 +0000
description:
don't crash when we're not the console
diffstat:
sys/dev/pci/pm2fb.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diffs (47 lines):
diff -r 645629d1e18f -r b4bbebdeb7e9 sys/dev/pci/pm2fb.c
--- a/sys/dev/pci/pm2fb.c Sat Oct 06 14:38:06 2012 +0000
+++ b/sys/dev/pci/pm2fb.c Sat Oct 06 14:41:40 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pm2fb.c,v 1.20 2012/10/04 10:35:54 macallan Exp $ */
+/* $NetBSD: pm2fb.c,v 1.21 2012/10/06 14:41:40 macallan Exp $ */
/*
* Copyright (c) 2009, 2012 Michael Lorenz
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pm2fb.c,v 1.20 2012/10/04 10:35:54 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pm2fb.c,v 1.21 2012/10/06 14:41:40 macallan Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -128,6 +128,7 @@
uint8_t, uint8_t);
static void pm2fb_init(struct pm2fb_softc *);
+static inline void pm2fb_wait(struct pm2fb_softc *, int);
static void pm2fb_flush_engine(struct pm2fb_softc *);
static void pm2fb_rectfill(struct pm2fb_softc *, int, int, int, int,
uint32_t);
@@ -402,16 +403,16 @@
} else {
if (sc->sc_console_screen.scr_ri.ri_rows == 0) {
/* do some minimal setup to avoid weirdnesses later */
- glyphcache_init(&sc->sc_gc, sc->sc_height + 5,
+ vcons_init_screen(&sc->vd, &sc->sc_console_screen, 1,
+ &defattr);
+ }
+ glyphcache_init(&sc->sc_gc, sc->sc_height + 5,
min(2047, (sc->sc_fbsize / sc->sc_stride))
- sc->sc_height - 5,
sc->sc_width,
ri->ri_font->fontwidth,
ri->ri_font->fontheight,
defattr);
- vcons_init_screen(&sc->vd, &sc->sc_console_screen, 1,
- &defattr);
- }
}
j = 0;
Home |
Main Index |
Thread Index |
Old Index