1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54#ifndef _SISUSB_INIT_H_
55#define _SISUSB_INIT_H_
56
57
58#define ModeText 0x00
59#define ModeCGA 0x01
60#define ModeEGA 0x02
61#define ModeVGA 0x03
62#define Mode15Bpp 0x04
63#define Mode16Bpp 0x05
64#define Mode24Bpp 0x06
65#define Mode32Bpp 0x07
66
67#define ModeTypeMask 0x07
68#define IsTextMode 0x07
69
70#define DACInfoFlag 0x0018
71#define MemoryInfoFlag 0x01E0
72#define MemorySizeShift 5
73
74
75#define Charx8Dot 0x0200
76#define LineCompareOff 0x0400
77#define CRT2Mode 0x0800
78#define HalfDCLK 0x1000
79#define NoSupportSimuTV 0x2000
80#define NoSupportLCDScale 0x4000
81#define DoubleScanMode 0x8000
82
83
84#define SupportTV 0x0008
85#define SupportTV1024 0x0800
86#define SupportCHTV 0x0800
87#define Support64048060Hz 0x0800
88#define SupportHiVision 0x0010
89#define SupportYPbPr750p 0x1000
90#define SupportLCD 0x0020
91#define SupportRAMDAC2 0x0040
92#define SupportRAMDAC2_135 0x0100
93#define SupportRAMDAC2_162 0x0200
94#define SupportRAMDAC2_202 0x0400
95#define InterlaceMode 0x0080
96#define SyncPP 0x0000
97#define SyncPN 0x4000
98#define SyncNP 0x8000
99#define SyncNN 0xc000
100
101
102#define ProgrammingCRT2 0x0001
103#define LowModeTests 0x0002
104#define LCDVESATiming 0x0008
105#define EnableLVDSDDA 0x0010
106#define SetDispDevSwitchFlag 0x0020
107#define CheckWinDos 0x0040
108#define SetDOSMode 0x0080
109
110
111#define SIS_RI_320x200 0
112#define SIS_RI_320x240 1
113#define SIS_RI_320x400 2
114#define SIS_RI_400x300 3
115#define SIS_RI_512x384 4
116#define SIS_RI_640x400 5
117#define SIS_RI_640x480 6
118#define SIS_RI_800x600 7
119#define SIS_RI_1024x768 8
120#define SIS_RI_1280x1024 9
121#define SIS_RI_1600x1200 10
122#define SIS_RI_1920x1440 11
123#define SIS_RI_2048x1536 12
124#define SIS_RI_720x480 13
125#define SIS_RI_720x576 14
126#define SIS_RI_1280x960 15
127#define SIS_RI_800x480 16
128#define SIS_RI_1024x576 17
129#define SIS_RI_1280x720 18
130#define SIS_RI_856x480 19
131#define SIS_RI_1280x768 20
132#define SIS_RI_1400x1050 21
133#define SIS_RI_1152x864 22
134#define SIS_RI_848x480 23
135#define SIS_RI_1360x768 24
136#define SIS_RI_1024x600 25
137#define SIS_RI_1152x768 26
138#define SIS_RI_768x576 27
139#define SIS_RI_1360x1024 28
140#define SIS_RI_1680x1050 29
141#define SIS_RI_1280x800 30
142#define SIS_RI_1920x1080 31
143#define SIS_RI_960x540 32
144#define SIS_RI_960x600 33
145
146#define SIS_VIDEO_CAPTURE 0x00 - 0x30
147#define SIS_VIDEO_PLAYBACK 0x02 - 0x30
148#define SIS_CRT2_PORT_04 0x04 - 0x30
149
150int SiSUSBSetMode(struct SiS_Private *SiS_Pr, unsigned short ModeNo);
151int SiSUSBSetVESAMode(struct SiS_Private *SiS_Pr, unsigned short VModeNo);
152
153extern int sisusb_setreg(struct sisusb_usb_data *sisusb, u32 port, u8 data);
154extern int sisusb_getreg(struct sisusb_usb_data *sisusb, u32 port, u8 * data);
155extern int sisusb_setidxreg(struct sisusb_usb_data *sisusb, u32 port,
156 u8 index, u8 data);
157extern int sisusb_getidxreg(struct sisusb_usb_data *sisusb, u32 port,
158 u8 index, u8 * data);
159extern int sisusb_setidxregandor(struct sisusb_usb_data *sisusb, u32 port,
160 u8 idx, u8 myand, u8 myor);
161extern int sisusb_setidxregor(struct sisusb_usb_data *sisusb, u32 port,
162 u8 index, u8 myor);
163extern int sisusb_setidxregand(struct sisusb_usb_data *sisusb, u32 port,
164 u8 idx, u8 myand);
165
166void sisusb_delete(struct kref *kref);
167int sisusb_writeb(struct sisusb_usb_data *sisusb, u32 adr, u8 data);
168int sisusb_readb(struct sisusb_usb_data *sisusb, u32 adr, u8 * data);
169int sisusb_copy_memory(struct sisusb_usb_data *sisusb, u8 *src,
170 u32 dest, int length);
171int sisusb_reset_text_mode(struct sisusb_usb_data *sisusb, int init);
172int sisusbcon_do_font_op(struct sisusb_usb_data *sisusb, int set, int slot,
173 u8 * arg, int cmapsz, int ch512, int dorecalc,
174 struct vc_data *c, int fh, int uplock);
175void sisusb_set_cursor(struct sisusb_usb_data *sisusb, unsigned int location);
176int sisusb_console_init(struct sisusb_usb_data *sisusb, int first, int last);
177void sisusb_console_exit(struct sisusb_usb_data *sisusb);
178void sisusb_init_concode(void);
179
180#endif
181