aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/via/lcd.c
diff options
context:
space:
mode:
authorFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2011-08-07 09:08:45 -0400
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2011-08-07 09:08:45 -0400
commitbfe7d5f9396d5f2607454fd9ff89397fa3ba9a32 (patch)
tree3a50238daff730fc71d0fbc7ecc321e2b235ea23 /drivers/video/via/lcd.c
parent4fbf4bfe6fb5460bfd4a18ca7c7f21ffec941b07 (diff)
viafb: eliminate modetable dependancy of LCD modesetting
This patch removes the need for knowing the modetable structure within the LCD modesetting function. The magic 60Hz refresh rate was already there as always the first entry for a resolution was choosen based on the ascending refresh rate ordering in the modetable. For all but one this is at least 60Hz, if only higher frequencies available we choose those like the code before did. The exception is OLPC but that resolution has only one frequency so we get the same behaviour there as well. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Diffstat (limited to 'drivers/video/via/lcd.c')
-rw-r--r--drivers/video/via/lcd.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/video/via/lcd.c b/drivers/video/via/lcd.c
index 0a38e4de9979..5f3b4e394e82 100644
--- a/drivers/video/via/lcd.c
+++ b/drivers/video/via/lcd.c
@@ -548,9 +548,8 @@ static void lcd_patch_skew(struct lvds_setting_information
548} 548}
549 549
550/* LCD Set Mode */ 550/* LCD Set Mode */
551void viafb_lcd_set_mode(struct crt_mode_table *mode_crt_table, 551void viafb_lcd_set_mode(struct lvds_setting_information *plvds_setting_info,
552 struct lvds_setting_information *plvds_setting_info, 552 struct lvds_chip_information *plvds_chip_info)
553 struct lvds_chip_information *plvds_chip_info)
554{ 553{
555 int set_iga = plvds_setting_info->iga_path; 554 int set_iga = plvds_setting_info->iga_path;
556 int mode_bpp = plvds_setting_info->bpp; 555 int mode_bpp = plvds_setting_info->bpp;
@@ -560,15 +559,14 @@ void viafb_lcd_set_mode(struct crt_mode_table *mode_crt_table,
560 int panel_vres = plvds_setting_info->lcd_panel_vres; 559 int panel_vres = plvds_setting_info->lcd_panel_vres;
561 u32 clock; 560 u32 clock;
562 struct display_timing mode_crt_reg, panel_crt_reg, timing; 561 struct display_timing mode_crt_reg, panel_crt_reg, timing;
563 struct crt_mode_table *panel_crt_table = NULL; 562 struct crt_mode_table *mode_crt_table, *panel_crt_table;
564 struct VideoModeTable *vmode_tbl = viafb_get_mode(panel_hres,
565 panel_vres);
566 563
567 DEBUG_MSG(KERN_INFO "viafb_lcd_set_mode!!\n"); 564 DEBUG_MSG(KERN_INFO "viafb_lcd_set_mode!!\n");
568 /* Get mode table */ 565 /* Get mode table */
566 mode_crt_table = viafb_get_best_mode(set_hres, set_vres, 60);
569 mode_crt_reg = mode_crt_table->crtc; 567 mode_crt_reg = mode_crt_table->crtc;
570 /* Get panel table Pointer */ 568 /* Get panel table Pointer */
571 panel_crt_table = vmode_tbl->crtc; 569 panel_crt_table = viafb_get_best_mode(panel_hres, panel_vres, 60);
572 panel_crt_reg = panel_crt_table->crtc; 570 panel_crt_reg = panel_crt_table->crtc;
573 DEBUG_MSG(KERN_INFO "bellow viafb_lcd_set_mode!!\n"); 571 DEBUG_MSG(KERN_INFO "bellow viafb_lcd_set_mode!!\n");
574 if (VT1636_LVDS == plvds_chip_info->lvds_chip_name) 572 if (VT1636_LVDS == plvds_chip_info->lvds_chip_name)