Module Name:    src
Committed By:   macallan
Date:           Thu Aug 20 02:51:27 UTC 2009

Modified Files:
        src/sys/dev/wsfb: genfb.c

Log Message:
call vcons_replay_msgbuf()


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/dev/wsfb/genfb.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/wsfb/genfb.c
diff -u src/sys/dev/wsfb/genfb.c:1.26 src/sys/dev/wsfb/genfb.c:1.27
--- src/sys/dev/wsfb/genfb.c:1.26	Sat Feb 21 17:24:47 2009
+++ src/sys/dev/wsfb/genfb.c	Thu Aug 20 02:51:27 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: genfb.c,v 1.26 2009/02/21 17:24:47 christos Exp $ */
+/*	$NetBSD: genfb.c,v 1.27 2009/08/20 02:51:27 macallan Exp $ */
 
 /*-
  * Copyright (c) 2007 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: genfb.c,v 1.26 2009/02/21 17:24:47 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genfb.c,v 1.27 2009/08/20 02:51:27 macallan Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -211,7 +211,7 @@
 		(*ri->ri_ops.eraserows)(ri, 0, ri->ri_rows, defattr);
 
 	j = 0;
-	for (i = 0; i < (1 << sc->sc_depth); i++) {
+	for (i = 0; i < min(1 << sc->sc_depth, 256); i++) {
 
 		sc->sc_cmap_red[i] = rasops_cmap[j];
 		sc->sc_cmap_green[i] = rasops_cmap[j + 1];
@@ -221,6 +221,8 @@
 		j += 3;
 	}
 
+	vcons_replay_msgbuf(&sc->sc_console_screen);
+
 	if (genfb_softc == NULL)
 		genfb_softc = sc;
 
@@ -338,6 +340,7 @@
 	rasops_reconfig(ri, sc->sc_height / ri->ri_font->fontheight,
 		    sc->sc_width / ri->ri_font->fontwidth);
 
+	/* TODO: actually center output */
 	ri->ri_hw = scr;
 }
 
@@ -410,9 +413,11 @@
 {
 	int i;
 
-	for (i = 0; i < (1 << sc->sc_depth); i++) {
-		genfb_putpalreg(sc, i, sc->sc_cmap_red[i],
-		    sc->sc_cmap_green[i], sc->sc_cmap_blue[i]);
+	if (sc->sc_depth <= 8) {
+		for (i = 0; i < (1 << sc->sc_depth); i++) {
+			genfb_putpalreg(sc, i, sc->sc_cmap_red[i],
+			    sc->sc_cmap_green[i], sc->sc_cmap_blue[i]);
+		}
 	}
 }
 

Reply via email to