Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci glyphcache_init() works much better with its par...
details: https://anonhg.NetBSD.org/src/rev/b5307d3912b9
branches: trunk
changeset: 778893:b5307d3912b9
user: macallan <macallan%NetBSD.org@localhost>
date: Thu Apr 19 08:59:42 2012 +0000
description:
glyphcache_init() works much better with its parameters in the right order
diffstat:
sys/dev/pci/r128fb.c | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
diffs (53 lines):
diff -r 207cf917b5eb -r b5307d3912b9 sys/dev/pci/r128fb.c
--- a/sys/dev/pci/r128fb.c Thu Apr 19 08:46:17 2012 +0000
+++ b/sys/dev/pci/r128fb.c Thu Apr 19 08:59:42 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: r128fb.c,v 1.33 2012/04/19 06:58:55 macallan Exp $ */
+/* $NetBSD: r128fb.c,v 1.34 2012/04/19 08:59:42 macallan Exp $ */
/*
* Copyright (c) 2007 Michael Lorenz
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: r128fb.c,v 1.33 2012/04/19 06:58:55 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: r128fb.c,v 1.34 2012/04/19 08:59:42 macallan Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -224,6 +224,12 @@
aprint_error("%s: no height property\n", device_xname(self));
return;
}
+
+#ifdef GLYPHCACHE_DEBUG
+ /* leave some visible VRAM unused so we can see the glyph cache */
+ sc->sc_height -= 100;
+#endif
+
if (!prop_dictionary_get_uint32(dict, "depth", &sc->sc_depth)) {
aprint_error("%s: no depth property\n", device_xname(self));
return;
@@ -288,8 +294,8 @@
sc->sc_defaultscreen_descr.nrows = ri->ri_rows;
sc->sc_defaultscreen_descr.ncols = ri->ri_cols;
glyphcache_init(&sc->sc_gc, sc->sc_height + 5,
+ (0x800000 / sc->sc_stride) - sc->sc_height - 5,
sc->sc_width,
- (0x800000 / sc->sc_stride) - sc->sc_height - 5,
ri->ri_font->fontwidth,
ri->ri_font->fontheight,
defattr);
@@ -302,9 +308,9 @@
* until someone actually allocates a screen for us
*/
(*ri->ri_ops.allocattr)(ri, 0, 0, 0, &defattr);
- glyphcache_init(&sc->sc_gc, sc->sc_height,
+ glyphcache_init(&sc->sc_gc, sc->sc_height + 5,
+ (0x800000 / sc->sc_stride) - sc->sc_height - 5,
sc->sc_width,
- (0x800000 / sc->sc_stride) - sc->sc_height,
ri->ri_font->fontwidth,
ri->ri_font->fontheight,
defattr);
Home |
Main Index |
Thread Index |
Old Index