aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/via/lcd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/via/lcd.c')
-rw-r--r--drivers/video/via/lcd.c8
1 files changed, 5 insertions, 3 deletions
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);