Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/wsfb call vcons_replay_msgbuf()



details:   https://anonhg.NetBSD.org/src/rev/6e9bd5e8a8dd
branches:  trunk
changeset: 746797:6e9bd5e8a8dd
user:      macallan <macallan%NetBSD.org@localhost>
date:      Thu Aug 20 02:51:27 2009 +0000

description:
call vcons_replay_msgbuf()

diffstat:

 sys/dev/wsfb/genfb.c |  17 +++++++++++------
 1 files changed, 11 insertions(+), 6 deletions(-)

diffs (59 lines):

diff -r d87a100e787f -r 6e9bd5e8a8dd sys/dev/wsfb/genfb.c
--- a/sys/dev/wsfb/genfb.c      Thu Aug 20 02:49:30 2009 +0000
+++ b/sys/dev/wsfb/genfb.c      Thu Aug 20 02:51:27 2009 +0000
@@ -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]);
+               }
        }
 }
 



Home | Main Index | Thread Index | Old Index