staging: panel: fix lcd type
[firefly-linux-kernel-4.4.55.git] / drivers / staging / xgifb / vb_def.h
1 #ifndef _VB_DEF_
2 #define _VB_DEF_
3 #include "../../video/sis/initdef.h"
4
5 #define VB_XGI301C      0x0020 /* for 301C */
6
7 #define SupportCRT2in301C       0x0100  /* for 301C */
8 #define SetCHTVOverScan         0x8000
9
10 #define Panel_320x480            0x07 /*fstn*/
11 #define PanelResInfo            0x1F /* CR36 Panel Type/LCDResInfo */
12 #define Panel_1024x768x75        0x22
13 #define Panel_1280x1024x75       0x23
14
15 #define PanelRef60Hz            0x00
16 #define PanelRef75Hz            0x20
17
18 #define YPbPr525iVCLK           0x03B
19 #define YPbPr525iVCLK_2         0x03A
20
21 #define XGI_CRT2_PORT_00        (0x00 - 0x030)
22
23 #define SupportAllCRT2      0x0078
24 #define NoSupportTV         0x0070
25 #define NoSupportHiVisionTV 0x0060
26 #define NoSupportLCD        0x0058
27
28 /* -------------- SetMode Stack/Scratch */
29 #define XGI_SetCRT2ToLCDA   0x0100
30 #define SetCRT2ToDualEdge   0x8000
31
32 #define ReserveTVOption     0x0008
33 #define GatingCRT           0x0800
34 #define DisableChB          0x1000
35 #define EnableChB           0x2000
36 #define DisableChA          0x4000
37 #define EnableChA           0x8000
38
39 #define SetTVLowResolution   0x0400
40 #define TVSimuMode           0x0800
41 #define RPLLDIV2XO           0x1000
42 #define NTSC1024x768         0x2000
43 #define SetTVLockMode        0x4000
44
45 #define XGI_LCDVESATiming    0x0001 /* LCD Info/CR37 */
46 #define XGI_EnableLVDSDDA    0x0002
47 #define EnableScalingLCD     0x0008
48 #define SetPWDEnable         0x0004
49 #define SetLCDtoNonExpanding 0x0010
50 #define SetLCDDualLink       0x0100
51 #define SetLCDLowResolution  0x0200
52 #define SetLCDStdMode        0x0400
53
54 /* LCD Capability shampoo */
55 #define DefaultLCDCap        0x80ea
56 #define EnableLCD24bpp       0x0004 /* default */
57 #define DisableLCD24bpp      0x0000
58 #define LCDPolarity          0x00c0 /* default: SyncNN */
59 #define XGI_LCDDualLink      0x0100
60 #define EnableSpectrum       0x0200
61 #define PWDEnable            0x0400
62 #define EnableVBCLKDRVLOW    0x4000
63 #define EnablePLLSPLOW       0x8000
64
65 #define AVIDEOSense          0x01   /* CR32 */
66 #define SVIDEOSense          0x02
67 #define SCARTSense           0x04
68 #define LCDSense             0x08
69 #define Monitor2Sense        0x10
70 #define Monitor1Sense        0x20
71 #define HiTVSense            0x40
72
73 #define YPbPrSense           0x80   /* NEW SCRATCH */
74
75 #define TVSense              0xc7
76
77 #define YPbPrMode            0xe0
78 #define YPbPrMode525i        0x00
79 #define YPbPrMode525p        0x20
80 #define YPbPrMode750p        0x40
81 #define YPbPrMode1080i       0x60
82
83 #define ScalingLCD           0x08
84
85 #define SetYPbPr             0x04
86
87 /* ---------------------- VUMA Information */
88 #define DisplayDeviceFromCMOS 0x10
89
90 /* ---------------------- HK Evnet Definition */
91 #define XGI_ModeSwitchStatus  0xf0
92 #define ActiveCRT1            0x10
93 #define ActiveLCD             0x0020
94 #define ActiveTV              0x40
95 #define ActiveCRT2            0x80
96
97 #define ActiveAVideo          0x01
98 #define ActiveSVideo          0x02
99 #define ActiveSCART           0x04
100 #define ActiveHiTV            0x08
101 #define ActiveYPbPr           0x10
102
103 #define NTSC1024x768HT       1908
104
105 #define YPbPrTV525iHT        1716 /* YPbPr */
106 #define YPbPrTV525iVT         525
107 #define YPbPrTV525pHT        1716
108 #define YPbPrTV525pVT         525
109 #define YPbPrTV750pHT        1650
110 #define YPbPrTV750pVT         750
111
112 #define VCLK25_175           0x00
113 #define VCLK28_322           0x01
114 #define VCLK31_5             0x02
115 #define VCLK36               0x03
116 #define VCLK43_163           0x05
117 #define VCLK44_9             0x06
118 #define VCLK49_5             0x07
119 #define VCLK50               0x08
120 #define VCLK52_406           0x09
121 #define VCLK56_25            0x0A
122 #define VCLK68_179           0x0D
123 #define VCLK72_852           0x0E
124 #define VCLK75               0x0F
125 #define VCLK78_75            0x11
126 #define VCLK79_411           0x12
127 #define VCLK83_95            0x13
128 #define VCLK86_6             0x15
129 #define VCLK94_5             0x16
130 #define VCLK113_309          0x1B
131 #define VCLK116_406          0x1C
132 #define VCLK135_5            0x1E
133 #define VCLK139_054          0x1F
134 #define VCLK157_5            0x20
135 #define VCLK162              0x21
136 #define VCLK175              0x22
137 #define VCLK189              0x23
138 #define VCLK202_5            0x25
139 #define VCLK229_5            0x26
140 #define VCLK234              0x27
141 #define VCLK254_817          0x29
142 #define VCLK266_952          0x2B
143 #define VCLK269_655          0x2C
144 #define VCLK277_015          0x2E
145 #define VCLK291_132          0x30
146 #define VCLK291_766          0x31
147 #define VCLK315_195          0x33
148 #define VCLK323_586          0x34
149 #define VCLK330_615          0x35
150 #define VCLK340_477          0x37
151 #define VCLK375_847          0x38
152 #define VCLK388_631          0x39
153 #define VCLK125_999          0x51
154 #define VCLK148_5            0x52
155 #define VCLK217_325          0x55
156 #define XGI_YPbPr750pVCLK    0x57
157
158 #define VCLK39_77            0x40
159 #define YPbPr525pVCLK        0x3A
160 #define NTSC1024VCLK         0x41
161 #define VCLK35_2             0x49 /* ; 800x480 */
162 #define VCLK122_61           0x4A
163 #define VCLK80_350           0x4B
164 #define VCLK107_385          0x4C
165
166 #define RES320x200           0x00
167 #define RES320x240           0x01
168 #define RES400x300           0x02
169 #define RES512x384           0x03
170 #define RES640x400           0x04
171 #define RES640x480x60        0x05
172 #define RES640x480x72        0x06
173 #define RES640x480x75        0x07
174 #define RES640x480x85        0x08
175 #define RES640x480x100       0x09
176 #define RES640x480x120       0x0A
177 #define RES640x480x160       0x0B
178 #define RES640x480x200       0x0C
179 #define RES800x600x56        0x0D
180 #define RES800x600x60        0x0E
181 #define RES800x600x72        0x0F
182 #define RES800x600x75        0x10
183 #define RES800x600x85        0x11
184 #define RES800x600x100       0x12
185 #define RES800x600x120       0x13
186 #define RES800x600x160       0x14
187 #define RES1024x768x43       0x15
188 #define RES1024x768x60       0x16
189 #define RES1024x768x70       0x17
190 #define RES1024x768x75       0x18
191 #define RES1024x768x85       0x19
192 #define RES1024x768x100      0x1A
193 #define RES1024x768x120      0x1B
194 #define RES1280x1024x43      0x1C
195 #define RES1280x1024x60      0x1D
196 #define RES1280x1024x75      0x1E
197 #define RES1280x1024x85      0x1F
198 #define RES1600x1200x60      0x20
199 #define RES1600x1200x65      0x21
200 #define RES1600x1200x70      0x22
201 #define RES1600x1200x75      0x23
202 #define RES1600x1200x85      0x24
203 #define RES1600x1200x100     0x25
204 #define RES1600x1200x120     0x26
205 #define RES1920x1440x60      0x27
206 #define RES1920x1440x65      0x28
207 #define RES1920x1440x70      0x29
208 #define RES1920x1440x75      0x2A
209 #define RES1920x1440x85      0x2B
210 #define RES1920x1440x100     0x2C
211 #define RES2048x1536x60      0x2D
212 #define RES2048x1536x65      0x2E
213 #define RES2048x1536x70      0x2F
214 #define RES2048x1536x75      0x30
215 #define RES2048x1536x85      0x31
216 #define RES800x480x60        0x32
217 #define RES800x480x75        0x33
218 #define RES800x480x85        0x34
219 #define RES1024x576x60       0x35
220 #define RES1024x576x75       0x36
221 #define RES1024x576x85       0x37
222 #define RES1280x720x60       0x38
223 #define RES1280x720x75       0x39
224 #define RES1280x720x85       0x3A
225 #define RES1280x960x60       0x3B
226 #define RES720x480x60        0x3C
227 #define RES720x576x56        0x3D
228 #define RES856x480x79I       0x3E
229 #define RES856x480x60        0x3F
230 #define RES1280x768x60       0x40
231 #define RES1400x1050x60      0x41
232 #define RES1152x864x60       0x42
233 #define RES1152x864x75       0x43
234 #define RES1024x768x160      0x44
235 #define RES1280x960x75       0x45
236 #define RES1280x960x85       0x46
237 #define RES1280x960x120      0x47
238
239
240 #define XG27_CR8F 0x0C
241 #define XG27_SR36 0x30
242 #define XG27_SR40 0x04
243 #define XG27_SR41 0x00
244 #define XG40_CRCF 0x13
245 #define XGI330_CRT2Data_1_2 0
246 #define XGI330_CRT2Data_4_D 0
247 #define XGI330_CRT2Data_4_E 0
248 #define XGI330_CRT2Data_4_10 0x80
249 #define XGI330_SR07 0x18
250 #define XGI330_SR1F 0
251 #define XGI330_SR23 0xf6
252 #define XGI330_SR24 0x0d
253 #define XGI330_SR31 0xc0
254 #define XGI330_SR32 0x11
255 #define XGI330_SR33 0
256
257 extern const struct XGI_ExtStruct XGI330_EModeIDTable[];
258 extern const struct XGI_Ext2Struct XGI330_RefIndex[];
259 extern const struct XGI_CRT1TableStruct XGI_CRT1Table[];
260 extern const struct XGI_ECLKDataStruct XGI340_ECLKData[];
261 extern const struct SiS_VCLKData XGI_VCLKData[];
262 extern const unsigned char XGI340_CR6B[][4];
263 extern const unsigned char XGI340_AGPReg[];
264
265 #endif