spi-topcliff-pch: add recovery processing in case wait-event timeout
[zen-stable.git] / drivers / staging / xgifb / XGI_main.h
blob35f7b2a485e1aecd75853b1ed2e4128ddb9ae329
1 #ifndef _XGIFB_MAIN
2 #define _XGIFB_MAIN
5 /* ------------------- Constant Definitions ------------------------- */
8 #include "XGIfb.h"
9 #include "vb_struct.h"
10 #include "vb_def.h"
12 #define XGIFAIL(x) do { printk(x "\n"); return -EINVAL; } while (0)
14 #ifndef PCI_VENDOR_ID_XG
15 #define PCI_VENDOR_ID_XG 0x18CA
16 #endif
18 #ifndef PCI_DEVICE_ID_XG_40
19 #define PCI_DEVICE_ID_XG_40 0x040
20 #endif
21 #ifndef PCI_DEVICE_ID_XG_41
22 #define PCI_DEVICE_ID_XG_41 0x041
23 #endif
24 #ifndef PCI_DEVICE_ID_XG_42
25 #define PCI_DEVICE_ID_XG_42 0x042
26 #endif
27 #ifndef PCI_DEVICE_ID_XG_20
28 #define PCI_DEVICE_ID_XG_20 0x020
29 #endif
30 #ifndef PCI_DEVICE_ID_XG_27
31 #define PCI_DEVICE_ID_XG_27 0x027
32 #endif
34 static DEFINE_PCI_DEVICE_TABLE(xgifb_pci_table) = {
35 {PCI_DEVICE(PCI_VENDOR_ID_XG, PCI_DEVICE_ID_XG_20)},
36 {PCI_DEVICE(PCI_VENDOR_ID_XG, PCI_DEVICE_ID_XG_27)},
37 {PCI_DEVICE(PCI_VENDOR_ID_XG, PCI_DEVICE_ID_XG_40)},
38 {PCI_DEVICE(PCI_VENDOR_ID_XG, PCI_DEVICE_ID_XG_42)},
39 {0}
42 MODULE_DEVICE_TABLE(pci, xgifb_pci_table);
44 /* To be included in fb.h */
45 #ifndef FB_ACCEL_XGI_XABRE
46 #define FB_ACCEL_XGI_XABRE 41 /* XGI 330 ("Xabre") */
47 #endif
49 #define SEQ_DATA 0x15
51 #define XGISR (xgifb_info->dev_info.P3c4)
52 #define XGICR (xgifb_info->dev_info.P3d4)
53 #define XGIDACA (xgifb_info->dev_info.P3c8)
54 #define XGIDACD (xgifb_info->dev_info.P3c9)
55 #define XGIPART1 (xgifb_info->dev_info.Part1Port)
56 #define XGIPART2 (xgifb_info->dev_info.Part2Port)
57 #define XGIPART3 (xgifb_info->dev_info.Part3Port)
58 #define XGIPART4 (xgifb_info->dev_info.Part4Port)
59 #define XGIPART5 (xgifb_info->dev_info.Part5Port)
60 #define XGIDAC2A XGIPART5
61 #define XGIDAC2D (XGIPART5 + 1)
63 #define IND_XGI_PASSWORD 0x05 /* SRs */
64 #define IND_XGI_RAMDAC_CONTROL 0x07
65 #define IND_XGI_DRAM_SIZE 0x14
66 #define IND_XGI_MODULE_ENABLE 0x1E
67 #define IND_XGI_PCI_ADDRESS_SET 0x20
69 #define IND_XGI_SCRATCH_REG_CR30 0x30 /* CRs */
70 #define IND_XGI_SCRATCH_REG_CR31 0x31
71 #define IND_XGI_SCRATCH_REG_CR32 0x32
72 #define IND_XGI_SCRATCH_REG_CR33 0x33
73 #define IND_XGI_LCD_PANEL 0x36
74 #define IND_XGI_SCRATCH_REG_CR37 0x37
76 #define IND_XGI_CRT2_WRITE_ENABLE_315 0x2F
78 #define XGI_PASSWORD 0x86 /* SR05 */
80 #define XGI_DRAM_SIZE_MASK 0xF0 /*SR14 */
81 #define XGI_DRAM_SIZE_1MB 0x00
82 #define XGI_DRAM_SIZE_2MB 0x01
83 #define XGI_DRAM_SIZE_4MB 0x02
84 #define XGI_DRAM_SIZE_8MB 0x03
85 #define XGI_DRAM_SIZE_16MB 0x04
86 #define XGI_DRAM_SIZE_32MB 0x05
87 #define XGI_DRAM_SIZE_64MB 0x06
88 #define XGI_DRAM_SIZE_128MB 0x07
89 #define XGI_DRAM_SIZE_256MB 0x08
91 #define XGI_ENABLE_2D 0x40 /* SR1E */
93 #define XGI_MEM_MAP_IO_ENABLE 0x01 /* SR20 */
94 #define XGI_PCI_ADDR_ENABLE 0x80
96 #define XGI_SIMULTANEOUS_VIEW_ENABLE 0x01 /* CR30 */
97 #define XGI_VB_OUTPUT_COMPOSITE 0x04
98 #define XGI_VB_OUTPUT_SVIDEO 0x08
99 #define XGI_VB_OUTPUT_SCART 0x10
100 #define XGI_VB_OUTPUT_LCD 0x20
101 #define XGI_VB_OUTPUT_CRT2 0x40
102 #define XGI_VB_OUTPUT_HIVISION 0x80
104 #define XGI_VB_OUTPUT_DISABLE 0x20 /* CR31 */
105 #define XGI_DRIVER_MODE 0x40
107 #define XGI_VB_COMPOSITE 0x01 /* CR32 */
108 #define XGI_VB_SVIDEO 0x02
109 #define XGI_VB_SCART 0x04
110 #define XGI_VB_LCD 0x08
111 #define XGI_VB_CRT2 0x10
112 #define XGI_CRT1 0x20
113 #define XGI_VB_HIVISION 0x40
114 #define XGI_VB_YPBPR 0x80
115 #define XGI_VB_TV (XGI_VB_COMPOSITE | XGI_VB_SVIDEO | \
116 XGI_VB_SCART | XGI_VB_HIVISION|XGI_VB_YPBPR)
118 #define XGI_EXTERNAL_CHIP_MASK 0x0E /* CR37 */
119 #define XGI310_EXTERNAL_CHIP_LVDS 0x02 /* in CR37 << 1 ! */
120 #define XGI310_EXTERNAL_CHIP_LVDS_CHRONTEL 0x03 /* in CR37 << 1 ! */
122 /* ------------------- Global Variables ----------------------------- */
124 /* display status */
125 static int XGIfb_crt1off;
126 static int XGIfb_forcecrt1 = -1;
128 /* global flags */
129 static int XGIfb_tvmode;
130 static int enable_dstn;
131 static int XGIfb_ypan = -1;
133 /* TW: CRT2 type (for overriding autodetection) */
134 static int XGIfb_crt2type = -1;
135 /* PR: Tv plug type (for overriding autodetection) */
136 static int XGIfb_tvplug = -1;
138 /* TW: For ioctl XGIFB_GET_INFO */
139 /* XGIfb_info XGIfbinfo; */
141 #define MD_XGI300 1
142 #define MD_XGI315 2
144 /* mode table */
145 static const struct _XGIbios_mode {
146 char name[15];
147 u8 mode_no;
148 u16 vesa_mode_no_1; /* "XGI defined" VESA mode number */
149 u16 vesa_mode_no_2; /* Real VESA mode numbers */
150 u16 xres;
151 u16 yres;
152 u16 bpp;
153 u16 rate_idx;
154 u16 cols;
155 u16 rows;
156 u8 chipset;
157 } XGIbios_mode[] = {
158 {"320x240x16", 0x56, 0x0000, 0x0000, 320, 240, 16, 1, 40, 15,
159 MD_XGI315},
160 {"320x480x8", 0x5A, 0x0000, 0x0000, 320, 480, 8, 1, 40, 30,
161 MD_XGI315}, /* TW: FSTN */
162 {"320x480x16", 0x5B, 0x0000, 0x0000, 320, 480, 16, 1, 40, 30,
163 MD_XGI315}, /* TW: FSTN */
164 {"640x480x8", 0x2E, 0x0101, 0x0101, 640, 480, 8, 1, 80, 30,
165 MD_XGI300|MD_XGI315},
166 {"640x480x16", 0x44, 0x0111, 0x0111, 640, 480, 16, 1, 80, 30,
167 MD_XGI300|MD_XGI315},
168 {"640x480x24", 0x62, 0x013a, 0x0112, 640, 480, 32, 1, 80, 30,
169 MD_XGI300|MD_XGI315}, /* TW: That's for people who mix up color-
170 and fb depth */
171 {"640x480x32", 0x62, 0x013a, 0x0112, 640, 480, 32, 1, 80, 30,
172 MD_XGI300|MD_XGI315},
173 {"720x480x8", 0x31, 0x0000, 0x0000, 720, 480, 8, 1, 90, 30,
174 MD_XGI300|MD_XGI315},
175 {"720x480x16", 0x33, 0x0000, 0x0000, 720, 480, 16, 1, 90, 30,
176 MD_XGI300|MD_XGI315},
177 {"720x480x24", 0x35, 0x0000, 0x0000, 720, 480, 32, 1, 90, 30,
178 MD_XGI300|MD_XGI315},
179 {"720x480x32", 0x35, 0x0000, 0x0000, 720, 480, 32, 1, 90, 30,
180 MD_XGI300|MD_XGI315},
181 {"720x576x8", 0x32, 0x0000, 0x0000, 720, 576, 8, 1, 90, 36,
182 MD_XGI300|MD_XGI315},
183 {"720x576x16", 0x34, 0x0000, 0x0000, 720, 576, 16, 1, 90, 36,
184 MD_XGI300|MD_XGI315},
185 {"720x576x24", 0x36, 0x0000, 0x0000, 720, 576, 32, 1, 90, 36,
186 MD_XGI300|MD_XGI315},
187 {"720x576x32", 0x36, 0x0000, 0x0000, 720, 576, 32, 1, 90, 36,
188 MD_XGI300|MD_XGI315},
189 {"800x480x8", 0x70, 0x0000, 0x0000, 800, 480, 8, 1, 100, 30,
190 MD_XGI300|MD_XGI315},
191 {"800x480x16", 0x7a, 0x0000, 0x0000, 800, 480, 16, 1, 100, 30,
192 MD_XGI300|MD_XGI315},
193 {"800x480x24", 0x76, 0x0000, 0x0000, 800, 480, 32, 1, 100, 30,
194 MD_XGI300|MD_XGI315},
195 {"800x480x32", 0x76, 0x0000, 0x0000, 800, 480, 32, 1, 100, 30,
196 MD_XGI300|MD_XGI315},
197 {"800x600x8", 0x30, 0x0103, 0x0103, 800, 600, 8, 1, 100, 37,
198 MD_XGI300|MD_XGI315},
199 #define DEFAULT_MODE 20 /* index for 800x600x16 */
200 {"800x600x16", 0x47, 0x0114, 0x0114, 800, 600, 16, 1, 100, 37,
201 MD_XGI300|MD_XGI315},
202 {"800x600x24", 0x63, 0x013b, 0x0115, 800, 600, 32, 1, 100, 37,
203 MD_XGI300|MD_XGI315},
204 {"800x600x32", 0x63, 0x013b, 0x0115, 800, 600, 32, 1, 100, 37,
205 MD_XGI300|MD_XGI315},
206 {"1024x576x8", 0x71, 0x0000, 0x0000, 1024, 576, 8, 1, 128, 36,
207 MD_XGI300|MD_XGI315},
208 {"1024x576x16", 0x74, 0x0000, 0x0000, 1024, 576, 16, 1, 128, 36,
209 MD_XGI300|MD_XGI315},
210 {"1024x576x24", 0x77, 0x0000, 0x0000, 1024, 576, 32, 1, 128, 36,
211 MD_XGI300|MD_XGI315},
212 {"1024x576x32", 0x77, 0x0000, 0x0000, 1024, 576, 32, 1, 128, 36,
213 MD_XGI300|MD_XGI315},
214 {"1024x600x8", 0x20, 0x0000, 0x0000, 1024, 600, 8, 1, 128, 37,
215 MD_XGI300 }, /* TW: 300 series only */
216 {"1024x600x16", 0x21, 0x0000, 0x0000, 1024, 600, 16, 1, 128, 37,
217 MD_XGI300 },
218 {"1024x600x24", 0x22, 0x0000, 0x0000, 1024, 600, 32, 1, 128, 37,
219 MD_XGI300 },
220 {"1024x600x32", 0x22, 0x0000, 0x0000, 1024, 600, 32, 1, 128, 37,
221 MD_XGI300 },
222 {"1024x768x8", 0x38, 0x0105, 0x0105, 1024, 768, 8, 1, 128, 48,
223 MD_XGI300|MD_XGI315},
224 {"1024x768x16", 0x4A, 0x0117, 0x0117, 1024, 768, 16, 1, 128, 48,
225 MD_XGI300|MD_XGI315},
226 {"1024x768x24", 0x64, 0x013c, 0x0118, 1024, 768, 32, 1, 128, 48,
227 MD_XGI300|MD_XGI315},
228 {"1024x768x32", 0x64, 0x013c, 0x0118, 1024, 768, 32, 1, 128, 48,
229 MD_XGI300|MD_XGI315},
230 {"1152x768x8", 0x23, 0x0000, 0x0000, 1152, 768, 8, 1, 144, 48,
231 MD_XGI300 }, /* TW: 300 series only */
232 {"1152x768x16", 0x24, 0x0000, 0x0000, 1152, 768, 16, 1, 144, 48,
233 MD_XGI300 },
234 {"1152x768x24", 0x25, 0x0000, 0x0000, 1152, 768, 32, 1, 144, 48,
235 MD_XGI300 },
236 {"1152x768x32", 0x25, 0x0000, 0x0000, 1152, 768, 32, 1, 144, 48,
237 MD_XGI300 },
238 {"1280x720x8", 0x79, 0x0000, 0x0000, 1280, 720, 8, 1, 160, 45,
239 MD_XGI300|MD_XGI315},
240 {"1280x720x16", 0x75, 0x0000, 0x0000, 1280, 720, 16, 1, 160, 45,
241 MD_XGI300|MD_XGI315},
242 {"1280x720x24", 0x78, 0x0000, 0x0000, 1280, 720, 32, 1, 160, 45,
243 MD_XGI300|MD_XGI315},
244 {"1280x720x32", 0x78, 0x0000, 0x0000, 1280, 720, 32, 1, 160, 45,
245 MD_XGI300|MD_XGI315},
246 {"1280x768x8", 0x23, 0x0000, 0x0000, 1280, 768, 8, 1, 160, 48,
247 MD_XGI315}, /* TW: 310/325 series only */
248 {"1280x768x16", 0x24, 0x0000, 0x0000, 1280, 768, 16, 1, 160, 48,
249 MD_XGI315},
250 {"1280x768x24", 0x25, 0x0000, 0x0000, 1280, 768, 32, 1, 160, 48,
251 MD_XGI315},
252 {"1280x768x32", 0x25, 0x0000, 0x0000, 1280, 768, 32, 1, 160, 48,
253 MD_XGI315},
254 {"1280x960x8", 0x7C, 0x0000, 0x0000, 1280, 960, 8, 1, 160, 60,
255 MD_XGI300|MD_XGI315},
256 {"1280x960x16", 0x7D, 0x0000, 0x0000, 1280, 960, 16, 1, 160, 60,
257 MD_XGI300|MD_XGI315},
258 {"1280x960x24", 0x7E, 0x0000, 0x0000, 1280, 960, 32, 1, 160, 60,
259 MD_XGI300|MD_XGI315},
260 {"1280x960x32", 0x7E, 0x0000, 0x0000, 1280, 960, 32, 1, 160, 60,
261 MD_XGI300|MD_XGI315},
262 {"1280x1024x8", 0x3A, 0x0107, 0x0107, 1280, 1024, 8, 1, 160, 64,
263 MD_XGI300|MD_XGI315},
264 {"1280x1024x16", 0x4D, 0x011a, 0x011a, 1280, 1024, 16, 1, 160, 64,
265 MD_XGI300|MD_XGI315},
266 {"1280x1024x24", 0x65, 0x013d, 0x011b, 1280, 1024, 32, 1, 160, 64,
267 MD_XGI300|MD_XGI315},
268 {"1280x1024x32", 0x65, 0x013d, 0x011b, 1280, 1024, 32, 1, 160, 64,
269 MD_XGI300|MD_XGI315},
270 {"1400x1050x8", 0x26, 0x0000, 0x0000, 1400, 1050, 8, 1, 175, 65,
271 MD_XGI315}, /* TW: 310/325 series only */
272 {"1400x1050x16", 0x27, 0x0000, 0x0000, 1400, 1050, 16, 1, 175, 65,
273 MD_XGI315},
274 {"1400x1050x24", 0x28, 0x0000, 0x0000, 1400, 1050, 32, 1, 175, 65,
275 MD_XGI315},
276 {"1400x1050x32", 0x28, 0x0000, 0x0000, 1400, 1050, 32, 1, 175, 65,
277 MD_XGI315},
278 {"1600x1200x8", 0x3C, 0x0130, 0x011c, 1600, 1200, 8, 1, 200, 75,
279 MD_XGI300|MD_XGI315},
280 {"1600x1200x16", 0x3D, 0x0131, 0x011e, 1600, 1200, 16, 1, 200, 75,
281 MD_XGI300|MD_XGI315},
282 {"1600x1200x24", 0x66, 0x013e, 0x011f, 1600, 1200, 32, 1, 200, 75,
283 MD_XGI300|MD_XGI315},
284 {"1600x1200x32", 0x66, 0x013e, 0x011f, 1600, 1200, 32, 1, 200, 75,
285 MD_XGI300|MD_XGI315},
286 {"1920x1440x8", 0x68, 0x013f, 0x0000, 1920, 1440, 8, 1, 240, 75,
287 MD_XGI300|MD_XGI315},
288 {"1920x1440x16", 0x69, 0x0140, 0x0000, 1920, 1440, 16, 1, 240, 75,
289 MD_XGI300|MD_XGI315},
290 {"1920x1440x24", 0x6B, 0x0141, 0x0000, 1920, 1440, 32, 1, 240, 75,
291 MD_XGI300|MD_XGI315},
292 {"1920x1440x32", 0x6B, 0x0141, 0x0000, 1920, 1440, 32, 1, 240, 75,
293 MD_XGI300|MD_XGI315},
294 {"2048x1536x8", 0x6c, 0x0000, 0x0000, 2048, 1536, 8, 1, 256, 96,
295 MD_XGI315}, /* TW: 310/325 series only */
296 {"2048x1536x16", 0x6d, 0x0000, 0x0000, 2048, 1536, 16, 1, 256, 96,
297 MD_XGI315},
298 {"2048x1536x24", 0x6e, 0x0000, 0x0000, 2048, 1536, 32, 1, 256, 96,
299 MD_XGI315},
300 {"2048x1536x32", 0x6e, 0x0000, 0x0000, 2048, 1536, 32, 1, 256, 96,
301 MD_XGI315},
302 {"\0", 0x00, 0, 0, 0, 0, 0, 0, 0}
305 /* TW: CR36 evaluation */
306 static const unsigned short XGI300paneltype[] = {
307 LCD_UNKNOWN, LCD_800x600, LCD_1024x768, LCD_1280x1024,
308 LCD_1280x960, LCD_640x480, LCD_1024x600, LCD_1152x768,
309 LCD_1024x768, LCD_1024x768, LCD_1024x768,
310 LCD_1024x768, LCD_1024x768, LCD_1024x768, LCD_1024x768};
312 static const unsigned short XGI310paneltype[] = {
313 LCD_UNKNOWN, LCD_800x600, LCD_1024x768, LCD_1280x1024,
314 LCD_640x480, LCD_1024x600, LCD_1152x864, LCD_1280x960,
315 LCD_1152x768, LCD_1400x1050, LCD_1280x768, LCD_1600x1200,
316 LCD_1024x768, LCD_1024x768, LCD_1024x768};
318 static const struct _XGI_crt2type {
319 char name[10];
320 int type_no;
321 int tvplug_no;
322 } XGI_crt2type[] = {
323 {"NONE", 0, -1},
324 {"LCD", XGIFB_DISP_LCD, -1},
325 {"TV", XGIFB_DISP_TV, -1},
326 {"VGA", XGIFB_DISP_CRT, -1},
327 {"SVIDEO", XGIFB_DISP_TV, TVPLUG_SVIDEO},
328 {"COMPOSITE", XGIFB_DISP_TV, TVPLUG_COMPOSITE},
329 {"SCART", XGIFB_DISP_TV, TVPLUG_SCART},
330 {"none", 0, -1},
331 {"lcd", XGIFB_DISP_LCD, -1},
332 {"tv", XGIFB_DISP_TV, -1},
333 {"vga", XGIFB_DISP_CRT, -1},
334 {"svideo", XGIFB_DISP_TV, TVPLUG_SVIDEO},
335 {"composite", XGIFB_DISP_TV, TVPLUG_COMPOSITE},
336 {"scart", XGIFB_DISP_TV, TVPLUG_SCART},
337 {"\0", -1, -1}
340 /* TV standard */
341 static const struct _XGI_tvtype {
342 char name[6];
343 int type_no;
344 } XGI_tvtype[] = {
345 {"PAL", 1},
346 {"NTSC", 2},
347 {"pal", 1},
348 {"ntsc", 2},
349 {"\0", -1}
352 static const struct _XGI_vrate {
353 u16 idx;
354 u16 xres;
355 u16 yres;
356 u16 refresh;
357 } XGIfb_vrate[] = {
358 {1, 640, 480, 60}, {2, 640, 480, 72},
359 {3, 640, 480, 75}, {4, 640, 480, 85},
361 {5, 640, 480, 100}, {6, 640, 480, 120},
362 {7, 640, 480, 160}, {8, 640, 480, 200},
364 {1, 720, 480, 60},
365 {1, 720, 576, 58},
366 {1, 800, 480, 60}, {2, 800, 480, 75}, {3, 800, 480, 85},
367 {1, 800, 600, 60}, {2, 800, 600, 72}, {3, 800, 600, 75},
368 {4, 800, 600, 85}, {5, 800, 600, 100},
369 {6, 800, 600, 120}, {7, 800, 600, 160},
371 {1, 1024, 768, 60}, {2, 1024, 768, 70}, {3, 1024, 768, 75},
372 {4, 1024, 768, 85}, {5, 1024, 768, 100}, {6, 1024, 768, 120},
373 {1, 1024, 576, 60}, {2, 1024, 576, 75}, {3, 1024, 576, 85},
374 {1, 1024, 600, 60},
375 {1, 1152, 768, 60},
376 {1, 1280, 720, 60}, {2, 1280, 720, 75}, {3, 1280, 720, 85},
377 {1, 1280, 768, 60},
378 {1, 1280, 1024, 60}, {2, 1280, 1024, 75}, {3, 1280, 1024, 85},
379 {1, 1280, 960, 70},
380 {1, 1400, 1050, 60},
381 {1, 1600, 1200, 60}, {2, 1600, 1200, 65},
382 {3, 1600, 1200, 70}, {4, 1600, 1200, 75},
384 {5, 1600, 1200, 85}, {6, 1600, 1200, 100},
385 {7, 1600, 1200, 120},
387 {1, 1920, 1440, 60}, {2, 1920, 1440, 65},
388 {3, 1920, 1440, 70}, {4, 1920, 1440, 75},
390 {5, 1920, 1440, 85}, {6, 1920, 1440, 100},
391 {1, 2048, 1536, 60}, {2, 2048, 1536, 65},
392 {3, 2048, 1536, 70}, {4, 2048, 1536, 75},
394 {5, 2048, 1536, 85},
395 {0, 0, 0, 0}
398 static const struct _chswtable {
399 int subsysVendor;
400 int subsysCard;
401 char *vendorName;
402 char *cardName;
403 } mychswtable[] = {
404 { 0x1631, 0x1002, "Mitachi", "0x1002" },
405 { 0, 0, "" , "" }
408 /* Eden Chen */
409 static const struct _XGI_TV_filter {
410 u8 filter[9][4];
411 } XGI_TV_filter[] = {
412 { { {0x00, 0x00, 0x00, 0x40}, /* NTSCFilter_0 */
413 {0x00, 0xE0, 0x10, 0x60},
414 {0x00, 0xEE, 0x10, 0x44},
415 {0x00, 0xF4, 0x10, 0x38},
416 {0xF8, 0xF4, 0x18, 0x38},
417 {0xFC, 0xFB, 0x14, 0x2A},
418 {0x00, 0x00, 0x10, 0x20},
419 {0x00, 0x04, 0x10, 0x18},
420 {0xFF, 0xFF, 0xFF, 0xFF} } },
421 { { {0x00, 0x00, 0x00, 0x40}, /* NTSCFilter_1 */
422 {0x00, 0xE0, 0x10, 0x60},
423 {0x00, 0xEE, 0x10, 0x44},
424 {0x00, 0xF4, 0x10, 0x38},
425 {0xF8, 0xF4, 0x18, 0x38},
426 {0xFC, 0xFB, 0x14, 0x2A},
427 {0x00, 0x00, 0x10, 0x20},
428 {0x00, 0x04, 0x10, 0x18},
429 {0xFF, 0xFF, 0xFF, 0xFF} } },
430 { { {0x00, 0x00, 0x00, 0x40}, /* NTSCFilter_2 */
431 {0xF5, 0xEE, 0x1B, 0x44},
432 {0xF8, 0xF4, 0x18, 0x38},
433 {0xEB, 0x04, 0x25, 0x18},
434 {0xF1, 0x05, 0x1F, 0x16},
435 {0xF6, 0x06, 0x1A, 0x14},
436 {0xFA, 0x06, 0x16, 0x14},
437 {0x00, 0x04, 0x10, 0x18},
438 {0xFF, 0xFF, 0xFF, 0xFF} } },
439 { { {0x00, 0x00, 0x00, 0x40}, /* NTSCFilter_3 */
440 {0xF1, 0x04, 0x1F, 0x18},
441 {0xEE, 0x0D, 0x22, 0x06},
442 {0xF7, 0x06, 0x19, 0x14},
443 {0xF4, 0x0B, 0x1C, 0x0A},
444 {0xFA, 0x07, 0x16, 0x12},
445 {0xF9, 0x0A, 0x17, 0x0C},
446 {0x00, 0x07, 0x10, 0x12},
447 {0xFF, 0xFF, 0xFF, 0xFF} } },
448 { { {0x00, 0x00, 0x00, 0x40}, /* NTSCFilter_4 */
449 {0x00, 0xE0, 0x10, 0x60},
450 {0x00, 0xEE, 0x10, 0x44},
451 {0x00, 0xF4, 0x10, 0x38},
452 {0xF8, 0xF4, 0x18, 0x38},
453 {0xFC, 0xFB, 0x14, 0x2A},
454 {0x00, 0x00, 0x10, 0x20},
455 {0x00, 0x04, 0x10, 0x18},
456 {0xFF, 0xFF, 0xFF, 0xFF} } },
457 { { {0x00, 0x00, 0x00, 0x40}, /* NTSCFilter_5 */
458 {0xF5, 0xEE, 0x1B, 0x44},
459 {0xF8, 0xF4, 0x18, 0x38},
460 {0xEB, 0x04, 0x25, 0x18},
461 {0xF1, 0x05, 0x1F, 0x16},
462 {0xF6, 0x06, 0x1A, 0x14},
463 {0xFA, 0x06, 0x16, 0x14},
464 {0x00, 0x04, 0x10, 0x18},
465 {0xFF, 0xFF, 0xFF, 0xFF} } },
466 { { {0x00, 0x00, 0x00, 0x40}, /* NTSCFilter_6 */
467 {0xEB, 0x04, 0x25, 0x18},
468 {0xE7, 0x0E, 0x29, 0x04},
469 {0xEE, 0x0C, 0x22, 0x08},
470 {0xF6, 0x0B, 0x1A, 0x0A},
471 {0xF9, 0x0A, 0x17, 0x0C},
472 {0xFC, 0x0A, 0x14, 0x0C},
473 {0x00, 0x08, 0x10, 0x10},
474 {0xFF, 0xFF, 0xFF, 0xFF} } },
475 { { {0x00, 0x00, 0x00, 0x40}, /* NTSCFilter_7 */
476 {0xEC, 0x02, 0x24, 0x1C},
477 {0xF2, 0x04, 0x1E, 0x18},
478 {0xEB, 0x15, 0x25, 0xF6},
479 {0xF4, 0x10, 0x1C, 0x00},
480 {0xF8, 0x0F, 0x18, 0x02},
481 {0x00, 0x04, 0x10, 0x18},
482 {0x01, 0x06, 0x0F, 0x14},
483 {0xFF, 0xFF, 0xFF, 0xFF} } },
484 { { {0x00, 0x00, 0x00, 0x40}, /* PALFilter_0 */
485 {0x00, 0xE0, 0x10, 0x60},
486 {0x00, 0xEE, 0x10, 0x44},
487 {0x00, 0xF4, 0x10, 0x38},
488 {0xF8, 0xF4, 0x18, 0x38},
489 {0xFC, 0xFB, 0x14, 0x2A},
490 {0x00, 0x00, 0x10, 0x20},
491 {0x00, 0x04, 0x10, 0x18},
492 {0xFF, 0xFF, 0xFF, 0xFF} } },
493 { { {0x00, 0x00, 0x00, 0x40}, /* PALFilter_1 */
494 {0x00, 0xE0, 0x10, 0x60},
495 {0x00, 0xEE, 0x10, 0x44},
496 {0x00, 0xF4, 0x10, 0x38},
497 {0xF8, 0xF4, 0x18, 0x38},
498 {0xFC, 0xFB, 0x14, 0x2A},
499 {0x00, 0x00, 0x10, 0x20},
500 {0x00, 0x04, 0x10, 0x18},
501 {0xFF, 0xFF, 0xFF, 0xFF} } },
502 { { {0x00, 0x00, 0x00, 0x40}, /* PALFilter_2 */
503 {0xF5, 0xEE, 0x1B, 0x44},
504 {0xF8, 0xF4, 0x18, 0x38},
505 {0xF1, 0xF7, 0x01, 0x32},
506 {0xF5, 0xFB, 0x1B, 0x2A},
507 {0xF9, 0xFF, 0x17, 0x22},
508 {0xFB, 0x01, 0x15, 0x1E},
509 {0x00, 0x04, 0x10, 0x18},
510 {0xFF, 0xFF, 0xFF, 0xFF} } },
511 { { {0x00, 0x00, 0x00, 0x40}, /* PALFilter_3 */
512 {0xF5, 0xFB, 0x1B, 0x2A},
513 {0xEE, 0xFE, 0x22, 0x24},
514 {0xF3, 0x00, 0x1D, 0x20},
515 {0xF9, 0x03, 0x17, 0x1A},
516 {0xFB, 0x02, 0x14, 0x1E},
517 {0xFB, 0x04, 0x15, 0x18},
518 {0x00, 0x06, 0x10, 0x14},
519 {0xFF, 0xFF, 0xFF, 0xFF} } },
520 { { {0x00, 0x00, 0x00, 0x40}, /* PALFilter_4 */
521 {0x00, 0xE0, 0x10, 0x60},
522 {0x00, 0xEE, 0x10, 0x44},
523 {0x00, 0xF4, 0x10, 0x38},
524 {0xF8, 0xF4, 0x18, 0x38},
525 {0xFC, 0xFB, 0x14, 0x2A},
526 {0x00, 0x00, 0x10, 0x20},
527 {0x00, 0x04, 0x10, 0x18},
528 {0xFF, 0xFF, 0xFF, 0xFF} } },
529 { { {0x00, 0x00, 0x00, 0x40}, /* PALFilter_5 */
530 {0xF5, 0xEE, 0x1B, 0x44},
531 {0xF8, 0xF4, 0x18, 0x38},
532 {0xF1, 0xF7, 0x1F, 0x32},
533 {0xF5, 0xFB, 0x1B, 0x2A},
534 {0xF9, 0xFF, 0x17, 0x22},
535 {0xFB, 0x01, 0x15, 0x1E},
536 {0x00, 0x04, 0x10, 0x18},
537 {0xFF, 0xFF, 0xFF, 0xFF} } },
538 { { {0x00, 0x00, 0x00, 0x40}, /* PALFilter_6 */
539 {0xF5, 0xEE, 0x1B, 0x2A},
540 {0xEE, 0xFE, 0x22, 0x24},
541 {0xF3, 0x00, 0x1D, 0x20},
542 {0xF9, 0x03, 0x17, 0x1A},
543 {0xFB, 0x02, 0x14, 0x1E},
544 {0xFB, 0x04, 0x15, 0x18},
545 {0x00, 0x06, 0x10, 0x14},
546 {0xFF, 0xFF, 0xFF, 0xFF} } },
547 { { {0x00, 0x00, 0x00, 0x40}, /* PALFilter_7 */
548 {0xF5, 0xEE, 0x1B, 0x44},
549 {0xF8, 0xF4, 0x18, 0x38},
550 {0xFC, 0xFB, 0x14, 0x2A},
551 {0xEB, 0x05, 0x25, 0x16},
552 {0xF1, 0x05, 0x1F, 0x16},
553 {0xFA, 0x07, 0x16, 0x12},
554 {0x00, 0x07, 0x10, 0x12},
555 {0xFF, 0xFF, 0xFF, 0xFF} } }
558 static int filter = -1;
560 #endif