Module Name:    src
Committed By:   macallan
Date:           Thu Apr 19 09:03:02 UTC 2012

Modified Files:
        src/sys/dev/pci/voyager: voyagerfb.c

Log Message:
glyphcache_init() works best with its parameters in the right order. Doh.
While there request an RGB devcmap.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/dev/pci/voyager/voyagerfb.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/voyager/voyagerfb.c
diff -u src/sys/dev/pci/voyager/voyagerfb.c:1.19 src/sys/dev/pci/voyager/voyagerfb.c:1.20
--- src/sys/dev/pci/voyager/voyagerfb.c:1.19	Tue Mar 20 14:59:36 2012
+++ src/sys/dev/pci/voyager/voyagerfb.c	Thu Apr 19 09:03:01 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: voyagerfb.c,v 1.19 2012/03/20 14:59:36 macallan Exp $	*/
+/*	$NetBSD: voyagerfb.c,v 1.20 2012/04/19 09:03:01 macallan Exp $	*/
 
 /*
  * Copyright (c) 2009, 2011 Michael Lorenz
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: voyagerfb.c,v 1.19 2012/03/20 14:59:36 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: voyagerfb.c,v 1.20 2012/04/19 09:03:01 macallan Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -297,8 +297,8 @@ voyagerfb_attach(device_t parent, device
 		(*ri->ri_ops.allocattr)(ri, 0, 0, 0, &defattr);
 	}
 	glyphcache_init(&sc->sc_gc, sc->sc_height,
-			sc->sc_width,
 			(sc->sc_fbsize / sc->sc_stride) - sc->sc_height,
+			sc->sc_width,
 			ri->ri_font->fontwidth,
 			ri->ri_font->fontheight,
 			defattr);
@@ -548,10 +548,19 @@ voyagerfb_init_screen(void *cookie, stru
 	if (existing) {
 		ri->ri_flg |= RI_CLEAR;
 	}
+
+	if (sc->sc_depth == 32) {
 #ifdef VOYAGERFB_ANTIALIAS
-	if (sc->sc_depth == 32)
 		ri->ri_flg |= RI_ENABLE_ALPHA;
 #endif
+		/* we always run in RGB */
+		ri->ri_rnum = 8;
+		ri->ri_gnum = 8;
+		ri->ri_bnum = 8;
+		ri->ri_rpos = 16;
+		ri->ri_gpos = 8;
+		ri->ri_bpos = 0;
+	}
 
 	rasops_init(ri, 0, 0);
 	ri->ri_caps = WSSCREEN_WSCOLORS;

Reply via email to