summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2006-10-22 18:36:53 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2006-10-22 18:36:53 +0000
commit6dc242864643e9b3c397e98709552c44f78e9517 (patch)
tree982691190499d9e61ce1e5c4c9ac20ed3751f633 /sys
parent7c64091521a38e79ea035c078344d1d510fac420 (diff)
Fix colormap programming in 4bpp mode.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/vax/vsa/gpx.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/arch/vax/vsa/gpx.c b/sys/arch/vax/vsa/gpx.c
index e3d1d1493b3..5fe2eabd59f 100644
--- a/sys/arch/vax/vsa/gpx.c
+++ b/sys/arch/vax/vsa/gpx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gpx.c,v 1.10 2006/08/05 22:04:53 miod Exp $ */
+/* $OpenBSD: gpx.c,v 1.11 2006/10/22 18:36:52 miod Exp $ */
/*
* Copyright (c) 2006 Miodrag Vallat.
*
@@ -728,7 +728,7 @@ gpx_reset_viper(struct gpx_screen *ss)
ss->ss_adder->source_2_y = 0;
ss->ss_adder->source_2_size = 0x0022;
/* initialize plane addresses for eight vipers */
- for (i = 0; i < 7; i++) {
+ for (i = 0; i < 8; i++) {
gpx_viper_write(ss, CS_UPDATE_MASK, 1 << i);
gpx_viper_write(ss, PLANE_ADDRESS, i);
}
@@ -1154,9 +1154,9 @@ gpx_loadcmap(struct gpx_screen *ss, int from, int count)
cmap = ss->ss_cmap + from;
for (i = from; i < from + count; i++) {
- color12 = *cmap++ << 8;
- color12 |= *cmap++ << 4;
- color12 |= *cmap++ << 0;
+ color12 = (*cmap++ >> 4) << 0;
+ color12 |= (*cmap++ >> 4) << 8;
+ color12 |= (*cmap++ >> 4) << 4;
rd->colormap[i] = color12;
}
}