grf_dvreg.h revision 1.1 1 1.1 tsutsui /* $NetBSD: grf_dvreg.h,v 1.1 2011/02/07 13:11:41 tsutsui Exp $ */
2 1.1 tsutsui
3 1.1 tsutsui /*
4 1.1 tsutsui * Copyright (c) 1990, 1993
5 1.1 tsutsui * The Regents of the University of California. All rights reserved.
6 1.1 tsutsui *
7 1.1 tsutsui * This code is derived from software contributed to Berkeley by
8 1.1 tsutsui * the Systems Programming Group of the University of Utah Computer
9 1.1 tsutsui * Science Department.
10 1.1 tsutsui *
11 1.1 tsutsui * Redistribution and use in source and binary forms, with or without
12 1.1 tsutsui * modification, are permitted provided that the following conditions
13 1.1 tsutsui * are met:
14 1.1 tsutsui * 1. Redistributions of source code must retain the above copyright
15 1.1 tsutsui * notice, this list of conditions and the following disclaimer.
16 1.1 tsutsui * 2. Redistributions in binary form must reproduce the above copyright
17 1.1 tsutsui * notice, this list of conditions and the following disclaimer in the
18 1.1 tsutsui * documentation and/or other materials provided with the distribution.
19 1.1 tsutsui * 3. Neither the name of the University nor the names of its contributors
20 1.1 tsutsui * may be used to endorse or promote products derived from this software
21 1.1 tsutsui * without specific prior written permission.
22 1.1 tsutsui *
23 1.1 tsutsui * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
24 1.1 tsutsui * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 1.1 tsutsui * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 1.1 tsutsui * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27 1.1 tsutsui * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28 1.1 tsutsui * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29 1.1 tsutsui * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 1.1 tsutsui * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 1.1 tsutsui * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 1.1 tsutsui * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 1.1 tsutsui * SUCH DAMAGE.
34 1.1 tsutsui *
35 1.1 tsutsui * from: Utah $Hdr: grf_dvreg.h 1.5 92/01/21$
36 1.1 tsutsui *
37 1.1 tsutsui * @(#)grf_dvreg.h 8.1 (Berkeley) 6/10/93
38 1.1 tsutsui */
39 1.1 tsutsui /*
40 1.1 tsutsui * Copyright (c) 1988 University of Utah.
41 1.1 tsutsui *
42 1.1 tsutsui * This code is derived from software contributed to Berkeley by
43 1.1 tsutsui * the Systems Programming Group of the University of Utah Computer
44 1.1 tsutsui * Science Department.
45 1.1 tsutsui *
46 1.1 tsutsui * Redistribution and use in source and binary forms, with or without
47 1.1 tsutsui * modification, are permitted provided that the following conditions
48 1.1 tsutsui * are met:
49 1.1 tsutsui * 1. Redistributions of source code must retain the above copyright
50 1.1 tsutsui * notice, this list of conditions and the following disclaimer.
51 1.1 tsutsui * 2. Redistributions in binary form must reproduce the above copyright
52 1.1 tsutsui * notice, this list of conditions and the following disclaimer in the
53 1.1 tsutsui * documentation and/or other materials provided with the distribution.
54 1.1 tsutsui * 3. All advertising materials mentioning features or use of this software
55 1.1 tsutsui * must display the following acknowledgement:
56 1.1 tsutsui * This product includes software developed by the University of
57 1.1 tsutsui * California, Berkeley and its contributors.
58 1.1 tsutsui * 4. Neither the name of the University nor the names of its contributors
59 1.1 tsutsui * may be used to endorse or promote products derived from this software
60 1.1 tsutsui * without specific prior written permission.
61 1.1 tsutsui *
62 1.1 tsutsui * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
63 1.1 tsutsui * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
64 1.1 tsutsui * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
65 1.1 tsutsui * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
66 1.1 tsutsui * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
67 1.1 tsutsui * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
68 1.1 tsutsui * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
69 1.1 tsutsui * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
70 1.1 tsutsui * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
71 1.1 tsutsui * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
72 1.1 tsutsui * SUCH DAMAGE.
73 1.1 tsutsui *
74 1.1 tsutsui * from: Utah $Hdr: grf_dvreg.h 1.5 92/01/21$
75 1.1 tsutsui *
76 1.1 tsutsui * @(#)grf_dvreg.h 8.1 (Berkeley) 6/10/93
77 1.1 tsutsui */
78 1.1 tsutsui
79 1.1 tsutsui #include <hp300/dev/iotypes.h> /* XXX */
80 1.1 tsutsui
81 1.1 tsutsui /*
82 1.1 tsutsui * Map of the DaVinci frame buffer controller chip in memory ...
83 1.1 tsutsui */
84 1.1 tsutsui
85 1.1 tsutsui #define db_waitbusy(regaddr) \
86 1.1 tsutsui while (((struct dvboxfb *)(regaddr))->wbusy || \
87 1.1 tsutsui ((struct dvboxfb *)(regaddr))->as_busy) DELAY(100)
88 1.1 tsutsui
89 1.1 tsutsui struct rgb {
90 1.1 tsutsui u_char :8, :8, :8;
91 1.1 tsutsui vu_char red;
92 1.1 tsutsui u_char :8, :8, :8;
93 1.1 tsutsui vu_char green;
94 1.1 tsutsui u_char :8, :8, :8;
95 1.1 tsutsui vu_char blue;
96 1.1 tsutsui };
97 1.1 tsutsui
98 1.1 tsutsui struct dvboxfb {
99 1.1 tsutsui u_char :8;
100 1.1 tsutsui vu_char reset; /* reset register 0x01 */
101 1.1 tsutsui u_char fb_address; /* frame buffer address 0x02 */
102 1.1 tsutsui vu_char interrupt; /* interrupt register 0x03 */
103 1.1 tsutsui u_char :8;
104 1.1 tsutsui vu_char fbwmsb; /* frame buffer width MSB 0x05 */
105 1.1 tsutsui u_char :8;
106 1.1 tsutsui vu_char fbwlsb; /* frame buffer width MSB 0x07 */
107 1.1 tsutsui u_char :8;
108 1.1 tsutsui vu_char fbhmsb; /* frame buffer height MSB 0x09 */
109 1.1 tsutsui u_char :8;
110 1.1 tsutsui vu_char fbhlsb; /* frame buffer height MSB 0x0b */
111 1.1 tsutsui u_char :8;
112 1.1 tsutsui vu_char dwmsb; /* display width MSB 0x0d */
113 1.1 tsutsui u_char :8;
114 1.1 tsutsui vu_char dwlsb; /* display width MSB 0x0f */
115 1.1 tsutsui u_char :8;
116 1.1 tsutsui vu_char dhmsb; /* display height MSB 0x11 */
117 1.1 tsutsui u_char :8;
118 1.1 tsutsui vu_char dhlsb; /* display height MSB 0x13 */
119 1.1 tsutsui u_char :8;
120 1.1 tsutsui vu_char fbid; /* frame buffer id 0x15 */
121 1.1 tsutsui u_char f1[0x47];
122 1.1 tsutsui vu_char fbomsb; /* frame buffer offset MSB 0x5d */
123 1.1 tsutsui u_char :8;
124 1.1 tsutsui vu_char fbolsb; /* frame buffer offset LSB 0x5f */
125 1.1 tsutsui u_char f2[16359];
126 1.1 tsutsui vu_char wbusy; /* Window move in progress 0x4047 */
127 1.1 tsutsui u_char f3[0x405b-0x4047-1];
128 1.1 tsutsui vu_char as_busy; /* Scan accessing frame buf. 0x405B */
129 1.1 tsutsui u_char f4[0x4090-0x405b-1];
130 1.1 tsutsui vu_int fbwen; /* Frame buffer write enable 0x4090 */
131 1.1 tsutsui u_char f5[0x409f-0x4090-4];
132 1.1 tsutsui vu_char wmove; /* Initiate window move. 0x409F */
133 1.1 tsutsui u_char f6[0x40b3-0x409f-1];
134 1.1 tsutsui vu_char fold; /* Byte/longword per pixel 0x40B3 */
135 1.1 tsutsui u_char f7[0x40b7-0x40b3-1];
136 1.1 tsutsui vu_char opwen; /* Overlay plane write enable 0x40B7 */
137 1.1 tsutsui u_char f8[0x40bf-0x40b7-1];
138 1.1 tsutsui vu_char drive; /* Select FB vs. Overlay. 0x40BF */
139 1.1 tsutsui
140 1.1 tsutsui u_char f8a[0x40cb-0x40bf-1];
141 1.1 tsutsui vu_char zconfig; /* Z buffer configuration 0x40CB */
142 1.1 tsutsui u_char f8b[0x40cf-0x40cb-1];
143 1.1 tsutsui vu_char alt_rr; /* Alternate replacement rule 0x40CF */
144 1.1 tsutsui u_char f8c[0x40d3-0x40cf-1];
145 1.1 tsutsui vu_char zrr; /* Z replacement rule 0x40D3 */
146 1.1 tsutsui
147 1.1 tsutsui u_char f9[0x40d7-0x40d3-1];
148 1.1 tsutsui vu_char en_scan; /* Enable scan DTACK. 0x40D7 */
149 1.1 tsutsui u_char f10[0x40ef-0x40d7-1];
150 1.1 tsutsui vu_char rep_rule; /* Replacement rule 0x40EF */
151 1.1 tsutsui u_char f11[0x40f2-0x40ef-1];
152 1.1 tsutsui vu_short source_x; /* Window source X origin 0x40F2 */
153 1.1 tsutsui u_char f12[0x40f6-0x40f2-2];
154 1.1 tsutsui vu_short source_y; /* Window source Y origin 0x40F6 */
155 1.1 tsutsui u_char f13[0x40fa-0x40f6-2];
156 1.1 tsutsui vu_short dest_x; /* Window dest X origin 0x40FA */
157 1.1 tsutsui u_char f14[0x40fe -0x40fa-2];
158 1.1 tsutsui vu_short dest_y; /* Window dest Y origin 0x40FE */
159 1.1 tsutsui u_char f15[0x4102-0x40fe -2];
160 1.1 tsutsui vu_short wwidth; /* Window width 0x4102 */
161 1.1 tsutsui u_char f16[0x4106-0x4102-2];
162 1.1 tsutsui vu_short wheight; /* Window height 0x4106 */
163 1.1 tsutsui u_char f17[0x6003-0x4106-2];
164 1.1 tsutsui vu_char cmapbank; /* Bank select (0 or 1) 0x6003 */
165 1.1 tsutsui u_char f18[0x6007-0x6003-1];
166 1.1 tsutsui vu_char dispen; /* Display enable 0x6007 */
167 1.1 tsutsui
168 1.1 tsutsui u_char f18a[0x600B-0x6007-1];
169 1.1 tsutsui vu_char fbvenp; /* Frame buffer video enable 0x600B */
170 1.1 tsutsui u_char f18b[0x6017-0x600B-1];
171 1.1 tsutsui vu_char fbvens; /* fbvenp blink counterpart 0x6017 */
172 1.1 tsutsui
173 1.1 tsutsui u_char f19[0x6023-0x6017-1];
174 1.1 tsutsui vu_char vdrive; /* Video display mode 0x6023 */
175 1.1 tsutsui u_char f20[0x6083-0x6023-1];
176 1.1 tsutsui vu_char panxh; /* Pan display in X (high) 0x6083 */
177 1.1 tsutsui u_char f21[0x6087-0x6083-1];
178 1.1 tsutsui vu_char panxl; /* Pan display in X (low) 0x6087 */
179 1.1 tsutsui u_char f22[0x608b-0x6087-1];
180 1.1 tsutsui vu_char panyh; /* Pan display in Y (high) 0x608B */
181 1.1 tsutsui u_char f23[0x608f-0x608b-1];
182 1.1 tsutsui vu_char panyl; /* Pan display in Y (low) 0x608F */
183 1.1 tsutsui u_char f24[0x6093-0x608f-1];
184 1.1 tsutsui vu_char zoom; /* Zoom factor 0x6093 */
185 1.1 tsutsui u_char f25[0x6097-0x6093-1];
186 1.1 tsutsui vu_char pz_trig; /* Pan & zoom trigger 0x6097 */
187 1.1 tsutsui u_char f26[0x609b-0x6097-1];
188 1.1 tsutsui vu_char ovly0p; /* Overlay 0 primary map 0x609B */
189 1.1 tsutsui u_char f27[0x609f-0x609b-1];
190 1.1 tsutsui vu_char ovly1p; /* Overlay 1 primary map 0x609F */
191 1.1 tsutsui u_char f28[0x60a3-0x609f-1];
192 1.1 tsutsui vu_char ovly0s; /* Overlay 0 secondary map 0x60A3 */
193 1.1 tsutsui u_char f29[0x60a7-0x60a3-1];
194 1.1 tsutsui vu_char ovly1s; /* Overlay 1 secondary map 0x60A7 */
195 1.1 tsutsui u_char f30[0x60ab-0x60a7-1];
196 1.1 tsutsui vu_char opvenp; /* Overlay video enable 0x60AB */
197 1.1 tsutsui u_char f31[0x60af-0x60ab-1];
198 1.1 tsutsui vu_char opvens; /* Overlay blink enable 0x60AF */
199 1.1 tsutsui u_char f32[0x60b3-0x60af-1];
200 1.1 tsutsui vu_char fv_trig; /* Trigger control registers 0x60B3 */
201 1.1 tsutsui u_char f33[0x60b7-0x60b3-1];
202 1.1 tsutsui vu_char cdwidth; /* Iris cdwidth timing reg. 0x60B7 */
203 1.1 tsutsui u_char f34[0x60bb-0x60b7-1];
204 1.1 tsutsui vu_char chstart; /* Iris chstart timing reg. 0x60BB */
205 1.1 tsutsui u_char f35[0x60bf-0x60bb-1];
206 1.1 tsutsui vu_char cvwidth; /* Iris cvwidth timing reg. 0x60BF */
207 1.1 tsutsui u_char f36[0x6100-0x60bf-1];
208 1.1 tsutsui struct rgb rgb[8]; /* overlay color map */
209 1.1 tsutsui u_char f37[0x6403-0x6100-sizeof(struct rgb)*8];
210 1.1 tsutsui vu_char red0;
211 1.1 tsutsui u_char f38[0x6803-0x6403-1];
212 1.1 tsutsui vu_char green0;
213 1.1 tsutsui u_char f39[0x6c03-0x6803-1];
214 1.1 tsutsui vu_char blue0;
215 1.1 tsutsui u_char f40[0x7403-0x6c03-1];
216 1.1 tsutsui vu_char red1;
217 1.1 tsutsui u_char f41[0x7803-0x7403-1];
218 1.1 tsutsui vu_char green1;
219 1.1 tsutsui u_char f42[0x7c03-0x7803-1];
220 1.1 tsutsui vu_char blue1;
221 1.1 tsutsui u_char f43[0x8012-0x7c03-1];
222 1.1 tsutsui vu_short status1; /* Master Status register 0x8012 */
223 1.1 tsutsui u_char f44[0xC226-0x8012-2];
224 1.1 tsutsui vu_short trans; /* Transparency 0xC226 */
225 1.1 tsutsui u_char f45[0xC23E -0xC226-2];
226 1.1 tsutsui vu_short pstop; /* Pace value control 0xc23e */
227 1.1 tsutsui };
228