Source-Changes-HG archive

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

[src/thorpej_scsipi]: src/sys Sync w/ trunk.



details:   https://anonhg.NetBSD.org/src/rev/0084c5d74aba
branches:  thorpej_scsipi
changeset: 477300:0084c5d74aba
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Wed Oct 20 22:53:31 1999 +0000

description:
Sync w/ trunk.

diffstat:

 sys/dev/scsipi/atapiconf.c            |    3 +-
 sys/dev/scsipi/scsiconf.c             |    3 +-
 sys/dev/tc/cfb.c                      |    6 +-
 sys/dev/tc/mfb.c                      |    6 +-
 sys/dev/tc/sfb.c                      |  336 ++++++++++++++++++++++++---------
 sys/dev/tc/sfbreg.h                   |   16 +-
 sys/dev/tc/tfb.c                      |    6 +-
 sys/dev/tc/xcfb.c                     |    6 +-
 sys/dev/usb/usb.h                     |    3 +-
 sys/dev/usb/usbdevs                   |    6 +-
 sys/dev/usb/usbdevs.h                 |    8 +-
 sys/dev/usb/usbdevs_data.h            |   16 +-
 sys/dev/wscons/wsdisplay.c            |   12 +-
 sys/dev/wscons/wsdisplay_compat_usl.c |  116 ++++++----
 sys/dev/wscons/wsdisplayvar.h         |    7 +-
 sys/filecorefs/filecore_vfsops.c      |    5 +-
 sys/isofs/cd9660/cd9660_vfsops.c      |    5 +-
 sys/msdosfs/msdosfs_vfsops.c          |    5 +-
 sys/ntfs/ntfs_vfsops.c                |    7 +-
 sys/ufs/ext2fs/ext2fs_vfsops.c        |    5 +-
 20 files changed, 385 insertions(+), 192 deletions(-)

diffs (truncated from 1178 to 300 lines):

diff -r 9e1235d99580 -r 0084c5d74aba sys/dev/scsipi/atapiconf.c
--- a/sys/dev/scsipi/atapiconf.c        Wed Oct 20 22:42:56 1999 +0000
+++ b/sys/dev/scsipi/atapiconf.c        Wed Oct 20 22:53:31 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: atapiconf.c,v 1.28.2.2 1999/10/20 10:14:54 enami Exp $ */
+/*     $NetBSD: atapiconf.c,v 1.28.2.3 1999/10/20 22:53:31 thorpej Exp $       */
 
 /*
  * Copyright (c) 1996 Manuel Bouyer.  All rights reserved.
@@ -89,6 +89,7 @@
        atapi_scsipi_cmd,
        atapi_interpret_sense,
        atapi_print_addr,
+       atapi_kill_pending,
 };
 
 struct scsi_quirk_inquiry_pattern atapi_quirk_patterns[] = {
diff -r 9e1235d99580 -r 0084c5d74aba sys/dev/scsipi/scsiconf.c
--- a/sys/dev/scsipi/scsiconf.c Wed Oct 20 22:42:56 1999 +0000
+++ b/sys/dev/scsipi/scsiconf.c Wed Oct 20 22:53:31 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: scsiconf.c,v 1.130.2.1 1999/10/19 17:39:33 thorpej Exp $       */
+/*     $NetBSD: scsiconf.c,v 1.130.2.2 1999/10/20 22:54:09 thorpej Exp $       */
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -105,6 +105,7 @@
        scsi_scsipi_cmd,
        scsipi_interpret_sense,
        scsi_print_addr,
+       scsi_kill_pending,
 };
 
 int
