Go to the documentation of this file.
31 #define viafb_read_reg(p, i) via_read_reg(p, i)
32 #define viafb_write_reg(i, p, d) via_write_reg(p, i, d)
33 #define viafb_write_reg_mask(i, p, d, m) via_write_reg_mask(p, i, d, m)
36 #define VIA_LDVP0 0x00000001
37 #define VIA_LDVP1 0x00000002
38 #define VIA_DVP0 0x00000004
39 #define VIA_CRT 0x00000010
40 #define VIA_DVP1 0x00000020
41 #define VIA_LVDS1 0x00000040
42 #define VIA_LVDS2 0x00000080
45 #define VIA_STATE_ON 0
46 #define VIA_STATE_STANDBY 1
47 #define VIA_STATE_SUSPEND 2
48 #define VIA_STATE_OFF 3
51 #define VIA_HSYNC_NEGATIVE 0x01
52 #define VIA_VSYNC_NEGATIVE 0x02
57 #define IGA2_HOR_TOTAL_SHADOW_FORMULA(x) ((x/8)-5)
58 #define IGA2_HOR_BLANK_END_SHADOW_FORMULA(x, y) (((x+y)/8)-1)
59 #define IGA2_VER_TOTAL_SHADOW_FORMULA(x) ((x)-2)
60 #define IGA2_VER_ADDR_SHADOW_FORMULA(x) ((x)-1)
61 #define IGA2_VER_BLANK_START_SHADOW_FORMULA(x) ((x)-1)
62 #define IGA2_VER_BLANK_END_SHADOW_FORMULA(x, y) ((x+y)-1)
63 #define IGA2_VER_SYNC_START_SHADOW_FORMULA(x) (x)
64 #define IGA2_VER_SYNC_END_SHADOW_FORMULA(x, y) (x+y)
69 #define IGA2_SHADOW_HOR_TOTAL_REG_NUM 2
71 #define IGA2_SHADOW_HOR_BLANK_END_REG_NUM 1
73 #define IGA2_SHADOW_VER_TOTAL_REG_NUM 2
75 #define IGA2_SHADOW_VER_ADDR_REG_NUM 2
77 #define IGA2_SHADOW_VER_BLANK_START_REG_NUM 2
79 #define IGA2_SHADOW_VER_BLANK_END_REG_NUM 2
81 #define IGA2_SHADOW_VER_SYNC_START_REG_NUM 2
83 #define IGA2_SHADOW_VER_SYNC_END_REG_NUM 1
88 #define IGA1_FETCH_COUNT_REG_NUM 2
90 #define IGA1_FETCH_COUNT_ALIGN_BYTE 16
92 #define IGA1_FETCH_COUNT_PATCH_VALUE 4
93 #define IGA1_FETCH_COUNT_FORMULA(x, y) \
94 (((x*y)/IGA1_FETCH_COUNT_ALIGN_BYTE) + IGA1_FETCH_COUNT_PATCH_VALUE)
97 #define IGA2_FETCH_COUNT_REG_NUM 2
98 #define IGA2_FETCH_COUNT_ALIGN_BYTE 16
99 #define IGA2_FETCH_COUNT_PATCH_VALUE 0
100 #define IGA2_FETCH_COUNT_FORMULA(x, y) \
101 (((x*y)/IGA2_FETCH_COUNT_ALIGN_BYTE) + IGA2_FETCH_COUNT_PATCH_VALUE)
106 #define IGA1_STARTING_ADDR_REG_NUM 4
108 #define IGA2_STARTING_ADDR_REG_NUM 3
113 #define K800_IGA1_FIFO_MAX_DEPTH 384
115 #define K800_IGA1_FIFO_THRESHOLD 328
117 #define K800_IGA1_FIFO_HIGH_THRESHOLD 296
120 #define K800_IGA1_DISPLAY_QUEUE_EXPIRE_NUM 0
123 #define K800_IGA2_FIFO_MAX_DEPTH 384
125 #define K800_IGA2_FIFO_THRESHOLD 328
127 #define K800_IGA2_FIFO_HIGH_THRESHOLD 296
129 #define K800_IGA2_DISPLAY_QUEUE_EXPIRE_NUM 128
132 #define P880_IGA1_FIFO_MAX_DEPTH 192
134 #define P880_IGA1_FIFO_THRESHOLD 128
136 #define P880_IGA1_FIFO_HIGH_THRESHOLD 64
139 #define P880_IGA1_DISPLAY_QUEUE_EXPIRE_NUM 0
142 #define P880_IGA2_FIFO_MAX_DEPTH 96
144 #define P880_IGA2_FIFO_THRESHOLD 64
146 #define P880_IGA2_FIFO_HIGH_THRESHOLD 32
148 #define P880_IGA2_DISPLAY_QUEUE_EXPIRE_NUM 128
153 #define CN700_IGA1_FIFO_MAX_DEPTH 96
155 #define CN700_IGA1_FIFO_THRESHOLD 80
157 #define CN700_IGA1_FIFO_HIGH_THRESHOLD 64
160 #define CN700_IGA1_DISPLAY_QUEUE_EXPIRE_NUM 0
162 #define CN700_IGA2_FIFO_MAX_DEPTH 96
164 #define CN700_IGA2_FIFO_THRESHOLD 80
166 #define CN700_IGA2_FIFO_HIGH_THRESHOLD 32
168 #define CN700_IGA2_DISPLAY_QUEUE_EXPIRE_NUM 128
172 #define CX700_IGA1_FIFO_MAX_DEPTH 192
174 #define CX700_IGA1_FIFO_THRESHOLD 128
176 #define CX700_IGA1_FIFO_HIGH_THRESHOLD 128
178 #define CX700_IGA1_DISPLAY_QUEUE_EXPIRE_NUM 124
181 #define CX700_IGA2_FIFO_MAX_DEPTH 96
183 #define CX700_IGA2_FIFO_THRESHOLD 64
185 #define CX700_IGA2_FIFO_HIGH_THRESHOLD 32
187 #define CX700_IGA2_DISPLAY_QUEUE_EXPIRE_NUM 128
191 #define K8M890_IGA1_FIFO_MAX_DEPTH 360
193 #define K8M890_IGA1_FIFO_THRESHOLD 328
195 #define K8M890_IGA1_FIFO_HIGH_THRESHOLD 296
197 #define K8M890_IGA1_DISPLAY_QUEUE_EXPIRE_NUM 124
200 #define K8M890_IGA2_FIFO_MAX_DEPTH 360
202 #define K8M890_IGA2_FIFO_THRESHOLD 328
204 #define K8M890_IGA2_FIFO_HIGH_THRESHOLD 296
206 #define K8M890_IGA2_DISPLAY_QUEUE_EXPIRE_NUM 124
210 #define P4M890_IGA1_FIFO_MAX_DEPTH 96
212 #define P4M890_IGA1_FIFO_THRESHOLD 76
214 #define P4M890_IGA1_FIFO_HIGH_THRESHOLD 64
216 #define P4M890_IGA1_DISPLAY_QUEUE_EXPIRE_NUM 32
218 #define P4M890_IGA2_FIFO_MAX_DEPTH 96
220 #define P4M890_IGA2_FIFO_THRESHOLD 76
222 #define P4M890_IGA2_FIFO_HIGH_THRESHOLD 64
224 #define P4M890_IGA2_DISPLAY_QUEUE_EXPIRE_NUM 32
228 #define P4M900_IGA1_FIFO_MAX_DEPTH 96
230 #define P4M900_IGA1_FIFO_THRESHOLD 76
232 #define P4M900_IGA1_FIFO_HIGH_THRESHOLD 76
234 #define P4M900_IGA1_DISPLAY_QUEUE_EXPIRE_NUM 32
236 #define P4M900_IGA2_FIFO_MAX_DEPTH 96
238 #define P4M900_IGA2_FIFO_THRESHOLD 76
240 #define P4M900_IGA2_FIFO_HIGH_THRESHOLD 76
242 #define P4M900_IGA2_DISPLAY_QUEUE_EXPIRE_NUM 32
246 #define VX800_IGA1_FIFO_MAX_DEPTH 192
248 #define VX800_IGA1_FIFO_THRESHOLD 152
250 #define VX800_IGA1_FIFO_HIGH_THRESHOLD 152
252 #define VX800_IGA1_DISPLAY_QUEUE_EXPIRE_NUM 64
254 #define VX800_IGA2_FIFO_MAX_DEPTH 96
256 #define VX800_IGA2_FIFO_THRESHOLD 64
258 #define VX800_IGA2_FIFO_HIGH_THRESHOLD 32
260 #define VX800_IGA2_DISPLAY_QUEUE_EXPIRE_NUM 128
263 #define VX855_IGA1_FIFO_MAX_DEPTH 400
264 #define VX855_IGA1_FIFO_THRESHOLD 320
265 #define VX855_IGA1_FIFO_HIGH_THRESHOLD 320
266 #define VX855_IGA1_DISPLAY_QUEUE_EXPIRE_NUM 160
268 #define VX855_IGA2_FIFO_MAX_DEPTH 200
269 #define VX855_IGA2_FIFO_THRESHOLD 160
270 #define VX855_IGA2_FIFO_HIGH_THRESHOLD 160
271 #define VX855_IGA2_DISPLAY_QUEUE_EXPIRE_NUM 320
274 #define VX900_IGA1_FIFO_MAX_DEPTH 400
275 #define VX900_IGA1_FIFO_THRESHOLD 320
276 #define VX900_IGA1_FIFO_HIGH_THRESHOLD 320
277 #define VX900_IGA1_DISPLAY_QUEUE_EXPIRE_NUM 160
279 #define VX900_IGA2_FIFO_MAX_DEPTH 192
280 #define VX900_IGA2_FIFO_THRESHOLD 160
281 #define VX900_IGA2_FIFO_HIGH_THRESHOLD 160
282 #define VX900_IGA2_DISPLAY_QUEUE_EXPIRE_NUM 320
284 #define IGA1_FIFO_DEPTH_SELECT_REG_NUM 1
285 #define IGA1_FIFO_THRESHOLD_REG_NUM 2
286 #define IGA1_FIFO_HIGH_THRESHOLD_REG_NUM 2
287 #define IGA1_DISPLAY_QUEUE_EXPIRE_NUM_REG_NUM 1
289 #define IGA2_FIFO_DEPTH_SELECT_REG_NUM 3
290 #define IGA2_FIFO_THRESHOLD_REG_NUM 2
291 #define IGA2_FIFO_HIGH_THRESHOLD_REG_NUM 2
292 #define IGA2_DISPLAY_QUEUE_EXPIRE_NUM_REG_NUM 1
294 #define IGA1_FIFO_DEPTH_SELECT_FORMULA(x) ((x/2)-1)
295 #define IGA1_FIFO_THRESHOLD_FORMULA(x) (x/4)
296 #define IGA1_DISPLAY_QUEUE_EXPIRE_NUM_FORMULA(x) (x/4)
297 #define IGA1_FIFO_HIGH_THRESHOLD_FORMULA(x) (x/4)
298 #define IGA2_FIFO_DEPTH_SELECT_FORMULA(x) (((x/2)/4)-1)
299 #define IGA2_FIFO_THRESHOLD_FORMULA(x) (x/4)
300 #define IGA2_DISPLAY_QUEUE_EXPIRE_NUM_FORMULA(x) (x/4)
301 #define IGA2_FIFO_HIGH_THRESHOLD_FORMULA(x) (x/4)
308 #define LCD_POWER_SEQ_TD0 500000
310 #define LCD_POWER_SEQ_TD1 50000
312 #define LCD_POWER_SEQ_TD2 0
314 #define LCD_POWER_SEQ_TD3 210000
316 #define CLE266_POWER_SEQ_UNIT 71
318 #define K800_POWER_SEQ_UNIT 142
320 #define P880_POWER_SEQ_UNIT 572
322 #define CLE266_POWER_SEQ_FORMULA(x) ((x)/CLE266_POWER_SEQ_UNIT)
323 #define K800_POWER_SEQ_FORMULA(x) ((x)/K800_POWER_SEQ_UNIT)
324 #define P880_POWER_SEQ_FORMULA(x) ((x)/P880_POWER_SEQ_UNIT)
327 #define LCD_POWER_SEQ_TD0_REG_NUM 2
329 #define LCD_POWER_SEQ_TD1_REG_NUM 2
331 #define LCD_POWER_SEQ_TD2_REG_NUM 2
333 #define LCD_POWER_SEQ_TD3_REG_NUM 2
340 #define CLE266_LCD_HOR_SCF_FORMULA(x, y) (((x-1)*1024)/(y-1))
342 #define CLE266_LCD_VER_SCF_FORMULA(x, y) (((x-1)*1024)/(y-1))
344 #define K800_LCD_HOR_SCF_FORMULA(x, y) (((x-1)*4096)/(y-1))
346 #define K800_LCD_VER_SCF_FORMULA(x, y) (((x-1)*2048)/(y-1))
349 #define LCD_HOR_SCALING_FACTOR_REG_NUM 3
351 #define LCD_VER_SCALING_FACTOR_REG_NUM 3
353 #define LCD_HOR_SCALING_FACTOR_REG_NUM_CLE 2
355 #define LCD_VER_SCALING_FACTOR_REG_NUM_CLE 2
589 #define CLE266_FUNCTION3 0x3123
590 #define KM400_FUNCTION3 0x3205
591 #define CN400_FUNCTION2 0x2259
592 #define CN400_FUNCTION3 0x3259
594 #define CN700_FUNCTION2 0x2314
595 #define CN700_FUNCTION3 0x3208
597 #define CX700_FUNCTION2 0x2324
598 #define CX700_FUNCTION3 0x3324
600 #define KM800_FUNCTION3 0x3204
602 #define KM890_FUNCTION3 0x3336
604 #define P4M890_FUNCTION3 0x3327
606 #define CN750_FUNCTION3 0x3208
608 #define P4M900_FUNCTION3 0x3364
610 #define VX800_FUNCTION3 0x3353
612 #define VX855_FUNCTION3 0x3409
614 #define VX900_FUNCTION3 0x3410
643 u16 cxres,
u16 cyres,
int iga);