diff options
| author | jmcneill <jmcneill@NetBSD.org> | 2007-12-09 20:27:42 +0000 |
|---|---|---|
| committer | jmcneill <jmcneill@NetBSD.org> | 2007-12-09 20:27:42 +0000 |
| commit | 4c1d81b2b5fa658e9fd5e7151eb40ba71ba676da (patch) | |
| tree | 3f8b0d6c63745bde8809b8c6f9e4f6b1514f335e /sys/dev/rasops | |
| parent | 3947df41d16da8b387239b9b87789bfbe950a3b2 (diff) | |
Merge jmcneill-pm branch.
Diffstat (limited to 'sys/dev/rasops')
| -rw-r--r-- | sys/dev/rasops/rasops.c | 25 | ||||
| -rw-r--r-- | sys/dev/rasops/rasops8.c | 31 |
2 files changed, 38 insertions, 18 deletions
diff --git a/sys/dev/rasops/rasops.c b/sys/dev/rasops/rasops.c index 5008b4beb37..1cd1961927b 100644 --- a/sys/dev/rasops/rasops.c +++ b/sys/dev/rasops/rasops.c @@ -1,4 +1,4 @@ -/* $NetBSD: rasops.c,v 1.56 2007/07/28 20:28:57 mjf Exp $ */ +/* $NetBSD: rasops.c,v 1.57 2007/12/09 20:28:14 jmcneill Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.56 2007/07/28 20:28:57 mjf Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.57 2007/12/09 20:28:14 jmcneill Exp $"); #include "opt_rasops.h" #include "rasops_glue.h" @@ -945,8 +945,10 @@ rasops_do_cursor(ri) *(int32_t *)dp ^= ~0; dp += 4; if (ri->ri_hwbits) { - *(int32_t *)hp ^= ~0; + dp -= 4; + *(int32_t *)hp = *(int32_t *)dp; hp += 4; + dp += 4; } } } @@ -962,16 +964,19 @@ rasops_do_cursor(ri) if (slop1 & 1) { *dp++ ^= ~0; - if (ri->ri_hwbits) - *hp++ ^= ~0; + if (ri->ri_hwbits) { + *hp++ = *(dp - 1); + } } if (slop1 & 2) { *(int16_t *)dp ^= ~0; dp += 2; if (ri->ri_hwbits) { - *(int16_t *)hp ^= ~0; + dp -= 2; + *(int16_t *)hp = *(int16_t *)dp; hp += 2; + dp += 2; } } @@ -979,21 +984,23 @@ rasops_do_cursor(ri) *(int32_t *)dp ^= ~0; dp += 4; if (ri->ri_hwbits) { - *(int32_t *)hp ^= ~0; + dp -= 4; + *(int32_t *)hp = *(int32_t *)dp; hp += 4; + dp += 4; } } if (slop2 & 1) { *dp++ ^= ~0; if (ri->ri_hwbits) - *hp++ ^= ~0; + *hp++ = *(dp - 1); } if (slop2 & 2) { *(int16_t *)dp ^= ~0; if (ri->ri_hwbits) - *(int16_t *)hp ^= ~0; + *(int16_t *)hp = *(int16_t *)(dp - 2); } } } diff --git a/sys/dev/rasops/rasops8.c b/sys/dev/rasops/rasops8.c index 1fe5f08d4ec..f5d01a1e375 100644 --- a/sys/dev/rasops/rasops8.c +++ b/sys/dev/rasops/rasops8.c @@ -1,4 +1,4 @@ -/* $NetBSD: rasops8.c,v 1.22 2007/03/04 06:02:39 christos Exp $ */ +/* $NetBSD: rasops8.c,v 1.23 2007/12/09 20:28:14 jmcneill Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rasops8.c,v 1.22 2007/03/04 06:02:39 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rasops8.c,v 1.23 2007/12/09 20:28:14 jmcneill Exp $"); #include "opt_rasops.h" @@ -289,7 +289,8 @@ rasops8_putchar8(cookie, row, col, uc, attr) rp[0] = rp[1] = stamp[0]; DELTA(rp, ri->ri_stride, int32_t *); if (ri->ri_hwbits) { - hp[0] = hp[1] = stamp[0]; + hp[0] = stamp[0]; + hp[1] = stamp[0]; DELTA(hp, ri->ri_stride, int32_t *); } } @@ -321,7 +322,8 @@ rasops8_putchar8(cookie, row, col, uc, attr) rp[0] = rp[1] = stamp[15]; if (ri->ri_hwbits) { DELTA(hp, -(ri->ri_stride << 1), int32_t *); - hp[0] = hp[1] = stamp[15]; + hp[0] = stamp[15]; + hp[1] = stamp[15]; } } @@ -385,7 +387,9 @@ rasops8_putchar12(cookie, row, col, uc, attr) rp[0] = rp[1] = rp[2] = c; DELTA(rp, ri->ri_stride, int32_t *); if (ri->ri_hwbits) { - hrp[0] = hrp[1] = hrp[2] = c; + hrp[0] = c; + hrp[1] = c; + hrp[2] = c; DELTA(hrp, ri->ri_stride, int32_t *); } } @@ -417,7 +421,9 @@ rasops8_putchar12(cookie, row, col, uc, attr) rp[0] = rp[1] = rp[2] = stamp[15]; if (ri->ri_hwbits) { DELTA(hrp, -(ri->ri_stride << 1), int32_t *); - hrp[0] = hrp[1] = hrp[2] = stamp[15]; + hrp[0] = stamp[15]; + hrp[1] = stamp[15]; + hrp[2] = stamp[15]; } } @@ -478,8 +484,12 @@ rasops8_putchar16(cookie, row, col, uc, attr) if (uc == ' ') { while (height--) { rp[0] = rp[1] = rp[2] = rp[3] = stamp[0]; - if (ri->ri_hwbits) - hrp[0] = hrp[1] = hrp[2] = hrp[3] = stamp[0]; + if (ri->ri_hwbits) { + hrp[0] = stamp[0]; + hrp[1] = stamp[0]; + hrp[2] = stamp[0]; + hrp[3] = stamp[0]; + } } } else { uc -= ri->ri_font->firstchar; @@ -511,7 +521,10 @@ rasops8_putchar16(cookie, row, col, uc, attr) rp[0] = rp[1] = rp[2] = rp[3] = stamp[15]; if (ri->ri_hwbits) { DELTA(hrp, -(ri->ri_stride << 1), int32_t *); - hrp[0] = hrp[1] = hrp[2] = hrp[3] = stamp[15]; + hrp[0] = stamp[15]; + hrp[1] = stamp[15]; + hrp[2] = stamp[15]; + hrp[3] = stamp[15]; } } |