diff -r 9e1235d99580 -r 0084c5d74aba sys/dev/tc/cfb.c
--- a/sys/dev/tc/cfb.c  Wed Oct 20 22:42:56 1999 +0000
+++ b/sys/dev/tc/cfb.c  Wed Oct 20 22:53:31 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cfb.c,v 1.12 1999/08/02 04:19:03 nisimura Exp $ */
+/* $NetBSD: cfb.c,v 1.12.2.1 1999/10/20 22:54:59 thorpej Exp $ */
 
 /*
  * Copyright (c) 1998, 1999 Tohru Nishimura.  All rights reserved.
@@ -32,7 +32,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: cfb.c,v 1.12 1999/08/02 04:19:03 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cfb.c,v 1.12.2.1 1999/10/20 22:54:59 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -185,7 +185,7 @@
        "std", 0, 0,
        &cfb_emulops,
        0, 0,
-       0
+       WSSCREEN_REVERSE
 };
 
 const struct wsscreen_descr *_cfb_scrlist[] = {
diff -r 9e1235d99580 -r 0084c5d74aba sys/dev/tc/mfb.c
--- a/sys/dev/tc/mfb.c  Wed Oct 20 22:42:56 1999 +0000
+++ b/sys/dev/tc/mfb.c  Wed Oct 20 22:53:31 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mfb.c,v 1.17 1999/08/02 06:00:40 nisimura Exp $ */
+/* $NetBSD: mfb.c,v 1.17.2.1 1999/10/20 22:54:59 thorpej Exp $ */
 
 /*
  * Copyright (c) 1998, 1999 Tohru Nishimura.  All rights reserved.
@@ -32,7 +32,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: mfb.c,v 1.17 1999/08/02 06:00:40 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mfb.c,v 1.17.2.1 1999/10/20 22:54:59 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -164,7 +164,7 @@
        "std", 0, 0,
        &mfb_emulops,
        0, 0,
-       0
+       WSSCREEN_REVERSE
 };
 
 const struct wsscreen_descr *_mfb_scrlist[] = {
diff -r 9e1235d99580 -r 0084c5d74aba sys/dev/tc/sfb.c
--- a/sys/dev/tc/sfb.c  Wed Oct 20 22:42:56 1999 +0000
+++ b/sys/dev/tc/sfb.c  Wed Oct 20 22:53:31 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sfb.c,v 1.20 1999/10/08 02:08:15 nisimura Exp $ */
+/* $NetBSD: sfb.c,v 1.20.2.1 1999/10/20 22:54:59 thorpej Exp $ */
 
 /*
  * Copyright (c) 1998, 1999 Tohru Nishimura.  All rights reserved.
@@ -32,7 +32,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: sfb.c,v 1.20 1999/10/08 02:08:15 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sfb.c,v 1.20.2.1 1999/10/20 22:54:59 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -187,7 +187,7 @@
        "std", 0, 0,
        &sfb_emulops,
        0, 0,
-       0
+       WSSCREEN_REVERSE
 };
 
 const struct wsscreen_descr *_sfb_scrlist[] = {
@@ -623,8 +623,8 @@
        *(u_int32_t *)(sfbasic + SFB_ASIC_VIDEO_VALID) = 0;
        *(u_int32_t *)(sfbasic + SFB_ASIC_PLANEMASK) = ~0;
        *(u_int32_t *)(sfbasic + SFB_ASIC_PIXELMASK) = ~0;
-       *(u_int32_t *)(sfbasic + SFB_ASIC_MODE) = 0;
-       *(u_int32_t *)(sfbasic + SFB_ASIC_ROP) = 3;
+       *(u_int32_t *)(sfbasic + SFB_ASIC_MODE) = 0; /* MODE_SIMPLE */
+       *(u_int32_t *)(sfbasic + SFB_ASIC_ROP) = 3;  /* ROP_COPY */
        
        *(u_int32_t *)(sfbasic + 0x180000) = 0; /* Bt459 reset */
 
@@ -682,9 +682,9 @@
        REG(vdac, bt_reg) = 0xff;       tc_wmb();
        REG(vdac, bt_reg) = 0xff;       tc_wmb();
 
-       REG(vdac, bt_reg) = 0;  tc_wmb();
-       REG(vdac, bt_reg) = 0;  tc_wmb();
-       REG(vdac, bt_reg) = 0;  tc_wmb();
+       REG(vdac, bt_reg) = 0;          tc_wmb();
+       REG(vdac, bt_reg) = 0;          tc_wmb();
+       REG(vdac, bt_reg) = 0;          tc_wmb();
 
        REG(vdac, bt_reg) = 0xff;       tc_wmb();
        REG(vdac, bt_reg) = 0xff;       tc_wmb();
@@ -856,11 +856,46 @@
 #define        MODE_TRANSPARENTLINE    6
 #define        MODE_COPY               7
 
+/* parameters for 8bpp configuration */
 #define        SFBALIGNMASK            0x7
 #define        SFBSTIPPLEALL1          0xffffffff
 #define        SFBSTIPPLEBITS          32
 #define        SFBSTIPPLEBITMASK       0x1f
 #define        SFBSTIPPLEBYTESDONE     32
