1 /* $NetBSD: sticvar.h,v 1.17 2008/04/28 20:23:58 martin Exp $ */
4 * Copyright (c) 1999, 2000, 2001 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 #ifndef _TC_STICVAR_H_
33 #define _TC_STICVAR_H_
36 #define STIC_KSEG_TO_PHYS(x) MIPS_KSEG0_TO_PHYS(x)
38 #define STIC_KSEG_TO_PHYS(x) ALPHA_K0SEG_TO_PHYS((vaddr_t)x)
40 #error No support for your architecture
45 struct stic_hwcmap256
{
46 #define CMAP_SIZE 256 /* 256 R/G/B entries */
47 u_int8_t r
[CMAP_SIZE
];
48 u_int8_t g
[CMAP_SIZE
];
49 u_int8_t b
[CMAP_SIZE
];
52 struct stic_hwcursor64
{
53 struct wsdisplay_curpos cc_pos
;
54 struct wsdisplay_curpos cc_hot
;
55 struct wsdisplay_curpos cc_size
;
56 #define CURSOR_MAX_SIZE 64
58 u_int64_t cc_image
[CURSOR_MAX_SIZE
];
59 u_int64_t cc_mask
[CURSOR_MAX_SIZE
];
63 struct stic_info
*ss_si
;
64 u_int16_t
*ss_backing
;
70 #define SS_ALLOCED 0x01
71 #define SS_ACTIVE 0x02
72 #define SS_CURENB 0x04
80 u_int32_t
*si_vdac_reset
;
81 volatile struct stic_regs
*si_stic
;
82 volatile struct stic_xcomm
*si_sxc
;
84 u_int32_t
*(*si_pbuf_get
)(struct stic_info
*);
85 int (*si_pbuf_post
)(struct stic_info
*, u_int32_t
*);
86 int (*si_ioctl
)(struct stic_info
*, u_long
, void *, int,
91 struct stic_screen
*si_curscreen
;
92 struct wsdisplay_font
*si_font
;
106 tc_addr_t si_slotbase
;
111 struct stic_hwcursor64 si_cursor
;
112 struct stic_hwcmap256 si_cmap
;
114 struct callout si_switch_callout
;
115 void (*si_switchcb
)(void *, int, int);
116 void *si_switchcbarg
;
119 #define SI_CURENB_CHANGED 0x0001
120 #define SI_CURCMAP_CHANGED 0x0002
121 #define SI_CURSHAPE_CHANGED 0x0004
122 #define SI_CMAP_CHANGED 0x0008
123 #define SI_ALL_CHANGED 0x000f
124 #define SI_DVOPEN 0x0010
126 void stic_init(struct stic_info
*);
127 void stic_attach(device_t
, struct stic_info
*, int);
128 void stic_cnattach(struct stic_info
*);
129 void stic_reset(struct stic_info
*);
130 void stic_flush(struct stic_info
*);
132 extern struct stic_info stic_consinfo
;
134 #endif /* !_TC_STICVAR_H_ */