Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci use vcons_replay_msgbuf() when appropriate



details:   https://anonhg.NetBSD.org/src/rev/5e8d004a3a38
branches:  trunk
changeset: 746795:5e8d004a3a38
user:      macallan <macallan%NetBSD.org@localhost>
date:      Thu Aug 20 02:40:57 2009 +0000

description:
use vcons_replay_msgbuf() when appropriate

diffstat:

 sys/dev/pci/chipsfb.c   |   7 +++++--
 sys/dev/pci/r128fb.c    |  46 +++++++++++++++++++++++-----------------------
 sys/dev/pci/voodoofb.c  |   6 ++++--
 sys/dev/pci/voyagerfb.c |   7 +++++--
 4 files changed, 37 insertions(+), 29 deletions(-)

diffs (157 lines):

diff -r 73ce4a2595a2 -r 5e8d004a3a38 sys/dev/pci/chipsfb.c
--- a/sys/dev/pci/chipsfb.c     Thu Aug 20 02:29:16 2009 +0000
+++ b/sys/dev/pci/chipsfb.c     Thu Aug 20 02:40:57 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: chipsfb.c,v 1.19 2009/05/12 08:23:00 cegger Exp $      */
+/*     $NetBSD: chipsfb.c,v 1.20 2009/08/20 02:40:57 macallan Exp $    */
 
 /*
  * Copyright (c) 2006 Michael Lorenz
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: chipsfb.c,v 1.19 2009/05/12 08:23:00 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: chipsfb.c,v 1.20 2009/08/20 02:40:57 macallan Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -372,6 +372,9 @@
        sc->sc_bg = ri->ri_devcmap[bg];
        chipsfb_clearscreen(sc);
 
+       if (console)
+               vcons_replay_msgbuf(&chipsfb_console_screen);
+
        aprint_normal_dev(&sc->sc_dev, "%d MB aperture, %d MB VRAM at 0x%08x\n",
            (u_int)(sc->sc_fbsize >> 20),
            sc->memsize >> 20, (u_int)sc->sc_fb);
diff -r 73ce4a2595a2 -r 5e8d004a3a38 sys/dev/pci/r128fb.c
--- a/sys/dev/pci/r128fb.c      Thu Aug 20 02:29:16 2009 +0000
+++ b/sys/dev/pci/r128fb.c      Thu Aug 20 02:40:57 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: r128fb.c,v 1.8 2009/05/06 18:41:54 elad Exp $  */
+/*     $NetBSD: r128fb.c,v 1.9 2009/08/20 02:40:57 macallan Exp $      */
 
 /*
  * Copyright (c) 2007 Michael Lorenz
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: r128fb.c,v 1.8 2009/05/06 18:41:54 elad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: r128fb.c,v 1.9 2009/08/20 02:40:57 macallan Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -265,25 +265,6 @@
 
        ri = &sc->sc_console_screen.scr_ri;
 
-       if (is_console) {
-               vcons_init_screen(&sc->vd, &sc->sc_console_screen, 1,
-                   &defattr);
-               sc->sc_console_screen.scr_flags |= VCONS_SCREEN_IS_STATIC;
-
-               sc->sc_defaultscreen_descr.textops = &ri->ri_ops;
-               sc->sc_defaultscreen_descr.capabilities = ri->ri_caps;
-               sc->sc_defaultscreen_descr.nrows = ri->ri_rows;
-               sc->sc_defaultscreen_descr.ncols = ri->ri_cols;
-               wsdisplay_cnattach(&sc->sc_defaultscreen_descr, ri, 0, 0,
-                   defattr);
-       } else {
-               /*
-                * since we're not the console we can postpone the rest
-                * until someone actually allocates a screen for us
-                */
-               (*ri->ri_ops.allocattr)(ri, 0, 0, 0, &defattr);
-       }
-
        j = 0;
        for (i = 0; i < (1 << sc->sc_depth); i++) {
 
@@ -295,8 +276,27 @@
                j += 3;
        }
 
