Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc64/dev remove shadow framebuffer support, use ...



details:   https://anonhg.NetBSD.org/src/rev/70c4103ceb87
branches:  trunk
changeset: 757462:70c4103ceb87
user:      macallan <macallan%NetBSD.org@localhost>
date:      Tue Aug 31 03:08:23 2010 +0000

description:
remove shadow framebuffer support, use VCONS_DONT_READ instead

diffstat:

 sys/arch/sparc64/dev/gfb.c |  32 ++++++++++++++++++++++++++------
 1 files changed, 26 insertions(+), 6 deletions(-)

diffs (74 lines):

diff -r fe3cb9ee677b -r 70c4103ceb87 sys/arch/sparc64/dev/gfb.c
--- a/sys/arch/sparc64/dev/gfb.c        Tue Aug 31 02:49:17 2010 +0000
+++ b/sys/arch/sparc64/dev/gfb.c        Tue Aug 31 03:08:23 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: gfb.c,v 1.2 2009/12/31 05:08:05 macallan Exp $ */
+/*     $NetBSD: gfb.c,v 1.3 2010/08/31 03:08:23 macallan Exp $ */
 
 /*
  * Copyright (c) 2009 Michael Lorenz
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gfb.c,v 1.2 2009/12/31 05:08:05 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gfb.c,v 1.3 2010/08/31 03:08:23 macallan Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -66,7 +66,7 @@
 
        int sc_width, sc_height, sc_depth, sc_stride, sc_fblen;
        int sc_locked;
-       void *sc_fbaddr, *sc_shadow;
+       void *sc_fbaddr;
        struct vcons_screen sc_console_screen;
        struct wsscreen_descr sc_defaultscreen_descr;
        const struct wsscreen_descr *sc_screens[1];
@@ -158,7 +158,6 @@
                return;
        }
 
-       sc->sc_shadow = kmem_alloc(sc->sc_fblen, KM_SLEEP);
        sc->sc_locked = 0;
        sc->sc_mode = WSDISPLAYIO_MODE_EMUL;
 
@@ -230,6 +229,27 @@
        aa.accesscookie = &sc->vd;
 
        config_found(sc->sc_dev, &aa, wsemuldisplaydevprint);
+
+#ifdef GFB_DEBUG
+       /*
+        * now dump a register range
+        * try 1, 2 and 4 since they're only 0x2000 each
+        */
+       bus_space_handle_t regh;
+
+       if (bus_space_map(sc->sc_memt, ma->ma_reg[3].ur_paddr,
+           0x2000, BUS_SPACE_MAP_LINEAR, &regh) == 0) {
+               for (i = 0; i < 0x200; i += 32) {
+                       printf("%04x", i);
+                       for (j = 0; j < 32; j += 4) {
+                               printf(" %08x", bus_space_read_4(sc->sc_memt,
+                                   regh, i + j));
+                       }
+                       printf("\n"); 
+               }
+               bus_space_unmap(sc->sc_memt, regh, 0x2000);
+       }
+#endif
 }
 
 static int
@@ -330,8 +350,8 @@
        ri->ri_stride = sc->sc_stride;
        ri->ri_flg = RI_CENTER | RI_FULLCLEAR;
 
-       ri->ri_bits = sc->sc_shadow;
-       ri->ri_hwbits = (char *)sc->sc_fbaddr;
+       ri->ri_bits = (char *)sc->sc_fbaddr;
+       scr->scr_flags |= VCONS_DONT_READ;
 
        if (existing) {
                ri->ri_flg |= RI_CLEAR;



Home | Main Index | Thread Index | Old Index