diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2002-08-12 10:44:05 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2002-08-12 10:44:05 +0000 |
commit | 15dafe6228319925897f71b6a78bb04ebfb3abc4 (patch) | |
tree | 2bfbe764cfc6f9b1e3c6ca9d29d0881a4283149e /sys/arch/sparc/dev/cgfourteenreg.h | |
parent | a83486fe3ff711d8b3727f8abae7995141bb7562 (diff) |
Convert sparc console code from rcons and pseudo-devices to rasops and wscons.
For most framebuffers it is faster.
Other changes include:
o 24 bit support in tcx(4) for the S24 framebuffer
o accelerated cgsix(4) text console
o new cgtwelve(4) driver for the GS framebuffer
o improved serial driver code
o better keyboard support
The following framebuffers have not been tested but should work: cgfour,
cgeight and cgfourteen
These changes will require XF4 changes, to use Xwsfb instead of Xsun*, to be
commited later today.
Most of the work by me during the LSM and the week after, with code borrowed
from jason@, NetBSD (new serial code), and feedback from mickey@. Work on
pnozz(4) done by millert@
Diffstat (limited to 'sys/arch/sparc/dev/cgfourteenreg.h')
-rw-r--r-- | sys/arch/sparc/dev/cgfourteenreg.h | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/sys/arch/sparc/dev/cgfourteenreg.h b/sys/arch/sparc/dev/cgfourteenreg.h index c0fdb1b5c0a..30b541894b2 100644 --- a/sys/arch/sparc/dev/cgfourteenreg.h +++ b/sys/arch/sparc/dev/cgfourteenreg.h @@ -1,8 +1,8 @@ -/* $OpenBSD: cgfourteenreg.h,v 1.1 1997/08/08 08:24:49 downsj Exp $ */ +/* $OpenBSD: cgfourteenreg.h,v 1.2 2002/08/12 10:44:03 miod Exp $ */ /* $NetBSD: cgfourteenreg.h,v 1.1 1996/09/30 22:41:02 abrown Exp $ */ /* - * Copyright (c) 1996 + * Copyright (c) 1996 * The President and Fellows of Harvard College. All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -52,7 +52,7 @@ struct cg14ctl { volatile u_int8_t ctl_mctl; /* main control register */ #define CG14_MCTL_ENABLEINTR 0x80 /* interrupts */ #define CG14_MCTL_ENABLEVID 0x40 /* enable video */ -#define CG14_MCTL_PIXMODE_MASK 0x30 +#define CG14_MCTL_PIXMODE_MASK 0x30 #define CG14_MCTL_PIXMODE_8 0x00 /* data is 16 8-bit pixels */ #define CG14_MCTL_PIXMODE_16 0x20 /* data is 8 16-bit pixels */ #define CG14_MCTL_PIXMODE_32 0x30 /* data is 4 32-bit pixels */ @@ -121,3 +121,32 @@ struct cg14clut { volatile u_int32_t clut_lutinc[CG14_CLUT_SIZE]; /* autoincr */ volatile u_int32_t clut_lutincd[CG14_CLUT_SIZE]; }; + +/* + * Layout of cg14 hardware colormap + */ +union cg14cmap { + u_char cm_map[256][4]; /* 256 R/G/B/A entries (B is high)*/ + u_int32_t cm_chip[256]; /* the way the chip gets loaded */ +}; + +/* + * cg14 hardware cursor colormap + */ +union cg14cursor_cmap { /* colormap, like bt_cmap, but tiny */ + u_char cm_map[2][4]; /* 2 R/G/B/A entries */ + u_int32_t cm_chip[2]; /* 2 chip equivalents */ +}; + +/* + * cg14 hardware cursor status + */ +struct cg14_cursor { /* cg14 hardware cursor status */ + short cc_enable; /* cursor is enabled */ + struct wsdisplay_curpos cc_pos; /* position */ + struct wsdisplay_curpos cc_hot; /* hot-spot */ + struct wsdisplay_curpos cc_size; /* size of mask & image fields */ + u_int cc_eplane[32]; /* enable plane */ + u_int cc_cplane[32]; /* color plane */ + union cg14cursor_cmap cc_color; /* cursor colormap */ +}; |