Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci/voyager rearrange things a little bit to avoid s...



details:   https://anonhg.NetBSD.org/src/rev/3dbedda1926b
branches:  trunk
changeset: 785551:3dbedda1926b
user:      macallan <macallan%NetBSD.org@localhost>
date:      Tue Mar 19 16:49:56 2013 +0000

description:
rearrange things a little bit to avoid showing garbled VRAM content while
switching colour depth

diffstat:

 sys/dev/pci/voyager/voyagerfb.c |  17 +++++++++++------
 1 files changed, 11 insertions(+), 6 deletions(-)

diffs (59 lines):

diff -r 0d75076d8395 -r 3dbedda1926b sys/dev/pci/voyager/voyagerfb.c
--- a/sys/dev/pci/voyager/voyagerfb.c   Tue Mar 19 16:49:11 2013 +0000
+++ b/sys/dev/pci/voyager/voyagerfb.c   Tue Mar 19 16:49:56 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: voyagerfb.c,v 1.24 2013/03/13 21:35:18 macallan Exp $  */
+/*     $NetBSD: voyagerfb.c,v 1.25 2013/03/19 16:49:56 macallan Exp $  */
 
 /*
  * Copyright (c) 2009, 2011 Michael Lorenz
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: voyagerfb.c,v 1.24 2013/03/13 21:35:18 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: voyagerfb.c,v 1.25 2013/03/19 16:49:56 macallan Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -269,9 +269,6 @@
        sc->sc_depth = 8;
 #endif
 
-       /* init engine here */
-       voyagerfb_init(sc);
-
        printf("%s: %d x %d, %d bit, stride %d\n", device_xname(self), 
                sc->sc_width, sc->sc_height, sc->sc_depth, sc->sc_stride);
 
@@ -282,6 +279,9 @@
        aprint_normal("%s: %d MB video memory at 0x%08x\n", device_xname(self),
            (int)(sc->sc_fbsize >> 20), (uint32_t)sc->sc_fb);
 
+       /* init engine here */
+       voyagerfb_init(sc);
+
        sc->sc_defaultscreen_descr = (struct wsscreen_descr){
                "default",
                0, 0,
@@ -758,6 +758,11 @@
        }
        bus_space_write_4(sc->sc_memt, sc->sc_regh, SM502_PANEL_FB_OFFSET,
            (sc->sc_stride << 16) | sc->sc_stride);
+
+       /* clear the screen... */
+       voyagerfb_rectfill(sc, 0, 0, sc->sc_width, sc->sc_height, 0);
+
+       /* ...and then switch colour depth. For aesthetic reasons. */
        bus_space_write_4(sc->sc_memt, sc->sc_regh, SM502_PANEL_DISP_CTRL,
            reg);
 
@@ -786,7 +791,7 @@
 #else
        bus_space_write_4(sc->sc_memt, sc->sc_regh, SM502_PANEL_CRSR_ADDR,
            sc->sc_cursor_addr);
-#endif 
+#endif
 }
 
 static void



Home | Main Index | Thread Index | Old Index