diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2006-10-27 20:02:49 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2006-10-27 20:02:49 +0000 |
commit | b3931be144d501db032230ae699f3250c39cdeaf (patch) | |
tree | 786647c2237de34fc2b1167926b7f53e89194349 /sys/arch | |
parent | f70e12f3fb9142039dc3b4e3d85bda39af21d0f9 (diff) |
Hide hardware cursor on 4bpp model.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/vax/vsa/gpx.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/sys/arch/vax/vsa/gpx.c b/sys/arch/vax/vsa/gpx.c index 5fe2eabd59f..2da7dbabeb2 100644 --- a/sys/arch/vax/vsa/gpx.c +++ b/sys/arch/vax/vsa/gpx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gpx.c,v 1.11 2006/10/22 18:36:52 miod Exp $ */ +/* $OpenBSD: gpx.c,v 1.12 2006/10/27 20:02:48 miod Exp $ */ /* * Copyright (c) 2006 Miodrag Vallat. * @@ -111,7 +111,7 @@ #define GPX_ADDER_OFFSET 0x0000 #define GPX_VDAC_OFFSET 0x0300 -#define GPX_CURSOR_OFFSET 0x0400 +#define GPX_CURSOR_OFFSET 0x0400 /* DC503 */ #define GPX_READBACK_OFFSET 0x0500 #define GPX_WIDTH 1024 @@ -121,7 +121,9 @@ /* 4 plane option RAMDAC */ struct ramdac4 { u_int16_t colormap[16]; - u_int8_t unknown[0x40]; + u_int8_t unknown[0x20]; + u_int16_t cursormap[4]; + u_int8_t unknown2[0x18]; u_int16_t control; #define RAMDAC4_INIT 0x0047 #define RAMDAC4_ENABLE 0x0002 @@ -1172,6 +1174,16 @@ gpx_resetcmap(struct gpx_screen *ss) bcopy(rasops_cmap + 0xf8 * 3, ss->ss_cmap + 8 * 3, 8 * 3); } gpx_loadcmap(ss, 0, 1 << ss->ss_depth); + + /* + * On the 4bit RAMDAC, make the hardware cursor black on black + */ + if (ss->ss_depth != 8) { + struct ramdac4 *rd = ss->ss_vdac; + + rd->cursormap[0] = rd->cursormap[1] = + rd->cursormap[2] = rd->cursormap[3] = 0x0000; + } } /* |