-       r128fb_rectfill(sc, 0, 0, sc->sc_width, sc->sc_height,
-           ri->ri_devcmap[(defattr >> 16) & 0xff]);
+       if (is_console) {
+               vcons_init_screen(&sc->vd, &sc->sc_console_screen, 1,
+                   &defattr);
+               sc->sc_console_screen.scr_flags |= VCONS_SCREEN_IS_STATIC;
+
+               r128fb_rectfill(sc, 0, 0, sc->sc_width, sc->sc_height,
+                   ri->ri_devcmap[(defattr >> 16) & 0xff]);
+               sc->sc_defaultscreen_descr.textops = &ri->ri_ops;
+               sc->sc_defaultscreen_descr.capabilities = ri->ri_caps;
+               sc->sc_defaultscreen_descr.nrows = ri->ri_rows;
+               sc->sc_defaultscreen_descr.ncols = ri->ri_cols;
+               wsdisplay_cnattach(&sc->sc_defaultscreen_descr, ri, 0, 0,
+                   defattr);
+               vcons_replay_msgbuf(&sc->sc_console_screen);
+       } else {
+               /*
+                * since we're not the console we can postpone the rest
+                * until someone actually allocates a screen for us
+                */
+               (*ri->ri_ops.allocattr)(ri, 0, 0, 0, &defattr);
+       }
 
        aa.console = is_console;
        aa.scrdata = &sc->sc_screenlist;
diff -r 73ce4a2595a2 -r 5e8d004a3a38 sys/dev/pci/voodoofb.c
--- a/sys/dev/pci/voodoofb.c    Thu Aug 20 02:29:16 2009 +0000
+++ b/sys/dev/pci/voodoofb.c    Thu Aug 20 02:40:57 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: voodoofb.c,v 1.19 2009/05/06 18:41:54 elad Exp $       */
+/*     $NetBSD: voodoofb.c,v 1.20 2009/08/20 02:40:57 macallan Exp $   */
 
 /*
  * Copyright (c) 2005, 2006 Michael Lorenz
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: voodoofb.c,v 1.19 2009/05/06 18:41:54 elad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: voodoofb.c,v 1.20 2009/08/20 02:40:57 macallan Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -451,6 +451,8 @@
        sc->sc_bg = ri->ri_devcmap[bg];
        voodoofb_clearscreen(sc);
 
+       if (console)
+               vcons_replay_msgbuf(&voodoofb_console_screen);
        aa.console = console;
        aa.scrdata = &voodoofb_screenlist;
        aa.accessops = &voodoofb_accessops;
diff -r 73ce4a2595a2 -r 5e8d004a3a38 sys/dev/pci/voyagerfb.c
--- a/sys/dev/pci/voyagerfb.c   Thu Aug 20 02:29:16 2009 +0000
+++ b/sys/dev/pci/voyagerfb.c   Thu Aug 20 02:40:57 2009 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: voyagerfb.c,v 1.1 2009/08/12 19:28:00 macallan Exp $   */
+/*     $NetBSD: voyagerfb.c,v 1.2 2009/08/20 02:40:57 macallan Exp $   */
 
 /*
  * Copyright (c) 2009 Michael Lorenz
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: voyagerfb.c,v 1.1 2009/08/12 19:28:00 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: voyagerfb.c,v 1.2 2009/08/20 02:40:57 macallan Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -296,6 +296,9 @@
        voyagerfb_rectfill(sc, 0, 0, sc->sc_width, sc->sc_height,
            ri->ri_devcmap[(defattr >> 16) & 0xff]);
 
+       if (is_console)
+               vcons_replay_msgbuf(&sc->sc_console_screen);
+
        aa.console = is_console;
        aa.scrdata = &sc->sc_screenlist;
        aa.accessops = &voyagerfb_accessops;



Home | Main Index | Thread Index | Old Index