diff options
author | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2010-03-10 18:21:29 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-12 18:52:33 -0500 |
commit | 9b24b00c364bb3bfa717ba2ead258a527b20cc5f (patch) | |
tree | f59fff4dc5a4631a6d148353f7ce17c47c131984 | |
parent | dd73d6868b9ecb4841def0c6ff0a25da27db33ba (diff) |
viafb: remove the remaining VIA_RES_* uses
Remove the rest of the VIA_RES_* use cases. Obviously this was no longer
useful. Keep the related infrastructure/functions for later use.
No runtime impact expected.
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Joseph Chan <JosephChan@via.com.tw>
Cc: Scott Fang <ScottFang@viatech.com.cn>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | drivers/video/via/chip.h | 2 | ||||
-rw-r--r-- | drivers/video/via/dvi.c | 82 | ||||
-rw-r--r-- | drivers/video/via/lcd.c | 42 | ||||
-rw-r--r-- | drivers/video/via/share.h | 55 |
4 files changed, 15 insertions, 166 deletions
diff --git a/drivers/video/via/chip.h b/drivers/video/via/chip.h index 474f428aea92..52253d0cdf73 100644 --- a/drivers/video/via/chip.h +++ b/drivers/video/via/chip.h | |||
@@ -146,7 +146,6 @@ struct tmds_setting_information { | |||
146 | int refresh_rate; | 146 | int refresh_rate; |
147 | int get_dvi_size_method; | 147 | int get_dvi_size_method; |
148 | int max_pixel_clock; | 148 | int max_pixel_clock; |
149 | int dvi_panel_size; | ||
150 | int dvi_panel_hres; | 149 | int dvi_panel_hres; |
151 | int dvi_panel_vres; | 150 | int dvi_panel_vres; |
152 | int native_size; | 151 | int native_size; |
@@ -160,7 +159,6 @@ struct lvds_setting_information { | |||
160 | int refresh_rate; | 159 | int refresh_rate; |
161 | int get_lcd_size_method; | 160 | int get_lcd_size_method; |
162 | int lcd_panel_id; | 161 | int lcd_panel_id; |
163 | int lcd_panel_size; | ||
164 | int lcd_panel_hres; | 162 | int lcd_panel_hres; |
165 | int lcd_panel_vres; | 163 | int lcd_panel_vres; |
166 | int display_method; | 164 | int display_method; |
diff --git a/drivers/video/via/dvi.c b/drivers/video/via/dvi.c index 92f75934e124..9cb261ce6e35 100644 --- a/drivers/video/via/dvi.c +++ b/drivers/video/via/dvi.c | |||
@@ -23,9 +23,9 @@ | |||
23 | static void tmds_register_write(int index, u8 data); | 23 | static void tmds_register_write(int index, u8 data); |
24 | static int tmds_register_read(int index); | 24 | static int tmds_register_read(int index); |
25 | static int tmds_register_read_bytes(int index, u8 *buff, int buff_len); | 25 | static int tmds_register_read_bytes(int index, u8 *buff, int buff_len); |
26 | static int dvi_get_panel_size_from_DDCv1(void); | 26 | static void dvi_get_panel_size_from_DDCv1(void); |
27 | static int dvi_get_panel_size_from_DDCv2(void); | 27 | static void dvi_get_panel_size_from_DDCv2(void); |
28 | static unsigned char dvi_get_panel_info(void); | 28 | static void dvi_get_panel_info(void); |
29 | static int viafb_dvi_query_EDID(void); | 29 | static int viafb_dvi_query_EDID(void); |
30 | 30 | ||
31 | static int check_tmds_chip(int device_id_subaddr, int device_id) | 31 | static int check_tmds_chip(int device_id_subaddr, int device_id) |
@@ -314,18 +314,13 @@ static int viafb_dvi_query_EDID(void) | |||
314 | return false; | 314 | return false; |
315 | } | 315 | } |
316 | 316 | ||
317 | /* | 317 | /* void dvi_get_panel_size_from_DDCv1(void) |
318 | * | ||
319 | * int dvi_get_panel_size_from_DDCv1(void) | ||
320 | * | 318 | * |
321 | * - Get Panel Size Using EDID1 Table | 319 | * - Get Panel Size Using EDID1 Table |
322 | * | ||
323 | * Return Type: int | ||
324 | * | ||
325 | */ | 320 | */ |
326 | static int dvi_get_panel_size_from_DDCv1(void) | 321 | static void dvi_get_panel_size_from_DDCv1(void) |
327 | { | 322 | { |
328 | int i, max_h = 0, max_v = 0, tmp, restore; | 323 | int i, max_h = 0, tmp, restore; |
329 | unsigned char rData; | 324 | unsigned char rData; |
330 | unsigned char EDID_DATA[18]; | 325 | unsigned char EDID_DATA[18]; |
331 | 326 | ||
@@ -391,46 +386,23 @@ static int dvi_get_panel_size_from_DDCv1(void) | |||
391 | 386 | ||
392 | switch (max_h) { | 387 | switch (max_h) { |
393 | case 640: | 388 | case 640: |
394 | viaparinfo->tmds_setting_info->dvi_panel_size = | ||
395 | VIA_RES_640X480; | ||
396 | break; | 389 | break; |
397 | case 800: | 390 | case 800: |
398 | viaparinfo->tmds_setting_info->dvi_panel_size = | ||
399 | VIA_RES_800X600; | ||
400 | break; | 391 | break; |
401 | case 1024: | 392 | case 1024: |
402 | viaparinfo->tmds_setting_info->dvi_panel_size = | ||
403 | VIA_RES_1024X768; | ||
404 | break; | 393 | break; |
405 | case 1280: | 394 | case 1280: |
406 | viaparinfo->tmds_setting_info->dvi_panel_size = | ||
407 | VIA_RES_1280X1024; | ||
408 | break; | 395 | break; |
409 | case 1400: | 396 | case 1400: |
410 | viaparinfo->tmds_setting_info->dvi_panel_size = | ||
411 | VIA_RES_1400X1050; | ||
412 | break; | 397 | break; |
413 | case 1440: | 398 | case 1440: |
414 | viaparinfo->tmds_setting_info->dvi_panel_size = | ||
415 | VIA_RES_1440X1050; | ||
416 | break; | 399 | break; |
417 | case 1600: | 400 | case 1600: |
418 | viaparinfo->tmds_setting_info->dvi_panel_size = | ||
419 | VIA_RES_1600X1200; | ||
420 | break; | 401 | break; |
421 | case 1920: | 402 | case 1920: |
422 | if (max_v == 1200) { | ||
423 | viaparinfo->tmds_setting_info->dvi_panel_size = | ||
424 | VIA_RES_1920X1200; | ||
425 | } else { | ||
426 | viaparinfo->tmds_setting_info->dvi_panel_size = | ||
427 | VIA_RES_1920X1080; | ||
428 | } | ||
429 | 403 | ||
430 | break; | 404 | break; |
431 | default: | 405 | default: |
432 | viaparinfo->tmds_setting_info->dvi_panel_size = | ||
433 | VIA_RES_1024X768; | ||
434 | DEBUG_MSG(KERN_INFO "Unknown panel size max resolution = %d !\ | 406 | DEBUG_MSG(KERN_INFO "Unknown panel size max resolution = %d !\ |
435 | set default panel size.\n", max_h); | 407 | set default panel size.\n", max_h); |
436 | break; | 408 | break; |
@@ -439,19 +411,13 @@ static int dvi_get_panel_size_from_DDCv1(void) | |||
439 | DEBUG_MSG(KERN_INFO "DVI max pixelclock = %d\n", | 411 | DEBUG_MSG(KERN_INFO "DVI max pixelclock = %d\n", |
440 | viaparinfo->tmds_setting_info->max_pixel_clock); | 412 | viaparinfo->tmds_setting_info->max_pixel_clock); |
441 | viaparinfo->chip_info->tmds_chip_info.tmds_chip_slave_addr = restore; | 413 | viaparinfo->chip_info->tmds_chip_info.tmds_chip_slave_addr = restore; |
442 | return viaparinfo->tmds_setting_info->dvi_panel_size; | ||
443 | } | 414 | } |
444 | 415 | ||
445 | /* | 416 | /* void dvi_get_panel_size_from_DDCv2(void) |
446 | * | ||
447 | * int dvi_get_panel_size_from_DDCv2(void) | ||
448 | * | 417 | * |
449 | * - Get Panel Size Using EDID2 Table | 418 | * - Get Panel Size Using EDID2 Table |
450 | * | ||
451 | * Return Type: int | ||
452 | * | ||
453 | */ | 419 | */ |
454 | static int dvi_get_panel_size_from_DDCv2(void) | 420 | static void dvi_get_panel_size_from_DDCv2(void) |
455 | { | 421 | { |
456 | int HSize = 0, restore; | 422 | int HSize = 0, restore; |
457 | unsigned char R_Buffer[2]; | 423 | unsigned char R_Buffer[2]; |
@@ -468,56 +434,34 @@ static int dvi_get_panel_size_from_DDCv2(void) | |||
468 | 434 | ||
469 | switch (HSize) { | 435 | switch (HSize) { |
470 | case 640: | 436 | case 640: |
471 | viaparinfo->tmds_setting_info->dvi_panel_size = | ||
472 | VIA_RES_640X480; | ||
473 | break; | 437 | break; |
474 | case 800: | 438 | case 800: |
475 | viaparinfo->tmds_setting_info->dvi_panel_size = | ||
476 | VIA_RES_800X600; | ||
477 | break; | 439 | break; |
478 | case 1024: | 440 | case 1024: |
479 | viaparinfo->tmds_setting_info->dvi_panel_size = | ||
480 | VIA_RES_1024X768; | ||
481 | break; | 441 | break; |
482 | case 1280: | 442 | case 1280: |
483 | viaparinfo->tmds_setting_info->dvi_panel_size = | ||
484 | VIA_RES_1280X1024; | ||
485 | break; | 443 | break; |
486 | case 1400: | 444 | case 1400: |
487 | viaparinfo->tmds_setting_info->dvi_panel_size = | ||
488 | VIA_RES_1400X1050; | ||
489 | break; | 445 | break; |
490 | case 1440: | 446 | case 1440: |
491 | viaparinfo->tmds_setting_info->dvi_panel_size = | ||
492 | VIA_RES_1440X1050; | ||
493 | break; | 447 | break; |
494 | case 1600: | 448 | case 1600: |
495 | viaparinfo->tmds_setting_info->dvi_panel_size = | ||
496 | VIA_RES_1600X1200; | ||
497 | break; | 449 | break; |
498 | default: | 450 | default: |
499 | viaparinfo->tmds_setting_info->dvi_panel_size = | ||
500 | VIA_RES_1024X768; | ||
501 | DEBUG_MSG(KERN_INFO "Unknown panel size max resolution = %d!\ | 451 | DEBUG_MSG(KERN_INFO "Unknown panel size max resolution = %d!\ |
502 | set default panel size.\n", HSize); | 452 | set default panel size.\n", HSize); |
503 | break; | 453 | break; |
504 | } | 454 | } |
505 | 455 | ||
506 | viaparinfo->chip_info->tmds_chip_info.tmds_chip_slave_addr = restore; | 456 | viaparinfo->chip_info->tmds_chip_info.tmds_chip_slave_addr = restore; |
507 | return viaparinfo->tmds_setting_info->dvi_panel_size; | ||
508 | } | 457 | } |
509 | 458 | ||
510 | /* | 459 | /* unsigned char dvi_get_panel_info(void) |
511 | * | ||
512 | * unsigned char dvi_get_panel_info(void) | ||
513 | * | 460 | * |
514 | * - Get Panel Size | 461 | * - Get Panel Size |
515 | * | ||
516 | * Return Type: unsigned char | ||
517 | */ | 462 | */ |
518 | static unsigned char dvi_get_panel_info(void) | 463 | static void dvi_get_panel_info(void) |
519 | { | 464 | { |
520 | unsigned char dvipanelsize; | ||
521 | DEBUG_MSG(KERN_INFO "dvi_get_panel_info! \n"); | 465 | DEBUG_MSG(KERN_INFO "dvi_get_panel_info! \n"); |
522 | 466 | ||
523 | viafb_dvi_sense(); | 467 | viafb_dvi_sense(); |
@@ -531,12 +475,6 @@ static unsigned char dvi_get_panel_info(void) | |||
531 | default: | 475 | default: |
532 | break; | 476 | break; |
533 | } | 477 | } |
534 | |||
535 | DEBUG_MSG(KERN_INFO "dvi panel size is %2d \n", | ||
536 | viaparinfo->tmds_setting_info->dvi_panel_size); | ||
537 | dvipanelsize = (unsigned char)(viaparinfo-> | ||
538 | tmds_setting_info->dvi_panel_size); | ||
539 | return dvipanelsize; | ||
540 | } | 478 | } |
541 | 479 | ||
542 | /* If Disable DVI, turn off pad */ | 480 | /* If Disable DVI, turn off pad */ |
diff --git a/drivers/video/via/lcd.c b/drivers/video/via/lcd.c index e0ab605f0170..3a83e5bc25d9 100644 --- a/drivers/video/via/lcd.c +++ b/drivers/video/via/lcd.c | |||
@@ -61,7 +61,7 @@ static struct _lcd_scaling_factor lcd_scaling_factor_CLE = { | |||
61 | 61 | ||
62 | static int check_lvds_chip(int device_id_subaddr, int device_id); | 62 | static int check_lvds_chip(int device_id_subaddr, int device_id); |
63 | static bool lvds_identify_integratedlvds(void); | 63 | static bool lvds_identify_integratedlvds(void); |
64 | static int fp_id_to_vindex(int panel_id); | 64 | static void fp_id_to_vindex(int panel_id); |
65 | static int lvds_register_read(int index); | 65 | static int lvds_register_read(int index); |
66 | static void load_lcd_scaling(int set_hres, int set_vres, int panel_hres, | 66 | static void load_lcd_scaling(int set_hres, int set_vres, int panel_hres, |
67 | int panel_vres); | 67 | int panel_vres); |
@@ -127,33 +127,24 @@ void viafb_init_lcd_size(void) | |||
127 | break; | 127 | break; |
128 | case GET_LCD_SIZE_BY_VGA_BIOS: | 128 | case GET_LCD_SIZE_BY_VGA_BIOS: |
129 | DEBUG_MSG(KERN_INFO "Get LCD Size method by VGA BIOS !!\n"); | 129 | DEBUG_MSG(KERN_INFO "Get LCD Size method by VGA BIOS !!\n"); |
130 | viaparinfo->lvds_setting_info->lcd_panel_size = | 130 | fp_id_to_vindex(viafb_lcd_panel_id); |
131 | fp_id_to_vindex(viafb_lcd_panel_id); | ||
132 | DEBUG_MSG(KERN_INFO "LCD Panel_ID = %d\n", | 131 | DEBUG_MSG(KERN_INFO "LCD Panel_ID = %d\n", |
133 | viaparinfo->lvds_setting_info->lcd_panel_id); | 132 | viaparinfo->lvds_setting_info->lcd_panel_id); |
134 | DEBUG_MSG(KERN_INFO "LCD Panel Size = %d\n", | ||
135 | viaparinfo->lvds_setting_info->lcd_panel_size); | ||
136 | break; | 133 | break; |
137 | case GET_LCD_SIZE_BY_USER_SETTING: | 134 | case GET_LCD_SIZE_BY_USER_SETTING: |
138 | DEBUG_MSG(KERN_INFO "Get LCD Size method by user setting !!\n"); | 135 | DEBUG_MSG(KERN_INFO "Get LCD Size method by user setting !!\n"); |
139 | viaparinfo->lvds_setting_info->lcd_panel_size = | 136 | fp_id_to_vindex(viafb_lcd_panel_id); |
140 | fp_id_to_vindex(viafb_lcd_panel_id); | ||
141 | DEBUG_MSG(KERN_INFO "LCD Panel_ID = %d\n", | 137 | DEBUG_MSG(KERN_INFO "LCD Panel_ID = %d\n", |
142 | viaparinfo->lvds_setting_info->lcd_panel_id); | 138 | viaparinfo->lvds_setting_info->lcd_panel_id); |
143 | DEBUG_MSG(KERN_INFO "LCD Panel Size = %d\n", | ||
144 | viaparinfo->lvds_setting_info->lcd_panel_size); | ||
145 | break; | 139 | break; |
146 | default: | 140 | default: |
147 | DEBUG_MSG(KERN_INFO "viafb_init_lcd_size fail\n"); | 141 | DEBUG_MSG(KERN_INFO "viafb_init_lcd_size fail\n"); |
148 | viaparinfo->lvds_setting_info->lcd_panel_id = | 142 | viaparinfo->lvds_setting_info->lcd_panel_id = |
149 | LCD_PANEL_ID1_800X600; | 143 | LCD_PANEL_ID1_800X600; |
150 | viaparinfo->lvds_setting_info->lcd_panel_size = | 144 | fp_id_to_vindex(LCD_PANEL_ID1_800X600); |
151 | fp_id_to_vindex(LCD_PANEL_ID1_800X600); | ||
152 | } | 145 | } |
153 | viaparinfo->lvds_setting_info2->lcd_panel_id = | 146 | viaparinfo->lvds_setting_info2->lcd_panel_id = |
154 | viaparinfo->lvds_setting_info->lcd_panel_id; | 147 | viaparinfo->lvds_setting_info->lcd_panel_id; |
155 | viaparinfo->lvds_setting_info2->lcd_panel_size = | ||
156 | viaparinfo->lvds_setting_info->lcd_panel_size; | ||
157 | viaparinfo->lvds_setting_info2->lcd_panel_hres = | 148 | viaparinfo->lvds_setting_info2->lcd_panel_hres = |
158 | viaparinfo->lvds_setting_info->lcd_panel_hres; | 149 | viaparinfo->lvds_setting_info->lcd_panel_hres; |
159 | viaparinfo->lvds_setting_info2->lcd_panel_vres = | 150 | viaparinfo->lvds_setting_info2->lcd_panel_vres = |
@@ -250,7 +241,7 @@ int viafb_lvds_trasmitter_identify(void) | |||
250 | return FAIL; | 241 | return FAIL; |
251 | } | 242 | } |
252 | 243 | ||
253 | static int fp_id_to_vindex(int panel_id) | 244 | static void fp_id_to_vindex(int panel_id) |
254 | { | 245 | { |
255 | DEBUG_MSG(KERN_INFO "fp_get_panel_id()\n"); | 246 | DEBUG_MSG(KERN_INFO "fp_get_panel_id()\n"); |
256 | 247 | ||
@@ -266,7 +257,6 @@ static int fp_id_to_vindex(int panel_id) | |||
266 | LCD_PANEL_ID0_640X480; | 257 | LCD_PANEL_ID0_640X480; |
267 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; | 258 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; |
268 | viaparinfo->lvds_setting_info->LCDDithering = 1; | 259 | viaparinfo->lvds_setting_info->LCDDithering = 1; |
269 | return VIA_RES_640X480; | ||
270 | break; | 260 | break; |
271 | case 0x1: | 261 | case 0x1: |
272 | viaparinfo->lvds_setting_info->lcd_panel_hres = 800; | 262 | viaparinfo->lvds_setting_info->lcd_panel_hres = 800; |
@@ -275,7 +265,6 @@ static int fp_id_to_vindex(int panel_id) | |||
275 | LCD_PANEL_ID1_800X600; | 265 | LCD_PANEL_ID1_800X600; |
276 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; | 266 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; |
277 | viaparinfo->lvds_setting_info->LCDDithering = 1; | 267 | viaparinfo->lvds_setting_info->LCDDithering = 1; |
278 | return VIA_RES_800X600; | ||
279 | break; | 268 | break; |
280 | case 0x2: | 269 | case 0x2: |
281 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1024; | 270 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1024; |
@@ -284,7 +273,6 @@ static int fp_id_to_vindex(int panel_id) | |||
284 | LCD_PANEL_ID2_1024X768; | 273 | LCD_PANEL_ID2_1024X768; |
285 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; | 274 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; |
286 | viaparinfo->lvds_setting_info->LCDDithering = 1; | 275 | viaparinfo->lvds_setting_info->LCDDithering = 1; |
287 | return VIA_RES_1024X768; | ||
288 | break; | 276 | break; |
289 | case 0x3: | 277 | case 0x3: |
290 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1280; | 278 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1280; |
@@ -293,7 +281,6 @@ static int fp_id_to_vindex(int panel_id) | |||
293 | LCD_PANEL_ID3_1280X768; | 281 | LCD_PANEL_ID3_1280X768; |
294 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; | 282 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; |
295 | viaparinfo->lvds_setting_info->LCDDithering = 1; | 283 | viaparinfo->lvds_setting_info->LCDDithering = 1; |
296 | return VIA_RES_1280X768; | ||
297 | break; | 284 | break; |
298 | case 0x4: | 285 | case 0x4: |
299 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1280; | 286 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1280; |
@@ -302,7 +289,6 @@ static int fp_id_to_vindex(int panel_id) | |||
302 | LCD_PANEL_ID4_1280X1024; | 289 | LCD_PANEL_ID4_1280X1024; |
303 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 1; | 290 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 1; |
304 | viaparinfo->lvds_setting_info->LCDDithering = 1; | 291 | viaparinfo->lvds_setting_info->LCDDithering = 1; |
305 | return VIA_RES_1280X1024; | ||
306 | break; | 292 | break; |
307 | case 0x5: | 293 | case 0x5: |
308 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1400; | 294 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1400; |
@@ -311,7 +297,6 @@ static int fp_id_to_vindex(int panel_id) | |||
311 | LCD_PANEL_ID5_1400X1050; | 297 | LCD_PANEL_ID5_1400X1050; |
312 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 1; | 298 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 1; |
313 | viaparinfo->lvds_setting_info->LCDDithering = 1; | 299 | viaparinfo->lvds_setting_info->LCDDithering = 1; |
314 | return VIA_RES_1400X1050; | ||
315 | break; | 300 | break; |
316 | case 0x6: | 301 | case 0x6: |
317 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1600; | 302 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1600; |
@@ -320,7 +305,6 @@ static int fp_id_to_vindex(int panel_id) | |||
320 | LCD_PANEL_ID6_1600X1200; | 305 | LCD_PANEL_ID6_1600X1200; |
321 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 1; | 306 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 1; |
322 | viaparinfo->lvds_setting_info->LCDDithering = 1; | 307 | viaparinfo->lvds_setting_info->LCDDithering = 1; |
323 | return VIA_RES_1600X1200; | ||
324 | break; | 308 | break; |
325 | case 0x8: | 309 | case 0x8: |
326 | viaparinfo->lvds_setting_info->lcd_panel_hres = 800; | 310 | viaparinfo->lvds_setting_info->lcd_panel_hres = 800; |
@@ -329,7 +313,6 @@ static int fp_id_to_vindex(int panel_id) | |||
329 | LCD_PANEL_IDA_800X480; | 313 | LCD_PANEL_IDA_800X480; |
330 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; | 314 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; |
331 | viaparinfo->lvds_setting_info->LCDDithering = 1; | 315 | viaparinfo->lvds_setting_info->LCDDithering = 1; |
332 | return VIA_RES_800X480; | ||
333 | break; | 316 | break; |
334 | case 0x9: | 317 | case 0x9: |
335 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1024; | 318 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1024; |
@@ -338,7 +321,6 @@ static int fp_id_to_vindex(int panel_id) | |||
338 | LCD_PANEL_ID2_1024X768; | 321 | LCD_PANEL_ID2_1024X768; |
339 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 1; | 322 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 1; |
340 | viaparinfo->lvds_setting_info->LCDDithering = 1; | 323 | viaparinfo->lvds_setting_info->LCDDithering = 1; |
341 | return VIA_RES_1024X768; | ||
342 | break; | 324 | break; |
343 | case 0xA: | 325 | case 0xA: |
344 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1024; | 326 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1024; |
@@ -347,7 +329,6 @@ static int fp_id_to_vindex(int panel_id) | |||
347 | LCD_PANEL_ID2_1024X768; | 329 | LCD_PANEL_ID2_1024X768; |
348 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; | 330 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; |
349 | viaparinfo->lvds_setting_info->LCDDithering = 0; | 331 | viaparinfo->lvds_setting_info->LCDDithering = 0; |
350 | return VIA_RES_1024X768; | ||
351 | break; | 332 | break; |
352 | case 0xB: | 333 | case 0xB: |
353 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1024; | 334 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1024; |
@@ -356,7 +337,6 @@ static int fp_id_to_vindex(int panel_id) | |||
356 | LCD_PANEL_ID2_1024X768; | 337 | LCD_PANEL_ID2_1024X768; |
357 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 1; | 338 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 1; |
358 | viaparinfo->lvds_setting_info->LCDDithering = 0; | 339 | viaparinfo->lvds_setting_info->LCDDithering = 0; |
359 | return VIA_RES_1024X768; | ||
360 | break; | 340 | break; |
361 | case 0xC: | 341 | case 0xC: |
362 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1280; | 342 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1280; |
@@ -365,7 +345,6 @@ static int fp_id_to_vindex(int panel_id) | |||
365 | LCD_PANEL_ID3_1280X768; | 345 | LCD_PANEL_ID3_1280X768; |
366 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; | 346 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; |
367 | viaparinfo->lvds_setting_info->LCDDithering = 0; | 347 | viaparinfo->lvds_setting_info->LCDDithering = 0; |
368 | return VIA_RES_1280X768; | ||
369 | break; | 348 | break; |
370 | case 0xD: | 349 | case 0xD: |
371 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1280; | 350 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1280; |
@@ -374,7 +353,6 @@ static int fp_id_to_vindex(int panel_id) | |||
374 | LCD_PANEL_ID4_1280X1024; | 353 | LCD_PANEL_ID4_1280X1024; |
375 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 1; | 354 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 1; |
376 | viaparinfo->lvds_setting_info->LCDDithering = 0; | 355 | viaparinfo->lvds_setting_info->LCDDithering = 0; |
377 | return VIA_RES_1280X1024; | ||
378 | break; | 356 | break; |
379 | case 0xE: | 357 | case 0xE: |
380 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1400; | 358 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1400; |
@@ -383,7 +361,6 @@ static int fp_id_to_vindex(int panel_id) | |||
383 | LCD_PANEL_ID5_1400X1050; | 361 | LCD_PANEL_ID5_1400X1050; |
384 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 1; | 362 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 1; |
385 | viaparinfo->lvds_setting_info->LCDDithering = 0; | 363 | viaparinfo->lvds_setting_info->LCDDithering = 0; |
386 | return VIA_RES_1400X1050; | ||
387 | break; | 364 | break; |
388 | case 0xF: | 365 | case 0xF: |
389 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1600; | 366 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1600; |
@@ -392,7 +369,6 @@ static int fp_id_to_vindex(int panel_id) | |||
392 | LCD_PANEL_ID6_1600X1200; | 369 | LCD_PANEL_ID6_1600X1200; |
393 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 1; | 370 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 1; |
394 | viaparinfo->lvds_setting_info->LCDDithering = 0; | 371 | viaparinfo->lvds_setting_info->LCDDithering = 0; |
395 | return VIA_RES_1600X1200; | ||
396 | break; | 372 | break; |
397 | case 0x10: | 373 | case 0x10: |
398 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1366; | 374 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1366; |
@@ -401,7 +377,6 @@ static int fp_id_to_vindex(int panel_id) | |||
401 | LCD_PANEL_ID7_1366X768; | 377 | LCD_PANEL_ID7_1366X768; |
402 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; | 378 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; |
403 | viaparinfo->lvds_setting_info->LCDDithering = 0; | 379 | viaparinfo->lvds_setting_info->LCDDithering = 0; |
404 | return VIA_RES_1368X768; | ||
405 | break; | 380 | break; |
406 | case 0x11: | 381 | case 0x11: |
407 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1024; | 382 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1024; |
@@ -410,7 +385,6 @@ static int fp_id_to_vindex(int panel_id) | |||
410 | LCD_PANEL_ID8_1024X600; | 385 | LCD_PANEL_ID8_1024X600; |
411 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; | 386 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; |
412 | viaparinfo->lvds_setting_info->LCDDithering = 1; | 387 | viaparinfo->lvds_setting_info->LCDDithering = 1; |
413 | return VIA_RES_1024X600; | ||
414 | break; | 388 | break; |
415 | case 0x12: | 389 | case 0x12: |
416 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1280; | 390 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1280; |
@@ -419,7 +393,6 @@ static int fp_id_to_vindex(int panel_id) | |||
419 | LCD_PANEL_ID3_1280X768; | 393 | LCD_PANEL_ID3_1280X768; |
420 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 1; | 394 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 1; |
421 | viaparinfo->lvds_setting_info->LCDDithering = 1; | 395 | viaparinfo->lvds_setting_info->LCDDithering = 1; |
422 | return VIA_RES_1280X768; | ||
423 | break; | 396 | break; |
424 | case 0x13: | 397 | case 0x13: |
425 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1280; | 398 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1280; |
@@ -428,7 +401,6 @@ static int fp_id_to_vindex(int panel_id) | |||
428 | LCD_PANEL_ID9_1280X800; | 401 | LCD_PANEL_ID9_1280X800; |
429 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; | 402 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; |
430 | viaparinfo->lvds_setting_info->LCDDithering = 1; | 403 | viaparinfo->lvds_setting_info->LCDDithering = 1; |
431 | return VIA_RES_1280X800; | ||
432 | break; | 404 | break; |
433 | case 0x14: | 405 | case 0x14: |
434 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1360; | 406 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1360; |
@@ -437,7 +409,6 @@ static int fp_id_to_vindex(int panel_id) | |||
437 | LCD_PANEL_IDB_1360X768; | 409 | LCD_PANEL_IDB_1360X768; |
438 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; | 410 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; |
439 | viaparinfo->lvds_setting_info->LCDDithering = 0; | 411 | viaparinfo->lvds_setting_info->LCDDithering = 0; |
440 | return VIA_RES_1360X768; | ||
441 | break; | 412 | break; |
442 | case 0x15: | 413 | case 0x15: |
443 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1280; | 414 | viaparinfo->lvds_setting_info->lcd_panel_hres = 1280; |
@@ -446,7 +417,6 @@ static int fp_id_to_vindex(int panel_id) | |||
446 | LCD_PANEL_ID3_1280X768; | 417 | LCD_PANEL_ID3_1280X768; |
447 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 1; | 418 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 1; |
448 | viaparinfo->lvds_setting_info->LCDDithering = 0; | 419 | viaparinfo->lvds_setting_info->LCDDithering = 0; |
449 | return VIA_RES_1280X768; | ||
450 | break; | 420 | break; |
451 | case 0x16: | 421 | case 0x16: |
452 | viaparinfo->lvds_setting_info->lcd_panel_hres = 480; | 422 | viaparinfo->lvds_setting_info->lcd_panel_hres = 480; |
@@ -455,7 +425,6 @@ static int fp_id_to_vindex(int panel_id) | |||
455 | LCD_PANEL_IDC_480X640; | 425 | LCD_PANEL_IDC_480X640; |
456 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; | 426 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; |
457 | viaparinfo->lvds_setting_info->LCDDithering = 1; | 427 | viaparinfo->lvds_setting_info->LCDDithering = 1; |
458 | return VIA_RES_480X640; | ||
459 | break; | 428 | break; |
460 | default: | 429 | default: |
461 | viaparinfo->lvds_setting_info->lcd_panel_hres = 800; | 430 | viaparinfo->lvds_setting_info->lcd_panel_hres = 800; |
@@ -464,7 +433,6 @@ static int fp_id_to_vindex(int panel_id) | |||
464 | LCD_PANEL_ID1_800X600; | 433 | LCD_PANEL_ID1_800X600; |
465 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; | 434 | viaparinfo->lvds_setting_info->device_lcd_dualedge = 0; |
466 | viaparinfo->lvds_setting_info->LCDDithering = 1; | 435 | viaparinfo->lvds_setting_info->LCDDithering = 1; |
467 | return VIA_RES_800X600; | ||
468 | } | 436 | } |
469 | } | 437 | } |
470 | 438 | ||
diff --git a/drivers/video/via/share.h b/drivers/video/via/share.h index 7cd03e2a1275..fad3d2d8053c 100644 --- a/drivers/video/via/share.h +++ b/drivers/video/via/share.h | |||
@@ -43,61 +43,6 @@ | |||
43 | /* Video Memory Size */ | 43 | /* Video Memory Size */ |
44 | #define VIDEO_MEMORY_SIZE_16M 0x1000000 | 44 | #define VIDEO_MEMORY_SIZE_16M 0x1000000 |
45 | 45 | ||
46 | /* Definition Mode Index | ||
47 | */ | ||
48 | #define VIA_RES_640X480 0 | ||
49 | #define VIA_RES_800X600 1 | ||
50 | #define VIA_RES_1024X768 2 | ||
51 | #define VIA_RES_1152X864 3 | ||
52 | #define VIA_RES_1280X1024 4 | ||
53 | #define VIA_RES_1600X1200 5 | ||
54 | #define VIA_RES_1440X1050 6 | ||
55 | #define VIA_RES_1280X768 7 | ||
56 | #define VIA_RES_1280X960 8 | ||
57 | #define VIA_RES_1920X1440 9 | ||
58 | #define VIA_RES_848X480 10 | ||
59 | #define VIA_RES_1400X1050 11 | ||
60 | #define VIA_RES_720X480 12 | ||
61 | #define VIA_RES_720X576 13 | ||
62 | #define VIA_RES_1024X512 14 | ||
63 | #define VIA_RES_856X480 15 | ||
64 | #define VIA_RES_1024X576 16 | ||
65 | #define VIA_RES_640X400 17 | ||
66 | #define VIA_RES_1280X720 18 | ||
67 | #define VIA_RES_1920X1080 19 | ||
68 | #define VIA_RES_800X480 20 | ||
69 | #define VIA_RES_1368X768 21 | ||
70 | #define VIA_RES_1024X600 22 | ||
71 | #define VIA_RES_1280X800 23 | ||
72 | #define VIA_RES_1680X1050 24 | ||
73 | #define VIA_RES_960X600 25 | ||
74 | #define VIA_RES_1000X600 26 | ||
75 | #define VIA_RES_1088X612 27 | ||
76 | #define VIA_RES_1152X720 28 | ||
77 | #define VIA_RES_1200X720 29 | ||
78 | #define VIA_RES_1280X600 30 | ||
79 | #define VIA_RES_1360X768 31 | ||
80 | #define VIA_RES_1366X768 32 | ||
81 | #define VIA_RES_1440X900 33 | ||
82 | #define VIA_RES_1600X900 34 | ||
83 | #define VIA_RES_1600X1024 35 | ||
84 | #define VIA_RES_1792X1344 36 | ||
85 | #define VIA_RES_1856X1392 37 | ||
86 | #define VIA_RES_1920X1200 38 | ||
87 | #define VIA_RES_2048X1536 39 | ||
88 | #define VIA_RES_480X640 40 | ||
89 | |||
90 | /*Reduce Blanking*/ | ||
91 | #define VIA_RES_1360X768_RB 131 | ||
92 | #define VIA_RES_1440X900_RB 133 | ||
93 | #define VIA_RES_1400X1050_RB 111 | ||
94 | #define VIA_RES_1600X900_RB 134 | ||
95 | #define VIA_RES_1680X1050_RB 124 | ||
96 | #define VIA_RES_1920X1080_RB 119 | ||
97 | #define VIA_RES_1920X1200_RB 138 | ||
98 | |||
99 | #define VIA_RES_INVALID 255 | ||
100 | |||
101 | /* standard VGA IO port | 46 | /* standard VGA IO port |
102 | */ | 47 | */ |
103 | #define VIARMisc 0x3CC | 48 | #define VIARMisc 0x3CC |