1 /* $NetBSD: cgsixvar.h,v 1.11 2008/12/22 23:46:22 macallan Exp $ */
4 * Copyright (c) 1998 The NetBSD Foundation, Inc.
7 * This code is derived from software contributed to The NetBSD Foundation
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
19 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE.
32 #include "wsdisplay.h"
33 #include <dev/wscons/wsdisplay_vconsvar.h>
36 * color display (cgsix) driver; common definitions.
39 union cursor_cmap
{ /* colormap, like bt_cmap, but tiny */
40 u_char cm_map
[2][3]; /* 2 R/G/B entries */
41 u_int cm_chip
[2]; /* 2 chip equivalents */
44 struct cg6_cursor
{ /* cg6 hardware cursor status */
45 short cc_enable
; /* cursor is enabled */
46 struct fbcurpos cc_pos
; /* position */
47 struct fbcurpos cc_hot
; /* hot-spot */
48 struct fbcurpos cc_size
; /* size of mask & image fields */
49 u_int cc_bits
[2][32]; /* space for mask & image bits */
50 union cursor_cmap cc_color
; /* cursor colormap */
53 /* per-display variables */
55 device_t sc_dev
; /* base device */
56 struct fbdevice sc_fb
; /* frame buffer device */
57 bus_space_tag_t sc_bustag
;
58 bus_addr_t sc_paddr
; /* phys address for device mmap() */
60 volatile struct bt_regs
*sc_bt
; /* Brooktree registers */
61 volatile int *sc_fhc
; /* FHC register */
62 volatile struct cg6_thc
*sc_thc
; /* THC registers */
63 volatile struct cg6_tec_xxx
*sc_tec
; /* TEC registers */
64 volatile struct cg6_fbc
*sc_fbc
; /* FBC registers */
65 short sc_fhcrev
; /* hardware rev */
66 short sc_blanked
; /* true if blanked */
67 struct cg6_cursor sc_cursor
; /* software cursor info */
70 uint32_t sc_height
; /* display width / height */
72 uint32_t sc_mono_width
; /* how many monochrome pixels to write */
73 uint32_t sc_ramsize
; /* VRAM size in bytes */
78 uint8_t sc_default_cmap
[768];
80 union bt_cmap sc_cmap
; /* Brooktree color map */
84 extern int cgsix_use_rasterconsole
;
86 #define cgsix_use_rasterconsole 0
89 void cg6attach(struct cgsix_softc
*, const char *, int);