summaryrefslogtreecommitdiffstats
path: root/drivers/video/via/lcd.c
diff options
context:
space:
mode:
authorFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2011-08-07 13:08:45 +0000
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2011-08-07 13:08:45 +0000
commitbfe7d5f9396d5f2607454fd9ff89397fa3ba9a32 (patch)
tree3a50238daff730fc71d0fbc7ecc321e2b235ea23 /drivers/video/via/lcd.c
parent4fbf4bfe6fb5460bfd4a18ca7c7f21ffec941b07 (diff)
downloadlinux-bfe7d5f9396d5f2607454fd9ff89397fa3ba9a32.tar.bz2
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
}
/* LCD Set Mode */
-void viafb_lcd_set_mode(struct crt_mode_table *mode_crt_table,
- struct lvds_setting_information *plvds_setting_info,
- struct lvds_chip_information *plvds_chip_info)
+void viafb_lcd_set_mode(struct lvds_setting_information *plvds_setting_info,
+ struct lvds_chip_information *plvds_chip_info)
{
int set_iga = plvds_setting_info->iga_path;
int mode_bpp = plvds_setting_info->bpp;
@@ -560,15 +559,14 @@ void viafb_lcd_set_mode(struct crt_mode_table *mode_crt_table,
int panel_vres = plvds_setting_info->lcd_panel_vres;
u32 clock;
struct display_timing mode_crt_reg, panel_crt_reg, timing;
- struct crt_mode_table *panel_crt_table = NULL;
- struct VideoModeTable *vmode_tbl = viafb_get_mode(panel_hres,
- panel_vres);
+ struct crt_mode_table *mode_crt_table, *panel_crt_table;
DEBUG_MSG(KERN_INFO "viafb_lcd_set_mode!!\n");
/* Get mode table */
+ mode_crt_table = viafb_get_best_mode(set_hres, set_vres, 60);
mode_crt_reg = mode_crt_table->crtc;
/* Get panel table Pointer */
- panel_crt_table = vmode_tbl->crtc;
+ panel_crt_table = viafb_get_best_mode(panel_hres, panel_vres, 60);
panel_crt_reg = panel_crt_table->crtc;
DEBUG_MSG(KERN_INFO "bellow viafb_lcd_set_mode!!\n");
if (VT1636_LVDS == plvds_chip_info->lvds_chip_name)