Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci machfb's memsize is in MB, glyphcache_init expec...
details: https://anonhg.NetBSD.org/src/rev/6b32841a1fa8
branches: trunk
changeset: 780667:6b32841a1fa8
user: macallan <macallan%NetBSD.org@localhost>
date: Fri Aug 03 01:23:32 2012 +0000
description:
machfb's memsize is in MB, glyphcache_init expects bytes. doh.
diffstat:
sys/dev/pci/machfb.c | 29 ++++++++++++++---------------
1 files changed, 14 insertions(+), 15 deletions(-)
diffs (57 lines):
diff -r 9be311816b02 -r 6b32841a1fa8 sys/dev/pci/machfb.c
--- a/sys/dev/pci/machfb.c Thu Aug 02 20:13:24 2012 +0000
+++ b/sys/dev/pci/machfb.c Fri Aug 03 01:23:32 2012 +0000
@@ -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_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 @@
}
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];
Home |
Main Index |
Thread Index |
Old Index