Source-Changes-HG archive

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

[src/netbsd-1-4]: src/sys/arch/mac68k/obio pullup 1.41->1.42 (scottr)



details:   https://anonhg.NetBSD.org/src/rev/87b764cf75b7
branches:  netbsd-1-4
changeset: 468520:87b764cf75b7
user:      perry <perry%NetBSD.org@localhost>
date:      Wed Apr 28 14:22:38 1999 +0000

description:
pullup 1.41->1.42 (scottr)

diffstat:

 sys/arch/mac68k/obio/grf_obio.c |  17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)

diffs (41 lines):

diff -r 8d6f383b0b3e -r 87b764cf75b7 sys/arch/mac68k/obio/grf_obio.c
--- a/sys/arch/mac68k/obio/grf_obio.c   Wed Apr 28 14:19:37 1999 +0000
+++ b/sys/arch/mac68k/obio/grf_obio.c   Wed Apr 28 14:22:38 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: grf_obio.c,v 1.41 1999/01/06 07:08:19 scottr Exp $     */
+/*     $NetBSD: grf_obio.c,v 1.41.4.1 1999/04/28 14:22:38 perry Exp $  */
 
 /*
  * Copyright (C) 1998 Scott Reynolds
@@ -238,22 +238,25 @@
 
                /* Compute the current frame buffer offset */
                vbase1 = bus_space_read_4(sc->sc_tag, sc->sc_regh, 0x0) & 0xfff;
-               vbase2 = bus_space_read_4(sc->sc_tag, sc->sc_regh, 0x4) & 0xf;
-               sc->sc_fbofs = (vbase1 << 9) | (vbase2 << 5);
-
 #if 1
                /*
-                * XXX The following hack exists because the DAFB v7 in these
-                * systems doesn't compute fbofs correctly. (sar 19980813)
+                * XXX The following exists because the DAFB v7 in these
+                * systems doesn't return reasonable values to use for fbofs.
+                * Ken'ichi Ishizaka gets credit for this hack.  (sar 19990426)
+                * (Does this get us the correct result for _all_ DAFB-
+                * equipped systems and monitor combinations?  It seems
+                * possible, if not likely...)
                 */
                switch (current_mac_model->machineid) {
                case MACH_MACLC475:
                case MACH_MACLC475_33:
                case MACH_MACLC575:
-                       sc->sc_fbofs = 0x1000;
+                       vbase1 &= 0x3f;
                        break;
                }
 #endif
+               vbase2 = bus_space_read_4(sc->sc_tag, sc->sc_regh, 0x4) & 0xf;
+               sc->sc_fbofs = (vbase1 << 9) | (vbase2 << 5);
 
                printf(" @ %lx: DAFB video subsystem, monitor sense %x\n",
                    sc->sc_basepa + sc->sc_fbofs,



Home | Main Index | Thread Index | Old Index