Module Name: src
Committed By: macallan
Date: Fri Aug 3 01:23:33 UTC 2012
Modified Files:
src/sys/dev/pci: machfb.c
Log Message:
machfb's memsize is in MB, glyphcache_init expects bytes. doh.
To generate a diff of this commit:
cvs rdiff -u -r1.79 -r1.80 src/sys/dev/pci/machfb.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/pci/machfb.c
diff -u src/sys/dev/pci/machfb.c:1.79 src/sys/dev/pci/machfb.c:1.80
--- src/sys/dev/pci/machfb.c:1.79 Thu Aug 2 00:17:44 2012
+++ src/sys/dev/pci/machfb.c Fri Aug 3 01:23:32 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: machfb.c,v 1.79 2012/08/02 00:17:44 macallan Exp $ */
+/* $NetBSD: machfb.c,v 1.80 2012/08/03 01:23:32 macallan Exp $ */
/*
* Copyright (c) 2002 Bang Jun-Young
@@ -34,7 +34,7 @@
#include <sys/cdefs.h>
__KERNEL_RCSID(0,
- "$NetBSD: machfb.c,v 1.79 2012/08/02 00:17:44 macallan Exp $");
+ "$NetBSD: machfb.c,v 1.80 2012/08/03 01:23:32 macallan Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -774,13 +774,12 @@ mach64_attach(device_t parent, device_t
mach64_defaultscreen.nrows = ri->ri_rows;
mach64_defaultscreen.ncols = ri->ri_cols;
glyphcache_init(&sc->sc_gc, sc->sc_my_mode->vdisplay + 5,
- (sc->memsize / sc->sc_my_mode->hdisplay) -
- sc->sc_my_mode->vdisplay - 5,
- sc->sc_my_mode->hdisplay,
- ri->ri_font->fontwidth,
- ri->ri_font->fontheight,
- defattr);
-
+ ((sc->memsize * 1024 * 1024) / sc->sc_my_mode->hdisplay) -
+ sc->sc_my_mode->vdisplay - 5,
+ sc->sc_my_mode->hdisplay,
+ ri->ri_font->fontwidth,
+ ri->ri_font->fontheight,
+ defattr);
wsdisplay_cnattach(&mach64_defaultscreen, ri, 0, 0, defattr);
} else {
/*
@@ -795,12 +794,12 @@ mach64_attach(device_t parent, device_t
}
glyphcache_init(&sc->sc_gc, sc->sc_my_mode->vdisplay + 5,
- (sc->memsize / sc->sc_my_mode->hdisplay) -
- sc->sc_my_mode->vdisplay - 5,
- sc->sc_my_mode->hdisplay,
- ri->ri_font->fontwidth,
- ri->ri_font->fontheight,
- defattr);
+ ((sc->memsize * 1024 * 1024) / sc->sc_my_mode->hdisplay) -
+ sc->sc_my_mode->vdisplay - 5,
+ sc->sc_my_mode->hdisplay,
+ ri->ri_font->fontwidth,
+ ri->ri_font->fontheight,
+ defattr);
}
sc->sc_bg = mach64_console_screen.scr_ri.ri_devcmap[WS_DEFAULT_BG];