diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-12-14 05:29:32 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-12-14 05:29:32 +0000 |
commit | 86b4fdd623d3c50d7bfd9427c2c9208454cd0da7 (patch) | |
tree | 5d95abcaf58d01703a30c7ab600537d3b8f67989 /sys/arch/pmax/dev/pm.c | |
parent | e2cd6c399798843e13e76f49dc8ee048b51f99f1 (diff) |
update from netbsd (verbatim)
Diffstat (limited to 'sys/arch/pmax/dev/pm.c')
-rw-r--r-- | sys/arch/pmax/dev/pm.c | 137 |
1 files changed, 1 insertions, 136 deletions
diff --git a/sys/arch/pmax/dev/pm.c b/sys/arch/pmax/dev/pm.c index 63f7feaf36e..28a4a093ee9 100644 --- a/sys/arch/pmax/dev/pm.c +++ b/sys/arch/pmax/dev/pm.c @@ -1,4 +1,4 @@ -/* $NetBSD: pm.c,v 1.8.2.1 1995/10/17 00:19:23 jonathan Exp $ */ +/* $NetBSD: pm.c,v 1.10 1995/11/25 10:39:57 mellon Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -381,141 +381,6 @@ pmLoadCursor(fi, cur) pcc->cmdr = curReg; } -#if 0 -/* - * ---------------------------------------------------------------------------- - * - * pmRestoreCursorColor -- - * - * Routine to restore the color of the cursor. - * - * Results: - * None. - * - * Side effects: - * None. - * - * ---------------------------------------------------------------------------- - */ -static void -pmRestoreCursorColor(fi) - struct fbinfo *fi; -{ - register VDACRegs *vdac = (VDACRegs *)MACH_PHYS_TO_UNCACHED(KN01_SYS_VDAC); - register int i; - - vdac->overWA = 0x04; - MachEmptyWriteBuffer(); - for (i = 0; i < 3; i++) { - vdac->over = bg_RGB[i]; - MachEmptyWriteBuffer(); - } - - vdac->overWA = 0x08; - MachEmptyWriteBuffer(); - vdac->over = 0x00; - MachEmptyWriteBuffer(); - vdac->over = 0x00; - MachEmptyWriteBuffer(); - vdac->over = 0x7f; - MachEmptyWriteBuffer(); - - vdac->overWA = 0x0c; - MachEmptyWriteBuffer(); - for (i = 0; i < 3; i++) { - vdac->over = fg_RGB[i]; - MachEmptyWriteBuffer(); - } -} - -/* - * ---------------------------------------------------------------------------- - * - * pmCursorColor -- - * - * Set the color of the cursor. - * - * Results: - * None. - * - * Side effects: - * None. - * - * ---------------------------------------------------------------------------- - */ -static void -pmCursorColor(color) - unsigned int color[]; -{ - register int i, j; - - for (i = 0; i < 3; i++) - bg_RGB[i] = (u_char)(color[i] >> 8); - - for (i = 3, j = 0; i < 6; i++, j++) - fg_RGB[j] = (u_char)(color[i] >> 8); - - pmRestoreCursorColor(); -} - -/* - * ---------------------------------------------------------------------------- - * - * pmInitColorMap -- - * - * Initialize the color map. - * - * Results: - * None. - * - * Side effects: - * The colormap is initialized appropriately whether it is color or - * monochrome. - * - * ---------------------------------------------------------------------------- - */ -static void -pmInitColorMap() -{ - register VDACRegs *vdac = (VDACRegs *)MACH_PHYS_TO_UNCACHED(KN01_SYS_VDAC); - register int i; - - *(volatile char *)MACH_PHYS_TO_UNCACHED(KN01_PHYS_COLMASK_START) = 0xff; - MachEmptyWriteBuffer(); - - if (fi->fi_type.fb_depth == 1) { - vdac->mapWA = 0; MachEmptyWriteBuffer(); - for (i = 0; i < 256; i++) { - vdac->map = (i < 128) ? 0x00 : 0xff; - MachEmptyWriteBuffer(); - vdac->map = (i < 128) ? 0x00 : 0xff; - MachEmptyWriteBuffer(); - vdac->map = (i < 128) ? 0x00 : 0xff; - MachEmptyWriteBuffer(); - } - } else { - vdac->mapWA = 0; MachEmptyWriteBuffer(); - vdac->map = 0; MachEmptyWriteBuffer(); - vdac->map = 0; MachEmptyWriteBuffer(); - vdac->map = 0; MachEmptyWriteBuffer(); - - for (i = 1; i < 256; i++) { - vdac->map = 0xff; MachEmptyWriteBuffer(); - vdac->map = 0xff; MachEmptyWriteBuffer(); - vdac->map = 0xff; MachEmptyWriteBuffer(); - } - } - - for (i = 0; i < 3; i++) { - bg_RGB[i] = 0x00; - fg_RGB[i] = 0xff; - } - pmRestoreCursorColor(); -} - - -#endif /* 0 */ - /* should zap pmloadcolormap too, but i haven't fixed the callers yet */ /* |