ARM: 7409/1: Do not call flush_cache_user_range with mmap_sem held
[linux/fpc-iii.git] / drivers / video / mb862xx / mb862xxfb_accel.h
blob96a2dfef0f60a5c14ca8227c67406a75a919467b
1 #ifndef __MB826XXFB_ACCEL_H__
2 #define __MB826XXFB_ACCEL_H__
4 /* registers */
5 #define GDC_GEO_REG_INPUT_FIFO 0x00000400L
7 /* Special Registers */
8 #define GDC_REG_CTRL 0x00000400L
9 #define GDC_REG_FIFO_STATUS 0x00000404L
10 #define GDC_REG_FIFO_COUNT 0x00000408L
11 #define GDC_REG_SETUP_STATUS 0x0000040CL
12 #define GDC_REG_DDA_STATUS 0x00000410L
13 #define GDC_REG_ENGINE_STATUS 0x00000414L
14 #define GDC_REG_ERROR_STATUS 0x00000418L
15 #define GDC_REG_MODE_MISC 0x00000420L /* MDR0 */
16 #define GDC_REG_MODE_LINE 0x00000424L /* MDR1 */
17 #define GDC_REG_MODE_POLYGON 0x00000428L /* MDR2 */
18 #define GDC_REG_MODE_TEXTURE 0x0000042CL /* MDR3 */
19 #define GDC_REG_MODE_BITMAP 0x00000430L /* MDR4 */
20 #define GDC_REG_MODE_EXTENSION 0x0000043CL /* MDR7 */
22 /* Configuration Registers */
23 #define GDC_REG_DRAW_BASE 0x00000440L
24 #define GDC_REG_X_RESOLUTION 0x00000444L
25 #define GDC_REG_Z_BASE 0x00000448L
26 #define GDC_REG_TEXTURE_BASE 0x0000044CL
27 #define GDC_REG_POLYGON_FLAG_BASE 0x00000450L
28 #define GDC_REG_CLIP_XMIN 0x00000454L
29 #define GDC_REG_CLIP_XMAX 0x00000458L
30 #define GDC_REG_CLIP_YMIN 0x0000045CL
31 #define GDC_REG_CLIP_YMAX 0x00000460L
32 #define GDC_REG_TEXURE_SIZE 0x00000464L
33 #define GDC_REG_TILE_SIZE 0x00000468L
34 #define GDC_REG_TEX_BUF_OFFSET 0x0000046CL
36 /* for MB86293 or later */
37 #define GDC_REG_ALPHA_MAP_BASE 0x00000474L /* ABR */
39 /* Constant Registers */
40 #define GDC_REG_FOREGROUND_COLOR 0x00000480L
41 #define GDC_REG_BACKGROUND_COLOR 0x00000484L
42 #define GDC_REG_ALPHA 0x00000488L
43 #define GDC_REG_LINE_PATTERN 0x0000048CL
44 #define GDC_REG_TEX_BORDER_COLOR 0x00000494L
45 #define GDC_REG_LINE_PATTERN_OFFSET 0x000003E0L
47 /* Coomand Code */
48 #define GDC_CMD_PIXEL 0x00000000L
49 #define GDC_CMD_PIXEL_Z 0x00000001L
51 #define GDC_CMD_X_VECTOR 0x00000020L
52 #define GDC_CMD_Y_VECTOR 0x00000021L
53 #define GDC_CMD_X_VECTOR_NOEND 0x00000022L
54 #define GDC_CMD_Y_VECTOR_NOEND 0x00000023L
55 #define GDC_CMD_X_VECTOR_BLPO 0x00000024L
56 #define GDC_CMD_Y_VECTOR_BLPO 0x00000025L
57 #define GDC_CMD_X_VECTOR_NOEND_BLPO 0x00000026L
58 #define GDC_CMD_Y_VECTOR_NOEND_BLPO 0x00000027L
59 #define GDC_CMD_AA_X_VECTOR 0x00000028L
60 #define GDC_CMD_AA_Y_VECTOR 0x00000029L
61 #define GDC_CMD_AA_X_VECTOR_NOEND 0x0000002AL
62 #define GDC_CMD_AA_Y_VECTOR_NOEND 0x0000002BL
63 #define GDC_CMD_AA_X_VECTOR_BLPO 0x0000002CL
64 #define GDC_CMD_AA_Y_VECTOR_BLPO 0x0000002DL
65 #define GDC_CMD_AA_X_VECTOR_NOEND_BLPO 0x0000002EL
66 #define GDC_CMD_AA_Y_VECTOR_NOEND_BLPO 0x0000002FL
68 #define GDC_CMD_0_VECTOR 0x00000030L
69 #define GDC_CMD_1_VECTOR 0x00000031L
70 #define GDC_CMD_0_VECTOR_NOEND 0x00000032L
71 #define GDC_CMD_1_VECTOR_NOEND 0x00000033L
72 #define GDC_CMD_0_VECTOR_BLPO 0x00000034L
73 #define GDC_CMD_1_VECTOR_BLPO 0x00000035L
74 #define GDC_CMD_0_VECTOR_NOEND_BLPO 0x00000036L
75 #define GDC_CMD_1_VECTOR_NOEND_BLPO 0x00000037L
76 #define GDC_CMD_AA_0_VECTOR 0x00000038L
77 #define GDC_CMD_AA_1_VECTOR 0x00000039L
78 #define GDC_CMD_AA_0_VECTOR_NOEND 0x0000003AL
79 #define GDC_CMD_AA_1_VECTOR_NOEND 0x0000003BL
80 #define GDC_CMD_AA_0_VECTOR_BLPO 0x0000003CL
81 #define GDC_CMD_AA_1_VECTOR_BLPO 0x0000003DL
82 #define GDC_CMD_AA_0_VECTOR_NOEND_BLPO 0x0000003EL
83 #define GDC_CMD_AA_1_VECTOR_NOEND_BLPO 0x0000003FL
85 #define GDC_CMD_BLT_FILL 0x00000041L
86 #define GDC_CMD_BLT_DRAW 0x00000042L
87 #define GDC_CMD_BITMAP 0x00000043L
88 #define GDC_CMD_BLTCOPY_TOP_LEFT 0x00000044L
89 #define GDC_CMD_BLTCOPY_TOP_RIGHT 0x00000045L
90 #define GDC_CMD_BLTCOPY_BOTTOM_LEFT 0x00000046L
91 #define GDC_CMD_BLTCOPY_BOTTOM_RIGHT 0x00000047L
92 #define GDC_CMD_LOAD_TEXTURE 0x00000048L
93 #define GDC_CMD_LOAD_TILE 0x00000049L
95 #define GDC_CMD_TRAP_RIGHT 0x00000060L
96 #define GDC_CMD_TRAP_LEFT 0x00000061L
97 #define GDC_CMD_TRIANGLE_FAN 0x00000062L
98 #define GDC_CMD_FLAG_TRIANGLE_FAN 0x00000063L
100 #define GDC_CMD_FLUSH_FB 0x000000C1L
101 #define GDC_CMD_FLUSH_Z 0x000000C2L
103 #define GDC_CMD_POLYGON_BEGIN 0x000000E0L
104 #define GDC_CMD_POLYGON_END 0x000000E1L
105 #define GDC_CMD_CLEAR_POLY_FLAG 0x000000E2L
106 #define GDC_CMD_NORMAL 0x000000FFL
108 #define GDC_CMD_VECTOR_BLPO_FLAG 0x00040000L
109 #define GDC_CMD_FAST_VECTOR_BLPO_FLAG 0x00000004L
111 /* for MB86293 or later */
112 #define GDC_CMD_MDR1 0x00000000L
113 #define GDC_CMD_MDR1S 0x00000002L
114 #define GDC_CMD_MDR1B 0x00000004L
115 #define GDC_CMD_MDR2 0x00000001L
116 #define GDC_CMD_MDR2S 0x00000003L
117 #define GDC_CMD_MDR2TL 0x00000007L
118 #define GDC_CMD_GMDR1E 0x00000010L
119 #define GDC_CMD_GMDR2E 0x00000020L
120 #define GDC_CMD_OVERLAP_SHADOW_XY 0x00000000L
121 #define GDC_CMD_OVERLAP_SHADOW_XY_COMPOSITION 0x00000001L
122 #define GDC_CMD_OVERLAP_Z_PACKED_ONBS 0x00000007L
123 #define GDC_CMD_OVERLAP_Z_ORIGIN 0x00000000L
124 #define GDC_CMD_OVERLAP_Z_NON_TOPLEFT 0x00000001L
125 #define GDC_CMD_OVERLAP_Z_BORDER 0x00000002L
126 #define GDC_CMD_OVERLAP_Z_SHADOW 0x00000003L
127 #define GDC_CMD_BLTCOPY_ALT_ALPHA 0x00000000L /* Reserverd */
128 #define GDC_CMD_DC_LOGOUT 0x00000000L /* Reserverd */
129 #define GDC_CMD_BODY_FORE_COLOR 0x00000000L
130 #define GDC_CMD_BODY_BACK_COLOR 0x00000001L
131 #define GDC_CMD_SHADOW_FORE_COLOR 0x00000002L
132 #define GDC_CMD_SHADOW_BACK_COLOR 0x00000003L
133 #define GDC_CMD_BORDER_FORE_COLOR 0x00000004L
134 #define GDC_CMD_BORDER_BACK_COLOR 0x00000005L
136 /* Type Code Table */
137 #define GDC_TYPE_G_NOP 0x00000020L
138 #define GDC_TYPE_G_BEGIN 0x00000021L
139 #define GDC_TYPE_G_BEGINCONT 0x00000022L
140 #define GDC_TYPE_G_END 0x00000023L
141 #define GDC_TYPE_G_VERTEX 0x00000030L
142 #define GDC_TYPE_G_VERTEXLOG 0x00000032L
143 #define GDC_TYPE_G_VERTEXNOPLOG 0x00000033L
144 #define GDC_TYPE_G_INIT 0x00000040L
145 #define GDC_TYPE_G_VIEWPORT 0x00000041L
146 #define GDC_TYPE_G_DEPTHRANGE 0x00000042L
147 #define GDC_TYPE_G_LOADMATRIX 0x00000043L
148 #define GDC_TYPE_G_VIEWVOLUMEXYCLIP 0x00000044L
149 #define GDC_TYPE_G_VIEWVOLUMEZCLIP 0x00000045L
150 #define GDC_TYPE_G_VIEWVOLUMEWCLIP 0x00000046L
151 #define GDC_TYPE_SETLVERTEX2I 0x00000072L
152 #define GDC_TYPE_SETLVERTEX2IP 0x00000073L
153 #define GDC_TYPE_SETMODEREGISTER 0x000000C0L
154 #define GDC_TYPE_SETGMODEREGISTER 0x000000C1L
155 #define GDC_TYPE_OVERLAPXYOFFT 0x000000C8L
156 #define GDC_TYPE_OVERLAPZOFFT 0x000000C9L
157 #define GDC_TYPE_DC_LOGOUTADDR 0x000000CCL
158 #define GDC_TYPE_SETCOLORREGISTER 0x000000CEL
159 #define GDC_TYPE_G_BEGINE 0x000000E1L
160 #define GDC_TYPE_G_BEGINCONTE 0x000000E2L
161 #define GDC_TYPE_G_ENDE 0x000000E3L
162 #define GDC_TYPE_DRAWPIXEL 0x00000000L
163 #define GDC_TYPE_DRAWPIXELZ 0x00000001L
164 #define GDC_TYPE_DRAWLINE 0x00000002L
165 #define GDC_TYPE_DRAWLINE2I 0x00000003L
166 #define GDC_TYPE_DRAWLINE2IP 0x00000004L
167 #define GDC_TYPE_DRAWTRAP 0x00000005L
168 #define GDC_TYPE_DRAWVERTEX2I 0x00000006L
169 #define GDC_TYPE_DRAWVERTEX2IP 0x00000007L
170 #define GDC_TYPE_DRAWRECTP 0x00000009L
171 #define GDC_TYPE_DRAWBITMAPP 0x0000000BL
172 #define GDC_TYPE_BLTCOPYP 0x0000000DL
173 #define GDC_TYPE_BLTCOPYALTERNATEP 0x0000000FL
174 #define GDC_TYPE_LOADTEXTUREP 0x00000011L
175 #define GDC_TYPE_BLTTEXTUREP 0x00000013L
176 #define GDC_TYPE_BLTCOPYALTALPHABLENDP 0x0000001FL
177 #define GDC_TYPE_SETVERTEX2I 0x00000070L
178 #define GDC_TYPE_SETVERTEX2IP 0x00000071L
179 #define GDC_TYPE_DRAW 0x000000F0L
180 #define GDC_TYPE_SETREGISTER 0x000000F1L
181 #define GDC_TYPE_SYNC 0x000000FCL
182 #define GDC_TYPE_INTERRUPT 0x000000FDL
183 #define GDC_TYPE_NOP 0x0
185 /* Raster operation */
186 #define GDC_ROP_CLEAR 0x0000
187 #define GDC_ROP_AND 0x0001
188 #define GDC_ROP_AND_REVERSE 0x0002
189 #define GDC_ROP_COPY 0x0003
190 #define GDC_ROP_AND_INVERTED 0x0004
191 #define GDC_ROP_NOP 0x0005
192 #define GDC_ROP_XOR 0x0006
193 #define GDC_ROP_OR 0x0007
194 #define GDC_ROP_NOR 0x0008
195 #define GDC_ROP_EQUIV 0x0009
196 #define GDC_ROP_INVERT 0x000A
197 #define GDC_ROP_OR_REVERSE 0x000B
198 #define GDC_ROP_COPY_INVERTED 0x000C
199 #define GDC_ROP_OR_INVERTED 0x000D
200 #define GDC_ROP_NAND 0x000E
201 #define GDC_ROP_SET 0x000F
203 #endif