aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/via
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/via')
-rw-r--r--drivers/video/via/dvi.c4
-rw-r--r--drivers/video/via/hw.c6
-rw-r--r--drivers/video/via/lcd.c8
-rw-r--r--drivers/video/via/share.h72
-rw-r--r--drivers/video/via/viamode.c255
5 files changed, 133 insertions, 212 deletions
diff --git a/drivers/video/via/dvi.c b/drivers/video/via/dvi.c
index 84e21b39dd0b..41ca198b5098 100644
--- a/drivers/video/via/dvi.c
+++ b/drivers/video/via/dvi.c
@@ -195,7 +195,9 @@ void viafb_dvi_set_mode(struct VideoModeTable *mode, int mode_bpp,
195 struct crt_mode_table *pDviTiming; 195 struct crt_mode_table *pDviTiming;
196 unsigned long desirePixelClock, maxPixelClock; 196 unsigned long desirePixelClock, maxPixelClock;
197 pDviTiming = mode->crtc; 197 pDviTiming = mode->crtc;
198 desirePixelClock = pDviTiming->clk / 1000000; 198 desirePixelClock = pDviTiming->refresh_rate
199 * pDviTiming->crtc.hor_total * pDviTiming->crtc.ver_total
200 / 1000000;
199 maxPixelClock = (unsigned long)viaparinfo-> 201 maxPixelClock = (unsigned long)viaparinfo->
200 tmds_setting_info->max_pixel_clock; 202 tmds_setting_info->max_pixel_clock;
201 203
diff --git a/drivers/video/via/hw.c b/drivers/video/via/hw.c
index a7a5614c1ad8..071e3a94b589 100644
--- a/drivers/video/via/hw.c
+++ b/drivers/video/via/hw.c
@@ -2030,7 +2030,7 @@ void viafb_fill_crtc_timing(struct crt_mode_table *crt_table,
2030 int i; 2030 int i;
2031 int index = 0; 2031 int index = 0;
2032 int h_addr, v_addr; 2032 int h_addr, v_addr;
2033 u32 pll_D_N; 2033 u32 pll_D_N, clock;
2034 2034
2035 for (i = 0; i < video_mode->mode_array; i++) { 2035 for (i = 0; i < video_mode->mode_array; i++) {
2036 index = i; 2036 index = i;
@@ -2083,7 +2083,9 @@ void viafb_fill_crtc_timing(struct crt_mode_table *crt_table,
2083 && (viaparinfo->chip_info->gfx_chip_name != UNICHROME_K400)) 2083 && (viaparinfo->chip_info->gfx_chip_name != UNICHROME_K400))
2084 viafb_load_FIFO_reg(set_iga, h_addr, v_addr); 2084 viafb_load_FIFO_reg(set_iga, h_addr, v_addr);
2085 2085
2086 pll_D_N = viafb_get_clk_value(crt_table[index].clk); 2086 clock = crt_reg.hor_total * crt_reg.ver_total
2087 * crt_table[index].refresh_rate;
2088 pll_D_N = viafb_get_clk_value(clock);
2087 DEBUG_MSG(KERN_INFO "PLL=%x", pll_D_N); 2089 DEBUG_MSG(KERN_INFO "PLL=%x", pll_D_N);
2088 viafb_set_vclock(pll_D_N, set_iga); 2090 viafb_set_vclock(pll_D_N, set_iga);
2089 2091
diff --git a/drivers/video/via/lcd.c b/drivers/video/via/lcd.c
index 2ca3bb8abbfe..fc76b27b1131 100644
--- a/drivers/video/via/lcd.c
+++ b/drivers/video/via/lcd.c
@@ -612,7 +612,7 @@ void viafb_lcd_set_mode(struct crt_mode_table *mode_crt_table,
612 int set_vres = plvds_setting_info->v_active; 612 int set_vres = plvds_setting_info->v_active;
613 int panel_hres = plvds_setting_info->lcd_panel_hres; 613 int panel_hres = plvds_setting_info->lcd_panel_hres;
614 int panel_vres = plvds_setting_info->lcd_panel_vres; 614 int panel_vres = plvds_setting_info->lcd_panel_vres;
615 u32 pll_D_N; 615 u32 pll_D_N, clock;
616 struct display_timing mode_crt_reg, panel_crt_reg; 616 struct display_timing mode_crt_reg, panel_crt_reg;
617 struct crt_mode_table *panel_crt_table = NULL; 617 struct crt_mode_table *panel_crt_table = NULL;
618 struct VideoModeTable *vmode_tbl = viafb_get_mode(panel_hres, 618 struct VideoModeTable *vmode_tbl = viafb_get_mode(panel_hres,
@@ -627,7 +627,9 @@ void viafb_lcd_set_mode(struct crt_mode_table *mode_crt_table,
627 DEBUG_MSG(KERN_INFO "bellow viafb_lcd_set_mode!!\n"); 627 DEBUG_MSG(KERN_INFO "bellow viafb_lcd_set_mode!!\n");
628 if (VT1636_LVDS == plvds_chip_info->lvds_chip_name) 628 if (VT1636_LVDS == plvds_chip_info->lvds_chip_name)
629 viafb_init_lvds_vt1636(plvds_setting_info, plvds_chip_info); 629 viafb_init_lvds_vt1636(plvds_setting_info, plvds_chip_info);
630 plvds_setting_info->vclk = panel_crt_table->clk; 630 clock = panel_crt_reg.hor_total * panel_crt_reg.ver_total
631 * panel_crt_table->refresh_rate;
632 plvds_setting_info->vclk = clock;
631 if (set_iga == IGA1) { 633 if (set_iga == IGA1) {
632 /* IGA1 doesn't have LCD scaling, so set it as centering. */ 634 /* IGA1 doesn't have LCD scaling, so set it as centering. */
633 viafb_load_crtc_timing(lcd_centering_timging 635 viafb_load_crtc_timing(lcd_centering_timging
@@ -662,7 +664,7 @@ void viafb_lcd_set_mode(struct crt_mode_table *mode_crt_table,
662 664
663 fill_lcd_format(); 665 fill_lcd_format();
664 666
665 pll_D_N = viafb_get_clk_value(panel_crt_table[0].clk); 667 pll_D_N = viafb_get_clk_value(clock);
666 DEBUG_MSG(KERN_INFO "PLL=0x%x", pll_D_N); 668 DEBUG_MSG(KERN_INFO "PLL=0x%x", pll_D_N);
667 viafb_set_vclock(pll_D_N, set_iga); 669 viafb_set_vclock(pll_D_N, set_iga);
668 lcd_patch_skew(plvds_setting_info, plvds_chip_info); 670 lcd_patch_skew(plvds_setting_info, plvds_chip_info);
diff --git a/drivers/video/via/share.h b/drivers/video/via/share.h
index b04c047d44f8..4b7831f0d012 100644
--- a/drivers/video/via/share.h
+++ b/drivers/video/via/share.h
@@ -627,77 +627,6 @@
627#define M2048x1536_R60_HSP NEGATIVE 627#define M2048x1536_R60_HSP NEGATIVE
628#define M2048x1536_R60_VSP POSITIVE 628#define M2048x1536_R60_VSP POSITIVE
629 629
630/* define PLL index: */
631#define CLK_25_175M 25175000
632#define CLK_26_880M 26880000
633#define CLK_29_581M 29581000
634#define CLK_31_500M 31500000
635#define CLK_31_728M 31728000
636#define CLK_32_668M 32688000
637#define CLK_36_000M 36000000
638#define CLK_40_000M 40000000
639#define CLK_41_291M 41291000
640#define CLK_43_163M 43163000
641#define CLK_45_250M 45250000 /* 45.46MHz */
642#define CLK_46_000M 46000000
643#define CLK_46_996M 46996000
644#define CLK_48_000M 48000000
645#define CLK_48_875M 48875000
646#define CLK_49_500M 49500000
647#define CLK_52_406M 52406000
648#define CLK_52_977M 52977000
649#define CLK_56_250M 56250000
650#define CLK_57_275M 57275000
651#define CLK_60_466M 60466000
652#define CLK_61_500M 61500000
653#define CLK_65_000M 65000000
654#define CLK_65_178M 65178000
655#define CLK_66_750M 66750000 /* 67.116MHz */
656#define CLK_68_179M 68179000
657#define CLK_69_924M 69924000
658#define CLK_70_159M 70159000
659#define CLK_72_000M 72000000
660#define CLK_74_270M 74270000
661#define CLK_78_750M 78750000
662#define CLK_80_136M 80136000
663#define CLK_83_375M 83375000
664#define CLK_83_950M 83950000
665#define CLK_84_750M 84750000 /* 84.537Mhz */
666#define CLK_85_860M 85860000
667#define CLK_88_750M 88750000
668#define CLK_94_500M 94500000
669#define CLK_97_750M 97750000
670#define CLK_101_000M 101000000
671#define CLK_106_500M 106500000
672#define CLK_108_000M 108000000
673#define CLK_113_309M 113309000
674#define CLK_118_840M 118840000
675#define CLK_119_000M 119000000
676#define CLK_121_750M 121750000 /* 121.704MHz */
677#define CLK_125_104M 125104000
678#define CLK_135_000M 135000000
679#define CLK_136_700M 136700000
680#define CLK_138_400M 138400000
681#define CLK_146_760M 146760000
682#define CLK_148_500M 148500000
683
684#define CLK_153_920M 153920000
685#define CLK_156_000M 156000000
686#define CLK_157_500M 157500000
687#define CLK_162_000M 162000000
688#define CLK_187_000M 187000000
689#define CLK_193_295M 193295000
690#define CLK_202_500M 202500000
691#define CLK_204_000M 204000000
692#define CLK_218_500M 218500000
693#define CLK_234_000M 234000000
694#define CLK_267_250M 267250000
695#define CLK_297_500M 297500000
696#define CLK_74_481M 74481000
697#define CLK_172_798M 172798000
698#define CLK_122_614M 122614000
699
700
701/* Definition CRTC Timing Index */ 630/* Definition CRTC Timing Index */
702#define H_TOTAL_INDEX 0 631#define H_TOTAL_INDEX 0
703#define H_ADDR_INDEX 1 632#define H_ADDR_INDEX 1
@@ -753,7 +682,6 @@ struct display_timing {
753 682
754struct crt_mode_table { 683struct crt_mode_table {
755 int refresh_rate; 684 int refresh_rate;
756 unsigned long clk;
757 int h_sync_polarity; 685 int h_sync_polarity;
758 int v_sync_polarity; 686 int v_sync_polarity;
759 struct display_timing crtc; 687 struct display_timing crtc;
diff --git a/drivers/video/via/viamode.c b/drivers/video/via/viamode.c
index ea0bc7af6798..1f24ee963db0 100644
--- a/drivers/video/via/viamode.c
+++ b/drivers/video/via/viamode.c
@@ -378,327 +378,320 @@ struct VPITTable VPIT = {
378 378
379/* 480x640 */ 379/* 480x640 */
380static struct crt_mode_table CRTM480x640[] = { 380static struct crt_mode_table CRTM480x640[] = {
381 /* r_rate, vclk, hsp, vsp */ 381 /* r_rate, hsp, vsp */
382 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ 382 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
383 {REFRESH_60, CLK_25_175M, M480X640_R60_HSP, M480X640_R60_VSP, 383 {REFRESH_60, M480X640_R60_HSP, M480X640_R60_VSP,
384 {624, 480, 480, 144, 504, 48, 663, 640, 640, 23, 641, 3} } /* GTF*/ 384 {624, 480, 480, 144, 504, 48, 663, 640, 640, 23, 641, 3} } /* GTF*/
385}; 385};
386 386
387/* 640x480*/ 387/* 640x480*/
388static struct crt_mode_table CRTM640x480[] = { 388static struct crt_mode_table CRTM640x480[] = {
389 /*r_rate,vclk,hsp,vsp */ 389 /*r_rate,hsp,vsp */
390 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ 390 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
391 {REFRESH_60, CLK_25_175M, M640X480_R60_HSP, M640X480_R60_VSP, 391 {REFRESH_60, M640X480_R60_HSP, M640X480_R60_VSP,
392 {800, 640, 648, 144, 656, 96, 525, 480, 480, 45, 490, 2} }, 392 {800, 640, 648, 144, 656, 96, 525, 480, 480, 45, 490, 2} },
393 {REFRESH_75, CLK_31_500M, M640X480_R75_HSP, M640X480_R75_VSP, 393 {REFRESH_75, M640X480_R75_HSP, M640X480_R75_VSP,
394 {840, 640, 640, 200, 656, 64, 500, 480, 480, 20, 481, 3} }, 394 {840, 640, 640, 200, 656, 64, 500, 480, 480, 20, 481, 3} },
395 {REFRESH_85, CLK_36_000M, M640X480_R85_HSP, M640X480_R85_VSP, 395 {REFRESH_85, M640X480_R85_HSP, M640X480_R85_VSP,
396 {832, 640, 640, 192, 696, 56, 509, 480, 480, 29, 481, 3} }, 396 {832, 640, 640, 192, 696, 56, 509, 480, 480, 29, 481, 3} },
397 {REFRESH_100, CLK_43_163M, M640X480_R100_HSP, M640X480_R100_VSP, 397 {REFRESH_100, M640X480_R100_HSP, M640X480_R100_VSP,
398 {848, 640, 640, 208, 680, 64, 509, 480, 480, 29, 481, 3} }, /*GTF*/ 398 {848, 640, 640, 208, 680, 64, 509, 480, 480, 29, 481, 3} }, /*GTF*/
399 {REFRESH_120, CLK_52_406M, M640X480_R120_HSP, 399 {REFRESH_120, M640X480_R120_HSP, M640X480_R120_VSP,
400 M640X480_R120_VSP, 400 {848, 640, 640, 208, 680, 64, 515, 480, 480, 35, 481, 3} } /*GTF*/
401 {848, 640, 640, 208, 680, 64, 515, 480, 480, 35, 481,
402 3} } /*GTF*/
403}; 401};
404 402
405/*720x480 (GTF)*/ 403/*720x480 (GTF)*/
406static struct crt_mode_table CRTM720x480[] = { 404static struct crt_mode_table CRTM720x480[] = {
407 /*r_rate,vclk,hsp,vsp */ 405 /*r_rate,hsp,vsp */
408 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ 406 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
409 {REFRESH_60, CLK_26_880M, M720X480_R60_HSP, M720X480_R60_VSP, 407 {REFRESH_60, M720X480_R60_HSP, M720X480_R60_VSP,
410 {896, 720, 720, 176, 736, 72, 497, 480, 480, 17, 481, 3} } 408 {896, 720, 720, 176, 736, 72, 497, 480, 480, 17, 481, 3} }
411 409
412}; 410};
413 411
414/*720x576 (GTF)*/ 412/*720x576 (GTF)*/
415static struct crt_mode_table CRTM720x576[] = { 413static struct crt_mode_table CRTM720x576[] = {
416 /*r_rate,vclk,hsp,vsp */ 414 /*r_rate,hsp,vsp */
417 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ 415 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
418 {REFRESH_60, CLK_32_668M, M720X576_R60_HSP, M720X576_R60_VSP, 416 {REFRESH_60, M720X576_R60_HSP, M720X576_R60_VSP,
419 {912, 720, 720, 192, 744, 72, 597, 576, 576, 21, 577, 3} } 417 {912, 720, 720, 192, 744, 72, 597, 576, 576, 21, 577, 3} }
420}; 418};
421 419
422/* 800x480 (CVT) */ 420/* 800x480 (CVT) */
423static struct crt_mode_table CRTM800x480[] = { 421static struct crt_mode_table CRTM800x480[] = {
424 /* r_rate, vclk, hsp, vsp */ 422 /* r_rate, hsp, vsp */
425 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ 423 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
426 {REFRESH_60, CLK_29_581M, M800X480_R60_HSP, M800X480_R60_VSP, 424 {REFRESH_60, M800X480_R60_HSP, M800X480_R60_VSP,
427 {992, 800, 800, 192, 824, 72, 500, 480, 480, 20, 483, 7} } 425 {992, 800, 800, 192, 824, 72, 500, 480, 480, 20, 483, 7} }
428}; 426};
429 427
430/* 800x600*/ 428/* 800x600*/
431static struct crt_mode_table CRTM800x600[] = { 429static struct crt_mode_table CRTM800x600[] = {
432 /*r_rate,vclk,hsp,vsp */ 430 /*r_rate,hsp,vsp */
433 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ 431 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
434 {REFRESH_60, CLK_40_000M, M800X600_R60_HSP, M800X600_R60_VSP, 432 {REFRESH_60, M800X600_R60_HSP, M800X600_R60_VSP,
435 {1056, 800, 800, 256, 840, 128, 628, 600, 600, 28, 601, 4} }, 433 {1056, 800, 800, 256, 840, 128, 628, 600, 600, 28, 601, 4} },
436 {REFRESH_75, CLK_49_500M, M800X600_R75_HSP, M800X600_R75_VSP, 434 {REFRESH_75, M800X600_R75_HSP, M800X600_R75_VSP,
437 {1056, 800, 800, 256, 816, 80, 625, 600, 600, 25, 601, 3} }, 435 {1056, 800, 800, 256, 816, 80, 625, 600, 600, 25, 601, 3} },
438 {REFRESH_85, CLK_56_250M, M800X600_R85_HSP, M800X600_R85_VSP, 436 {REFRESH_85, M800X600_R85_HSP, M800X600_R85_VSP,
439 {1048, 800, 800, 248, 832, 64, 631, 600, 600, 31, 601, 3} }, 437 {1048, 800, 800, 248, 832, 64, 631, 600, 600, 31, 601, 3} },
440 {REFRESH_100, CLK_68_179M, M800X600_R100_HSP, M800X600_R100_VSP, 438 {REFRESH_100, M800X600_R100_HSP, M800X600_R100_VSP,
441 {1072, 800, 800, 272, 848, 88, 636, 600, 600, 36, 601, 3} }, 439 {1072, 800, 800, 272, 848, 88, 636, 600, 600, 36, 601, 3} },
442 {REFRESH_120, CLK_83_950M, M800X600_R120_HSP, 440 {REFRESH_120, M800X600_R120_HSP, M800X600_R120_VSP,
443 M800X600_R120_VSP, 441 {1088, 800, 800, 288, 856, 88, 643, 600, 600, 43, 601, 3} }
444 {1088, 800, 800, 288, 856, 88, 643, 600, 600, 43, 601,
445 3} }
446}; 442};
447 443
448/* 848x480 (CVT) */ 444/* 848x480 (CVT) */
449static struct crt_mode_table CRTM848x480[] = { 445static struct crt_mode_table CRTM848x480[] = {
450 /* r_rate, vclk, hsp, vsp */ 446 /* r_rate, hsp, vsp */
451 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ 447 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
452 {REFRESH_60, CLK_31_500M, M848X480_R60_HSP, M848X480_R60_VSP, 448 {REFRESH_60, M848X480_R60_HSP, M848X480_R60_VSP,
453 {1056, 848, 848, 208, 872, 80, 500, 480, 480, 20, 483, 5} } 449 {1056, 848, 848, 208, 872, 80, 500, 480, 480, 20, 483, 5} }
454}; 450};
455 451
456/*856x480 (GTF) convert to 852x480*/ 452/*856x480 (GTF) convert to 852x480*/
457static struct crt_mode_table CRTM852x480[] = { 453static struct crt_mode_table CRTM852x480[] = {
458 /*r_rate,vclk,hsp,vsp */ 454 /*r_rate,hsp,vsp */
459 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ 455 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
460 {REFRESH_60, CLK_31_728M, M852X480_R60_HSP, M852X480_R60_VSP, 456 {REFRESH_60, M852X480_R60_HSP, M852X480_R60_VSP,
461 {1064, 856, 856, 208, 872, 88, 497, 480, 480, 17, 481, 3} } 457 {1064, 856, 856, 208, 872, 88, 497, 480, 480, 17, 481, 3} }
462}; 458};
463 459
464/*1024x512 (GTF)*/ 460/*1024x512 (GTF)*/
465static struct crt_mode_table CRTM1024x512[] = { 461static struct crt_mode_table CRTM1024x512[] = {
466 /*r_rate,vclk,hsp,vsp */ 462 /*r_rate,hsp,vsp */
467 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ 463 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
468 {REFRESH_60, CLK_41_291M, M1024X512_R60_HSP, M1024X512_R60_VSP, 464 {REFRESH_60, M1024X512_R60_HSP, M1024X512_R60_VSP,
469 {1296, 1024, 1024, 272, 1056, 104, 531, 512, 512, 19, 513, 3} } 465 {1296, 1024, 1024, 272, 1056, 104, 531, 512, 512, 19, 513, 3} }
470 466
471}; 467};
472 468
473/* 1024x600*/ 469/* 1024x600*/
474static struct crt_mode_table CRTM1024x600[] = { 470static struct crt_mode_table CRTM1024x600[] = {
475 /*r_rate,vclk,hsp,vsp */ 471 /*r_rate,hsp,vsp */
476 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ 472 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
477 {REFRESH_60, CLK_48_875M, M1024X600_R60_HSP, M1024X600_R60_VSP, 473 {REFRESH_60, M1024X600_R60_HSP, M1024X600_R60_VSP,
478 {1312, 1024, 1024, 288, 1064, 104, 622, 600, 600, 22, 601, 3} }, 474 {1312, 1024, 1024, 288, 1064, 104, 622, 600, 600, 22, 601, 3} },
479}; 475};
480 476
481/* 1024x768*/ 477/* 1024x768*/
482static struct crt_mode_table CRTM1024x768[] = { 478static struct crt_mode_table CRTM1024x768[] = {
483 /*r_rate,vclk,hsp,vsp */ 479 /*r_rate,hsp,vsp */
484 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ 480 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
485 {REFRESH_60, CLK_65_000M, M1024X768_R60_HSP, M1024X768_R60_VSP, 481 {REFRESH_60, M1024X768_R60_HSP, M1024X768_R60_VSP,
486 {1344, 1024, 1024, 320, 1048, 136, 806, 768, 768, 38, 771, 6} }, 482 {1344, 1024, 1024, 320, 1048, 136, 806, 768, 768, 38, 771, 6} },
487 {REFRESH_75, CLK_78_750M, M1024X768_R75_HSP, M1024X768_R75_VSP, 483 {REFRESH_75, M1024X768_R75_HSP, M1024X768_R75_VSP,
488 {1312, 1024, 1024, 288, 1040, 96, 800, 768, 768, 32, 769, 3} }, 484 {1312, 1024, 1024, 288, 1040, 96, 800, 768, 768, 32, 769, 3} },
489 {REFRESH_85, CLK_94_500M, M1024X768_R85_HSP, M1024X768_R85_VSP, 485 {REFRESH_85, M1024X768_R85_HSP, M1024X768_R85_VSP,
490 {1376, 1024, 1024, 352, 1072, 96, 808, 768, 768, 40, 769, 3} }, 486 {1376, 1024, 1024, 352, 1072, 96, 808, 768, 768, 40, 769, 3} },
491 {REFRESH_100, CLK_113_309M, M1024X768_R100_HSP, M1024X768_R100_VSP, 487 {REFRESH_100, M1024X768_R100_HSP, M1024X768_R100_VSP,
492 {1392, 1024, 1024, 368, 1096, 112, 814, 768, 768, 46, 769, 3} } 488 {1392, 1024, 1024, 368, 1096, 112, 814, 768, 768, 46, 769, 3} }
493}; 489};
494 490
495/* 1152x864*/ 491/* 1152x864*/
496static struct crt_mode_table CRTM1152x864[] = { 492static struct crt_mode_table CRTM1152x864[] = {
497 /*r_rate,vclk,hsp,vsp */ 493 /*r_rate,hsp,vsp */
498 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ 494 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
499 {REFRESH_75, CLK_108_000M, M1152X864_R75_HSP, M1152X864_R75_VSP, 495 {REFRESH_75, M1152X864_R75_HSP, M1152X864_R75_VSP,
500 {1600, 1152, 1152, 448, 1216, 128, 900, 864, 864, 36, 865, 3} } 496 {1600, 1152, 1152, 448, 1216, 128, 900, 864, 864, 36, 865, 3} }
501 497
502}; 498};
503 499
504/* 1280x720 (HDMI 720P)*/ 500/* 1280x720 (HDMI 720P)*/
505static struct crt_mode_table CRTM1280x720[] = { 501static struct crt_mode_table CRTM1280x720[] = {
506 /*r_rate,vclk,hsp,vsp */ 502 /*r_rate,hsp,vsp */
507 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ 503 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
508 {REFRESH_60, CLK_74_481M, M1280X720_R60_HSP, M1280X720_R60_VSP, 504 {REFRESH_60, M1280X720_R60_HSP, M1280X720_R60_VSP,
509 {1648, 1280, 1280, 368, 1392, 40, 750, 720, 720, 30, 725, 5} }, 505 {1648, 1280, 1280, 368, 1392, 40, 750, 720, 720, 30, 725, 5} },
510 {REFRESH_50, CLK_60_466M, M1280X720_R50_HSP, M1280X720_R50_VSP, 506 {REFRESH_50, M1280X720_R50_HSP, M1280X720_R50_VSP,
511 {1632, 1280, 1280, 352, 1328, 128, 741, 720, 720, 21, 721, 3} } 507 {1632, 1280, 1280, 352, 1328, 128, 741, 720, 720, 21, 721, 3} }
512}; 508};
513 509
514/*1280x768 (GTF)*/ 510/*1280x768 (GTF)*/
515static struct crt_mode_table CRTM1280x768[] = { 511static struct crt_mode_table CRTM1280x768[] = {
516 /*r_rate,vclk,hsp,vsp */ 512 /*r_rate,hsp,vsp */
517 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ 513 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
518 {REFRESH_60, CLK_80_136M, M1280X768_R60_HSP, M1280X768_R60_VSP, 514 {REFRESH_60, M1280X768_R60_HSP, M1280X768_R60_VSP,
519 {1680, 1280, 1280, 400, 1344, 136, 795, 768, 768, 27, 769, 3} }, 515 {1680, 1280, 1280, 400, 1344, 136, 795, 768, 768, 27, 769, 3} },
520 {REFRESH_50, CLK_65_178M, M1280X768_R50_HSP, M1280X768_R50_VSP, 516 {REFRESH_50, M1280X768_R50_HSP, M1280X768_R50_VSP,
521 {1648, 1280, 1280, 368, 1336, 128, 791, 768, 768, 23, 769, 3} } 517 {1648, 1280, 1280, 368, 1336, 128, 791, 768, 768, 23, 769, 3} }
522}; 518};
523 519
524/* 1280x800 (CVT) */ 520/* 1280x800 (CVT) */
525static struct crt_mode_table CRTM1280x800[] = { 521static struct crt_mode_table CRTM1280x800[] = {
526 /* r_rate, vclk, hsp, vsp */ 522 /* r_rate, hsp, vsp */
527 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ 523 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
528 {REFRESH_60, CLK_83_375M, M1280X800_R60_HSP, M1280X800_R60_VSP, 524 {REFRESH_60, M1280X800_R60_HSP, M1280X800_R60_VSP,
529 {1680, 1280, 1280, 400, 1352, 128, 831, 800, 800, 31, 803, 6} } 525 {1680, 1280, 1280, 400, 1352, 128, 831, 800, 800, 31, 803, 6} }
530}; 526};
531 527
532/*1280x960*/ 528/*1280x960*/
533static struct crt_mode_table CRTM1280x960[] = { 529static struct crt_mode_table CRTM1280x960[] = {
534 /*r_rate,vclk,hsp,vsp */ 530 /*r_rate,hsp,vsp */
535 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ 531 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
536 {REFRESH_60, CLK_108_000M, M1280X960_R60_HSP, M1280X960_R60_VSP, 532 {REFRESH_60, M1280X960_R60_HSP, M1280X960_R60_VSP,
537 {1800, 1280, 1280, 520, 1376, 112, 1000, 960, 960, 40, 961, 3} } 533 {1800, 1280, 1280, 520, 1376, 112, 1000, 960, 960, 40, 961, 3} }
538}; 534};
539 535
540/* 1280x1024*/ 536/* 1280x1024*/
541static struct crt_mode_table CRTM1280x1024[] = { 537static struct crt_mode_table CRTM1280x1024[] = {
542 /*r_rate,vclk,,hsp,vsp */ 538 /*r_rate,hsp,vsp */
543 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ 539 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
544 {REFRESH_60, CLK_108_000M, M1280X1024_R60_HSP, M1280X1024_R60_VSP, 540 {REFRESH_60, M1280X1024_R60_HSP, M1280X1024_R60_VSP,
545 {1688, 1280, 1280, 408, 1328, 112, 1066, 1024, 1024, 42, 1025, 541 {1688, 1280, 1280, 408, 1328, 112, 1066, 1024, 1024, 42, 1025,
546 3} }, 542 3} },
547 {REFRESH_75, CLK_135_000M, M1280X1024_R75_HSP, M1280X1024_R75_VSP, 543 {REFRESH_75, M1280X1024_R75_HSP, M1280X1024_R75_VSP,
548 {1688, 1280, 1280, 408, 1296, 144, 1066, 1024, 1024, 42, 1025, 544 {1688, 1280, 1280, 408, 1296, 144, 1066, 1024, 1024, 42, 1025,
549 3} }, 545 3} },
550 {REFRESH_85, CLK_157_500M, M1280X1024_R85_HSP, M1280X1024_R85_VSP, 546 {REFRESH_85, M1280X1024_R85_HSP, M1280X1024_R85_VSP,
551 {1728, 1280, 1280, 448, 1344, 160, 1072, 1024, 1024, 48, 1025, 3} } 547 {1728, 1280, 1280, 448, 1344, 160, 1072, 1024, 1024, 48, 1025, 3} }
552}; 548};
553 549
554/* 1368x768 (GTF) */ 550/* 1368x768 (GTF) */
555static struct crt_mode_table CRTM1368x768[] = { 551static struct crt_mode_table CRTM1368x768[] = {
556 /* r_rate, vclk, hsp, vsp */ 552 /* r_rate, hsp, vsp */
557 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ 553 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
558 {REFRESH_60, CLK_85_860M, M1368X768_R60_HSP, M1368X768_R60_VSP, 554 {REFRESH_60, M1368X768_R60_HSP, M1368X768_R60_VSP,
559 {1800, 1368, 1368, 432, 1440, 144, 795, 768, 768, 27, 769, 3} } 555 {1800, 1368, 1368, 432, 1440, 144, 795, 768, 768, 27, 769, 3} }
560}; 556};
561 557
562/*1440x1050 (GTF)*/ 558/*1440x1050 (GTF)*/
563static struct crt_mode_table CRTM1440x1050[] = { 559static struct crt_mode_table CRTM1440x1050[] = {
564 /*r_rate,vclk,hsp,vsp */ 560 /*r_rate,hsp,vsp */
565 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ 561 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
566 {REFRESH_60, CLK_125_104M, M1440X1050_R60_HSP, M1440X1050_R60_VSP, 562 {REFRESH_60, M1440X1050_R60_HSP, M1440X1050_R60_VSP,
567 {1936, 1440, 1440, 496, 1536, 152, 1077, 1040, 1040, 37, 1041, 3} } 563 {1936, 1440, 1440, 496, 1536, 152, 1077, 1040, 1040, 37, 1041, 3} }
568}; 564};
569 565
570/* 1600x1200*/ 566/* 1600x1200*/
571static struct crt_mode_table CRTM1600x1200[] = { 567static struct crt_mode_table CRTM1600x1200[] = {
572 /*r_rate,vclk,hsp,vsp */ 568 /*r_rate,hsp,vsp */
573 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ 569 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
574 {REFRESH_60, CLK_162_000M, M1600X1200_R60_HSP, M1600X1200_R60_VSP, 570 {REFRESH_60, M1600X1200_R60_HSP, M1600X1200_R60_VSP,
575 {2160, 1600, 1600, 560, 1664, 192, 1250, 1200, 1200, 50, 1201, 571 {2160, 1600, 1600, 560, 1664, 192, 1250, 1200, 1200, 50, 1201,
576 3} }, 572 3} },
577 {REFRESH_75, CLK_202_500M, M1600X1200_R75_HSP, M1600X1200_R75_VSP, 573 {REFRESH_75, M1600X1200_R75_HSP, M1600X1200_R75_VSP,
578 {2160, 1600, 1600, 560, 1664, 192, 1250, 1200, 1200, 50, 1201, 3} } 574 {2160, 1600, 1600, 560, 1664, 192, 1250, 1200, 1200, 50, 1201, 3} }
579 575
580}; 576};
581 577
582/* 1680x1050 (CVT) */ 578/* 1680x1050 (CVT) */
583static struct crt_mode_table CRTM1680x1050[] = { 579static struct crt_mode_table CRTM1680x1050[] = {
584 /* r_rate, vclk, hsp, vsp */ 580 /* r_rate, hsp, vsp */
585 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ 581 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
586 {REFRESH_60, CLK_146_760M, M1680x1050_R60_HSP, M1680x1050_R60_VSP, 582 {REFRESH_60, M1680x1050_R60_HSP, M1680x1050_R60_VSP,
587 {2240, 1680, 1680, 560, 1784, 176, 1089, 1050, 1050, 39, 1053, 583 {2240, 1680, 1680, 560, 1784, 176, 1089, 1050, 1050, 39, 1053,
588 6} }, 584 6} },
589 {REFRESH_75, CLK_187_000M, M1680x1050_R75_HSP, M1680x1050_R75_VSP, 585 {REFRESH_75, M1680x1050_R75_HSP, M1680x1050_R75_VSP,
590 {2272, 1680, 1680, 592, 1800, 176, 1099, 1050, 1050, 49, 1053, 6} } 586 {2272, 1680, 1680, 592, 1800, 176, 1099, 1050, 1050, 49, 1053, 6} }
591}; 587};
592 588
593/* 1680x1050 (CVT Reduce Blanking) */ 589/* 1680x1050 (CVT Reduce Blanking) */
594static struct crt_mode_table CRTM1680x1050_RB[] = { 590static struct crt_mode_table CRTM1680x1050_RB[] = {
595 /* r_rate, vclk, hsp, vsp */ 591 /* r_rate, hsp, vsp */
596 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ 592 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
597 {REFRESH_60, CLK_119_000M, M1680x1050_RB_R60_HSP, 593 {REFRESH_60, M1680x1050_RB_R60_HSP, M1680x1050_RB_R60_VSP,
598 M1680x1050_RB_R60_VSP,
599 {1840, 1680, 1680, 160, 1728, 32, 1080, 1050, 1050, 30, 1053, 6} } 594 {1840, 1680, 1680, 160, 1728, 32, 1080, 1050, 1050, 30, 1053, 6} }
600}; 595};
601 596
602/* 1920x1080 (CVT)*/ 597/* 1920x1080 (CVT)*/
603static struct crt_mode_table CRTM1920x1080[] = { 598static struct crt_mode_table CRTM1920x1080[] = {
604 /*r_rate,vclk,hsp,vsp */ 599 /*r_rate,hsp,vsp */
605 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ 600 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
606 {REFRESH_60, CLK_172_798M, M1920X1080_R60_HSP, M1920X1080_R60_VSP, 601 {REFRESH_60, M1920X1080_R60_HSP, M1920X1080_R60_VSP,
607 {2576, 1920, 1920, 656, 2048, 200, 1120, 1080, 1080, 40, 1083, 5} } 602 {2576, 1920, 1920, 656, 2048, 200, 1120, 1080, 1080, 40, 1083, 5} }
608}; 603};
609 604
610/* 1920x1080 (CVT with Reduce Blanking) */ 605/* 1920x1080 (CVT with Reduce Blanking) */
611static struct crt_mode_table CRTM1920x1080_RB[] = { 606static struct crt_mode_table CRTM1920x1080_RB[] = {
612 /* r_rate, vclk, hsp, vsp */ 607 /* r_rate, hsp, vsp */
613 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ 608 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
614 {REFRESH_60, CLK_138_400M, M1920X1080_RB_R60_HSP, 609 {REFRESH_60, M1920X1080_RB_R60_HSP, M1920X1080_RB_R60_VSP,
615 M1920X1080_RB_R60_VSP,
616 {2080, 1920, 1920, 160, 1968, 32, 1111, 1080, 1080, 31, 1083, 5} } 610 {2080, 1920, 1920, 160, 1968, 32, 1111, 1080, 1080, 31, 1083, 5} }
617}; 611};
618 612
619/* 1920x1440*/ 613/* 1920x1440*/
620static struct crt_mode_table CRTM1920x1440[] = { 614static struct crt_mode_table CRTM1920x1440[] = {
621 /*r_rate,vclk,hsp,vsp */ 615 /*r_rate,hsp,vsp */
622 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ 616 /*HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
623 {REFRESH_60, CLK_234_000M, M1920X1440_R60_HSP, M1920X1440_R60_VSP, 617 {REFRESH_60, M1920X1440_R60_HSP, M1920X1440_R60_VSP,
624 {2600, 1920, 1920, 680, 2048, 208, 1500, 1440, 1440, 60, 1441, 618 {2600, 1920, 1920, 680, 2048, 208, 1500, 1440, 1440, 60, 1441,
625 3} }, 619 3} },
626 {REFRESH_75, CLK_297_500M, M1920X1440_R75_HSP, M1920X1440_R75_VSP, 620 {REFRESH_75, M1920X1440_R75_HSP, M1920X1440_R75_VSP,
627 {2640, 1920, 1920, 720, 2064, 224, 1500, 1440, 1440, 60, 1441, 3} } 621 {2640, 1920, 1920, 720, 2064, 224, 1500, 1440, 1440, 60, 1441, 3} }
628}; 622};
629 623
630/* 1400x1050 (CVT) */ 624/* 1400x1050 (CVT) */
631static struct crt_mode_table CRTM1400x1050[] = { 625static struct crt_mode_table CRTM1400x1050[] = {
632 /* r_rate, vclk, hsp, vsp */ 626 /* r_rate, hsp, vsp */
633 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ 627 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
634 {REFRESH_60, CLK_121_750M, M1400X1050_R60_HSP, M1400X1050_R60_VSP, 628 {REFRESH_60, M1400X1050_R60_HSP, M1400X1050_R60_VSP,
635 {1864, 1400, 1400, 464, 1488, 144, 1089, 1050, 1050, 39, 1053, 629 {1864, 1400, 1400, 464, 1488, 144, 1089, 1050, 1050, 39, 1053,
636 4} }, 630 4} },
637 {REFRESH_75, CLK_156_000M, M1400X1050_R75_HSP, M1400X1050_R75_VSP, 631 {REFRESH_75, M1400X1050_R75_HSP, M1400X1050_R75_VSP,
638 {1896, 1400, 1400, 496, 1504, 144, 1099, 1050, 1050, 49, 1053, 4} } 632 {1896, 1400, 1400, 496, 1504, 144, 1099, 1050, 1050, 49, 1053, 4} }
639}; 633};
640 634
641/* 1400x1050 (CVT Reduce Blanking) */ 635/* 1400x1050 (CVT Reduce Blanking) */
642static struct crt_mode_table CRTM1400x1050_RB[] = { 636static struct crt_mode_table CRTM1400x1050_RB[] = {
643 /* r_rate, vclk, hsp, vsp */ 637 /* r_rate, hsp, vsp */
644 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ 638 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
645 {REFRESH_60, CLK_101_000M, M1400X1050_RB_R60_HSP, 639 {REFRESH_60, M1400X1050_RB_R60_HSP, M1400X1050_RB_R60_VSP,
646 M1400X1050_RB_R60_VSP,
647 {1560, 1400, 1400, 160, 1448, 32, 1080, 1050, 1050, 30, 1053, 4} } 640 {1560, 1400, 1400, 160, 1448, 32, 1080, 1050, 1050, 30, 1053, 4} }
648}; 641};
649 642
650/* 960x600 (CVT) */ 643/* 960x600 (CVT) */
651static struct crt_mode_table CRTM960x600[] = { 644static struct crt_mode_table CRTM960x600[] = {
652 /* r_rate, vclk, hsp, vsp */ 645 /* r_rate, hsp, vsp */
653 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ 646 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
654 {REFRESH_60, CLK_45_250M, M960X600_R60_HSP, M960X600_R60_VSP, 647 {REFRESH_60, M960X600_R60_HSP, M960X600_R60_VSP,
655 {1216, 960, 960, 256, 992, 96, 624, 600, 600, 24, 603, 6} } 648 {1216, 960, 960, 256, 992, 96, 624, 600, 600, 24, 603, 6} }
656}; 649};
657 650
658/* 1000x600 (GTF) */ 651/* 1000x600 (GTF) */
659static struct crt_mode_table CRTM1000x600[] = { 652static struct crt_mode_table CRTM1000x600[] = {
660 /* r_rate, vclk, hsp, vsp */ 653 /* r_rate, hsp, vsp */
661 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ 654 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
662 {REFRESH_60, CLK_48_000M, M1000X600_R60_HSP, M1000X600_R60_VSP, 655 {REFRESH_60, M1000X600_R60_HSP, M1000X600_R60_VSP,
663 {1288, 1000, 1000, 288, 1040, 104, 622, 600, 600, 22, 601, 3} } 656 {1288, 1000, 1000, 288, 1040, 104, 622, 600, 600, 22, 601, 3} }
664}; 657};
665 658
666/* 1024x576 (GTF) */ 659/* 1024x576 (GTF) */
667static struct crt_mode_table CRTM1024x576[] = { 660static struct crt_mode_table CRTM1024x576[] = {
668 /* r_rate, vclk, hsp, vsp */ 661 /* r_rate, hsp, vsp */
669 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ 662 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
670 {REFRESH_60, CLK_46_996M, M1024X576_R60_HSP, M1024X576_R60_VSP, 663 {REFRESH_60, M1024X576_R60_HSP, M1024X576_R60_VSP,
671 {1312, 1024, 1024, 288, 1064, 104, 597, 576, 576, 21, 577, 3} } 664 {1312, 1024, 1024, 288, 1064, 104, 597, 576, 576, 21, 577, 3} }
672}; 665};
673 666
674/* 1088x612 (CVT) */ 667/* 1088x612 (CVT) */
675static struct crt_mode_table CRTM1088x612[] = { 668static struct crt_mode_table CRTM1088x612[] = {
676 /* r_rate, vclk, hsp, vsp */ 669 /* r_rate, hsp, vsp */
677 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ 670 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
678 {REFRESH_60, CLK_52_977M, M1088X612_R60_HSP, M1088X612_R60_VSP, 671 {REFRESH_60, M1088X612_R60_HSP, M1088X612_R60_VSP,
679 {1392, 1088, 1088, 304, 1136, 104, 636, 612, 612, 24, 615, 5} } 672 {1392, 1088, 1088, 304, 1136, 104, 636, 612, 612, 24, 615, 5} }
680}; 673};
681 674
682/* 1152x720 (CVT) */ 675/* 1152x720 (CVT) */
683static struct crt_mode_table CRTM1152x720[] = { 676static struct crt_mode_table CRTM1152x720[] = {
684 /* r_rate, vclk, hsp, vsp */ 677 /* r_rate, hsp, vsp */
685 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ 678 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
686 {REFRESH_60, CLK_66_750M, M1152X720_R60_HSP, M1152X720_R60_VSP, 679 {REFRESH_60, M1152X720_R60_HSP, M1152X720_R60_VSP,
687 {1488, 1152, 1152, 336, 1208, 112, 748, 720, 720, 28, 723, 6} } 680 {1488, 1152, 1152, 336, 1208, 112, 748, 720, 720, 28, 723, 6} }
688}; 681};
689 682
690/* 1200x720 (GTF) */ 683/* 1200x720 (GTF) */
691static struct crt_mode_table CRTM1200x720[] = { 684static struct crt_mode_table CRTM1200x720[] = {
692 /* r_rate, vclk, hsp, vsp */ 685 /* r_rate, hsp, vsp */
693 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ 686 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
694 {REFRESH_60, CLK_70_159M, M1200X720_R60_HSP, M1200X720_R60_VSP, 687 {REFRESH_60, M1200X720_R60_HSP, M1200X720_R60_VSP,
695 {1568, 1200, 1200, 368, 1256, 128, 746, 720, 720, 26, 721, 3} } 688 {1568, 1200, 1200, 368, 1256, 128, 746, 720, 720, 26, 721, 3} }
696}; 689};
697 690
698/* 1200x900 (DCON) */ 691/* 1200x900 (DCON) */
699static struct crt_mode_table DCON1200x900[] = { 692static struct crt_mode_table DCON1200x900[] = {
700 /* r_rate, vclk, hsp, vsp */ 693 /* r_rate, hsp, vsp */
701 {REFRESH_60, CLK_57_275M, M1200X900_R60_HSP, M1200X900_R60_VSP, 694 {REFRESH_60, M1200X900_R60_HSP, M1200X900_R60_VSP,
702 /* The correct htotal is 1240, but this doesn't raster on VX855. */ 695 /* The correct htotal is 1240, but this doesn't raster on VX855. */
703 /* Via suggested changing to a multiple of 16, hence 1264. */ 696 /* Via suggested changing to a multiple of 16, hence 1264. */
704 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ 697 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
@@ -707,121 +700,117 @@ static struct crt_mode_table DCON1200x900[] = {
707 700
708/* 1280x600 (GTF) */ 701/* 1280x600 (GTF) */
709static struct crt_mode_table CRTM1280x600[] = { 702static struct crt_mode_table CRTM1280x600[] = {
710 /* r_rate, vclk, hsp, vsp */ 703 /* r_rate, hsp, vsp */
711 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ 704 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
712 {REFRESH_60, CLK_61_500M, M1280x600_R60_HSP, M1280x600_R60_VSP, 705 {REFRESH_60, M1280x600_R60_HSP, M1280x600_R60_VSP,
713 {1648, 1280, 1280, 368, 1336, 128, 622, 600, 600, 22, 601, 3} } 706 {1648, 1280, 1280, 368, 1336, 128, 622, 600, 600, 22, 601, 3} }
714}; 707};
715 708
716/* 1360x768 (CVT) */ 709/* 1360x768 (CVT) */
717static struct crt_mode_table CRTM1360x768[] = { 710static struct crt_mode_table CRTM1360x768[] = {
718 /* r_rate, vclk, hsp, vsp */ 711 /* r_rate, hsp, vsp */
719 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ 712 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
720 {REFRESH_60, CLK_84_750M, M1360X768_R60_HSP, M1360X768_R60_VSP, 713 {REFRESH_60, M1360X768_R60_HSP, M1360X768_R60_VSP,
721 {1776, 1360, 1360, 416, 1432, 136, 798, 768, 768, 30, 771, 5} } 714 {1776, 1360, 1360, 416, 1432, 136, 798, 768, 768, 30, 771, 5} }
722}; 715};
723 716
724/* 1360x768 (CVT Reduce Blanking) */ 717/* 1360x768 (CVT Reduce Blanking) */
725static struct crt_mode_table CRTM1360x768_RB[] = { 718static struct crt_mode_table CRTM1360x768_RB[] = {
726 /* r_rate, vclk, hsp, vsp */ 719 /* r_rate, hsp, vsp */
727 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ 720 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
728 {REFRESH_60, CLK_72_000M, M1360X768_RB_R60_HSP, 721 {REFRESH_60, M1360X768_RB_R60_HSP, M1360X768_RB_R60_VSP,
729 M1360X768_RB_R60_VSP,
730 {1520, 1360, 1360, 160, 1408, 32, 790, 768, 768, 22, 771, 5} } 722 {1520, 1360, 1360, 160, 1408, 32, 790, 768, 768, 22, 771, 5} }
731}; 723};
732 724
733/* 1366x768 (GTF) */ 725/* 1366x768 (GTF) */
734static struct crt_mode_table CRTM1366x768[] = { 726static struct crt_mode_table CRTM1366x768[] = {
735 /* r_rate, vclk, hsp, vsp */ 727 /* r_rate, hsp, vsp */
736 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ 728 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
737 {REFRESH_60, CLK_85_860M, M1368X768_R60_HSP, M1368X768_R60_VSP, 729 {REFRESH_60, M1368X768_R60_HSP, M1368X768_R60_VSP,
738 {1800, 1368, 1368, 432, 1440, 144, 795, 768, 768, 27, 769, 3} }, 730 {1800, 1368, 1368, 432, 1440, 144, 795, 768, 768, 27, 769, 3} },
739 {REFRESH_50, CLK_69_924M, M1368X768_R50_HSP, M1368X768_R50_VSP, 731 {REFRESH_50, M1368X768_R50_HSP, M1368X768_R50_VSP,
740 {1768, 1368, 1368, 400, 1424, 144, 791, 768, 768, 23, 769, 3} } 732 {1768, 1368, 1368, 400, 1424, 144, 791, 768, 768, 23, 769, 3} }
741}; 733};
742 734
743/* 1440x900 (CVT) */ 735/* 1440x900 (CVT) */
744static struct crt_mode_table CRTM1440x900[] = { 736static struct crt_mode_table CRTM1440x900[] = {
745 /* r_rate, vclk, hsp, vsp */ 737 /* r_rate, hsp, vsp */
746 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ 738 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
747 {REFRESH_60, CLK_106_500M, M1440X900_R60_HSP, M1440X900_R60_VSP, 739 {REFRESH_60, M1440X900_R60_HSP, M1440X900_R60_VSP,
748 {1904, 1440, 1440, 464, 1520, 152, 934, 900, 900, 34, 903, 6} }, 740 {1904, 1440, 1440, 464, 1520, 152, 934, 900, 900, 34, 903, 6} },
749 {REFRESH_75, CLK_136_700M, M1440X900_R75_HSP, M1440X900_R75_VSP, 741 {REFRESH_75, M1440X900_R75_HSP, M1440X900_R75_VSP,
750 {1936, 1440, 1440, 496, 1536, 152, 942, 900, 900, 42, 903, 6} } 742 {1936, 1440, 1440, 496, 1536, 152, 942, 900, 900, 42, 903, 6} }
751}; 743};
752 744
753/* 1440x900 (CVT Reduce Blanking) */ 745/* 1440x900 (CVT Reduce Blanking) */
754static struct crt_mode_table CRTM1440x900_RB[] = { 746static struct crt_mode_table CRTM1440x900_RB[] = {
755 /* r_rate, vclk, hsp, vsp */ 747 /* r_rate, hsp, vsp */
756 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ 748 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
757 {REFRESH_60, CLK_88_750M, M1440X900_RB_R60_HSP, 749 {REFRESH_60, M1440X900_RB_R60_HSP, M1440X900_RB_R60_VSP,
758 M1440X900_RB_R60_VSP,
759 {1600, 1440, 1440, 160, 1488, 32, 926, 900, 900, 26, 903, 6} } 750 {1600, 1440, 1440, 160, 1488, 32, 926, 900, 900, 26, 903, 6} }
760}; 751};
761 752
762/* 1600x900 (CVT) */ 753/* 1600x900 (CVT) */
763static struct crt_mode_table CRTM1600x900[] = { 754static struct crt_mode_table CRTM1600x900[] = {
764 /* r_rate, vclk, hsp, vsp */ 755 /* r_rate, hsp, vsp */
765 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ 756 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
766 {REFRESH_60, CLK_118_840M, M1600X900_R60_HSP, M1600X900_R60_VSP, 757 {REFRESH_60, M1600X900_R60_HSP, M1600X900_R60_VSP,
767 {2112, 1600, 1600, 512, 1688, 168, 934, 900, 900, 34, 903, 5} } 758 {2112, 1600, 1600, 512, 1688, 168, 934, 900, 900, 34, 903, 5} }
768}; 759};
769 760
770/* 1600x900 (CVT Reduce Blanking) */ 761/* 1600x900 (CVT Reduce Blanking) */
771static struct crt_mode_table CRTM1600x900_RB[] = { 762static struct crt_mode_table CRTM1600x900_RB[] = {
772 /* r_rate, vclk, hsp, vsp */ 763 /* r_rate, hsp, vsp */
773 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ 764 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
774 {REFRESH_60, CLK_97_750M, M1600X900_RB_R60_HSP, 765 {REFRESH_60, M1600X900_RB_R60_HSP, M1600X900_RB_R60_VSP,
775 M1600X900_RB_R60_VSP,
776 {1760, 1600, 1600, 160, 1648, 32, 926, 900, 900, 26, 903, 5} } 766 {1760, 1600, 1600, 160, 1648, 32, 926, 900, 900, 26, 903, 5} }
777}; 767};
778 768
779/* 1600x1024 (GTF) */ 769/* 1600x1024 (GTF) */
780static struct crt_mode_table CRTM1600x1024[] = { 770static struct crt_mode_table CRTM1600x1024[] = {
781 /* r_rate, vclk, hsp, vsp */ 771 /* r_rate, hsp, vsp */
782 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ 772 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
783 {REFRESH_60, CLK_136_700M, M1600X1024_R60_HSP, M1600X1024_R60_VSP, 773 {REFRESH_60, M1600X1024_R60_HSP, M1600X1024_R60_VSP,
784 {2144, 1600, 1600, 544, 1704, 168, 1060, 1024, 1024, 36, 1025, 3} } 774 {2144, 1600, 1600, 544, 1704, 168, 1060, 1024, 1024, 36, 1025, 3} }
785}; 775};
786 776
787/* 1792x1344 (DMT) */ 777/* 1792x1344 (DMT) */
788static struct crt_mode_table CRTM1792x1344[] = { 778static struct crt_mode_table CRTM1792x1344[] = {
789 /* r_rate, vclk, hsp, vsp */ 779 /* r_rate, hsp, vsp */
790 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ 780 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
791 {REFRESH_60, CLK_204_000M, M1792x1344_R60_HSP, M1792x1344_R60_VSP, 781 {REFRESH_60, M1792x1344_R60_HSP, M1792x1344_R60_VSP,
792 {2448, 1792, 1792, 656, 1920, 200, 1394, 1344, 1344, 50, 1345, 3} } 782 {2448, 1792, 1792, 656, 1920, 200, 1394, 1344, 1344, 50, 1345, 3} }
793}; 783};
794 784
795/* 1856x1392 (DMT) */ 785/* 1856x1392 (DMT) */
796static struct crt_mode_table CRTM1856x1392[] = { 786static struct crt_mode_table CRTM1856x1392[] = {
797 /* r_rate, vclk, hsp, vsp */ 787 /* r_rate, hsp, vsp */
798 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ 788 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
799 {REFRESH_60, CLK_218_500M, M1856x1392_R60_HSP, M1856x1392_R60_VSP, 789 {REFRESH_60, M1856x1392_R60_HSP, M1856x1392_R60_VSP,
800 {2528, 1856, 1856, 672, 1952, 224, 1439, 1392, 1392, 47, 1393, 3} } 790 {2528, 1856, 1856, 672, 1952, 224, 1439, 1392, 1392, 47, 1393, 3} }
801}; 791};
802 792
803/* 1920x1200 (CVT) */ 793/* 1920x1200 (CVT) */
804static struct crt_mode_table CRTM1920x1200[] = { 794static struct crt_mode_table CRTM1920x1200[] = {
805 /* r_rate, vclk, hsp, vsp */ 795 /* r_rate, hsp, vsp */
806 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ 796 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
807 {REFRESH_60, CLK_193_295M, M1920X1200_R60_HSP, M1920X1200_R60_VSP, 797 {REFRESH_60, M1920X1200_R60_HSP, M1920X1200_R60_VSP,
808 {2592, 1920, 1920, 672, 2056, 200, 1245, 1200, 1200, 45, 1203, 6} } 798 {2592, 1920, 1920, 672, 2056, 200, 1245, 1200, 1200, 45, 1203, 6} }
809}; 799};
810 800
811/* 1920x1200 (CVT with Reduce Blanking) */ 801/* 1920x1200 (CVT with Reduce Blanking) */
812static struct crt_mode_table CRTM1920x1200_RB[] = { 802static struct crt_mode_table CRTM1920x1200_RB[] = {
813 /* r_rate, vclk, hsp, vsp */ 803 /* r_rate, hsp, vsp */
814 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ 804 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
815 {REFRESH_60, CLK_153_920M, M1920X1200_RB_R60_HSP, 805 {REFRESH_60, M1920X1200_RB_R60_HSP, M1920X1200_RB_R60_VSP,
816 M1920X1200_RB_R60_VSP,
817 {2080, 1920, 1920, 160, 1968, 32, 1235, 1200, 1200, 35, 1203, 6} } 806 {2080, 1920, 1920, 160, 1968, 32, 1235, 1200, 1200, 35, 1203, 6} }
818}; 807};
819 808
820/* 2048x1536 (CVT) */ 809/* 2048x1536 (CVT) */
821static struct crt_mode_table CRTM2048x1536[] = { 810static struct crt_mode_table CRTM2048x1536[] = {
822 /* r_rate, vclk, hsp, vsp */ 811 /* r_rate, hsp, vsp */
823 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ 812 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
824 {REFRESH_60, CLK_267_250M, M2048x1536_R60_HSP, M2048x1536_R60_VSP, 813 {REFRESH_60, M2048x1536_R60_HSP, M2048x1536_R60_VSP,
825 {2800, 2048, 2048, 752, 2200, 224, 1592, 1536, 1536, 56, 1539, 4} } 814 {2800, 2048, 2048, 752, 2200, 224, 1592, 1536, 1536, 56, 1539, 4} }
826}; 815};
827 816
@@ -974,14 +963,12 @@ static struct VideoModeTable viafb_rb_modes[] = {
974}; 963};
975 964
976struct crt_mode_table CEAM1280x720[] = { 965struct crt_mode_table CEAM1280x720[] = {
977 {REFRESH_60, CLK_74_270M, M1280X720_CEA_R60_HSP, 966 {REFRESH_60, M1280X720_CEA_R60_HSP, M1280X720_CEA_R60_VSP,
978 M1280X720_CEA_R60_VSP,
979 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ 967 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
980 {1650, 1280, 1280, 370, 1390, 40, 750, 720, 720, 30, 725, 5} } 968 {1650, 1280, 1280, 370, 1390, 40, 750, 720, 720, 30, 725, 5} }
981}; 969};
982struct crt_mode_table CEAM1920x1080[] = { 970struct crt_mode_table CEAM1920x1080[] = {
983 {REFRESH_60, CLK_148_500M, M1920X1080_CEA_R60_HSP, 971 {REFRESH_60, M1920X1080_CEA_R60_HSP, M1920X1080_CEA_R60_VSP,
984 M1920X1080_CEA_R60_VSP,
985 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */ 972 /* HT, HA, HBS, HBE, HSS, HSE, VT, VA, VBS, VBE, VSS, VSE */
986 {2200, 1920, 1920, 300, 2008, 44, 1125, 1080, 1080, 45, 1084, 5} } 973 {2200, 1920, 1920, 300, 2008, 44, 1125, 1080, 1080, 45, 1084, 5} }
987}; 974};