+#define        SFBCOPYALL1             0xffffffff
+#define        SFBCOPYBITS             32
+#define        SFBCOPYBITMASK          0x1f
+#define        SFBCOPYBYTESDONE        32
+
+#ifdef pmax
+#define        WRITE_MB()
+#define        BUMP(p) (p)
+#endif
+
+#ifdef alpha
+#define        WRITE_MB() tc_wmb()
+#define        BUMP(p) ((p) = (caddr_t)(((long)(p) + 128) & ~0x400))
+#endif
+
+#define        SFBMODE(p, v) \
+               (*(u_int32_t *)(BUMP(p) + SFB_ASIC_MODE) = (v))
+#define        SFBROP(p, v) \
+               (*(u_int32_t *)(BUMP(p) + SFB_ASIC_ROP) = (v))
+#define        SFBPLANEMASK(p, v) \
+               (*(u_int32_t *)(BUMP(p) + SFB_ASIC_PLANEMASK) = (v))
+#define        SFBPIXELMASK(p, v) \
+               (*(u_int32_t *)(BUMP(p) + SFB_ASIC_PIXELMASK) = (v))
+#define        SFBADDRESS(p, v) \
+               (*(u_int32_t *)(BUMP(p) + SFB_ASIC_ADDRESS) = (v))
+#define        SFBSTART(p, v) \
+               (*(u_int32_t *)(BUMP(p) + SFB_ASIC_START) = (v))
+#define        SFBPIXELSHIFT(p, v) \
+               (*(u_int32_t *)(BUMP(p) + SFB_ASIC_PIXELSHIFT) = (v))
+#define        SFBFG(p, v) \
+               (*(u_int32_t *)(BUMP(p) + SFB_ASIC_FG) = (v))
+#define        SFBBG(p, v) \
+               (*(u_int32_t *)(BUMP(p) + SFB_ASIC_BG) = (v))
+
 
 /*
  * Paint (or unpaint) the cursor.
@@ -871,7 +906,10 @@
        int on, row, col;
 {
        struct rcons *rc = id;
-       int x, y;
+       struct raster *rap = rc->rc_sp;
+       caddr_t sfb, p;
+       int scanspan, height, width, align, x, y;
+       u_int32_t lmask, rmask;
 
        /* turn the cursor off */
        if (!on) {
@@ -889,11 +927,44 @@
 
        x = col * rc->rc_font->width + rc->rc_xorigin;
        y = row * rc->rc_font->height + rc->rc_yorigin;
+       scanspan = rap->linelongs * 4;
+       height = rc->rc_font->height;
 
-       raster_op(rc->rc_sp, x, y,
-           rc->rc_font->width, rc->rc_font->height,
-           RAS_INVERT,
-           (struct raster *) 0, 0, 0);
+       p = (caddr_t)rap->pixels + y * scanspan + x;
+       align = (long)p & SFBALIGNMASK;
+       p -= align;
+       width = rc->rc_font->width + align;
+       lmask = SFBSTIPPLEALL1 << align;
+       rmask = SFBSTIPPLEALL1 >> (-width & SFBSTIPPLEBITMASK);
+       sfb = rap->data;
+
+       SFBMODE(sfb, MODE_SIMPLE);
+       SFBPLANEMASK(sfb, 0x01010101);  /* LSB only */
+       SFBROP(sfb, 10);                /* ROP_INVERT */
+       if (width <= SFBSTIPPLEBITS) {
+               lmask = lmask & rmask;
+               while (height > 0) {
+                       SFBADDRESS(sfb, (long)p);
+                       SFBSTART(sfb, lmask);
+                       p += scanspan;
+                       height--;
+               }
+       }
+       else {
+               caddr_t q = p;
+               while (height > 0) {
+                       *(u_int32_t *)p = lmask;
+WRITE_MB();
+                       p += SFBSTIPPLEBYTESDONE;
+                       *(u_int32_t *)p = rmask;
+WRITE_MB();
+
+                       p = (q += scanspan);
+                       height--;
+               }
+       }
+       SFBPLANEMASK(sfb, ~0);          /* entire pixel */
+       SFBROP(sfb, 3);                 /* ROP_COPY */
 
        rc->rc_bits ^= RC_CURSOR;
 }
@@ -926,17 +997,66 @@
        long attr;
 {
        struct rcons *rc = id;
-       int x, y, op;
-       u_char help;
+       struct raster *rap = rc->rc_sp;
+       caddr_t sfb, p;
+       int scanspan, height, width, align, x, y;
+       u_int32_t lmask, rmask, glyph;
+       u_int32_t *g;
+
+if (uc < 0x20 || uc >= 127) return; /* XXX why \033 is creaping in !? XXX */
 
        x = col * rc->rc_font->width + rc->rc_xorigin;
-       y = row * rc->rc_font->height + rc->rc_font_ascent + rc->rc_yorigin;
+       y = row * rc->rc_font->height + rc->rc_yorigin;
+       scanspan = rap->linelongs * 4;
+       height = rc->rc_font->height;
+       g = rc->rc_font->chars[uc].r->pixels;
+
+       p = (caddr_t)rap->pixels + y * scanspan + x;
+       align = (long)p & SFBALIGNMASK;
+       p -= align;
+       width = rc->rc_font->width + align;
+       lmask = SFBSTIPPLEALL1 << align;
+       rmask = SFBSTIPPLEALL1 >> (-width & SFBSTIPPLEBITMASK);
+       sfb = rap->data;
+       attr = (attr != 0) ^ (rc->rc_bits & RC_INVERT);
 
-       op = RAS_SRC;
-       if ((attr != 0) ^ ((rc->rc_bits & RC_INVERT) != 0))
-               op = RAS_NOT(op);
-       help = uc & 0xff;
-       raster_textn(rc->rc_sp, x, y, op, rc->rc_font, &help, 1);
+       SFBMODE(sfb, MODE_OPAQUESTIPPLE);
+       SFBPLANEMASK(sfb, ~0);
+       SFBFG(sfb, (attr == 0) ? 0x01010101 : 0);
+       SFBBG(sfb, (attr == 0) ? 0 : 0x01010101);
+       if (width <= SFBSTIPPLEBITS) {
+               lmask = lmask & rmask;
+               while (height > 0) {
+                       glyph = *g;
+                       SFBPIXELMASK(sfb, lmask);
+                       SFBADDRESS(sfb, (long)p);
+                       SFBSTART(sfb, glyph << align);
+                       p += scanspan;
+                       g += 1;
+                       height--;
+               }
+       }
+       else {
+               caddr_t q = p;



Home | Main Index | Thread Index | Old Index