diff options
author | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2011-03-16 12:31:32 -0400 |
---|---|---|
committer | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2011-03-16 17:42:00 -0400 |
commit | 726abbc7957a2feeaf6f5e3d72579b3fd0211134 (patch) | |
tree | 04eab2f66ab63a8aae8051ccd34aaa433a8e41a9 /drivers/video/via/hw.c | |
parent | 2563afa9ec6970f3545906382cc986ee012f60ec (diff) |
viafb: refresh rate bug collection
This patch fixes multiple issues with the handling of refresh rates
especially for multi-display setups. If you experienced problems
with wrong refresh rates this patch might fix them.
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Diffstat (limited to 'drivers/video/via/hw.c')
-rw-r--r-- | drivers/video/via/hw.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/video/via/hw.c b/drivers/video/via/hw.c index 5728fd76bc11..dc4c778877ce 100644 --- a/drivers/video/via/hw.c +++ b/drivers/video/via/hw.c | |||
@@ -2002,13 +2002,15 @@ void viafb_fill_crtc_timing(struct crt_mode_table *crt_table, | |||
2002 | int i; | 2002 | int i; |
2003 | int index = 0; | 2003 | int index = 0; |
2004 | int h_addr, v_addr; | 2004 | int h_addr, v_addr; |
2005 | u32 pll_D_N, clock; | 2005 | u32 pll_D_N, clock, refresh = viafb_refresh; |
2006 | |||
2007 | if (viafb_SAMM_ON && set_iga == IGA2) | ||
2008 | refresh = viafb_refresh1; | ||
2006 | 2009 | ||
2007 | for (i = 0; i < video_mode->mode_array; i++) { | 2010 | for (i = 0; i < video_mode->mode_array; i++) { |
2008 | index = i; | 2011 | index = i; |
2009 | 2012 | ||
2010 | if (crt_table[i].refresh_rate == viaparinfo-> | 2013 | if (crt_table[i].refresh_rate == refresh) |
2011 | crt_setting_info->refresh_rate) | ||
2012 | break; | 2014 | break; |
2013 | } | 2015 | } |
2014 | 2016 | ||
@@ -2019,7 +2021,7 @@ void viafb_fill_crtc_timing(struct crt_mode_table *crt_table, | |||
2019 | if ((viafb_LCD_ON | viafb_DVI_ON) | 2021 | if ((viafb_LCD_ON | viafb_DVI_ON) |
2020 | && video_mode->crtc[0].crtc.hor_addr == 640 | 2022 | && video_mode->crtc[0].crtc.hor_addr == 640 |
2021 | && video_mode->crtc[0].crtc.ver_addr == 480 | 2023 | && video_mode->crtc[0].crtc.ver_addr == 480 |
2022 | && viaparinfo->crt_setting_info->refresh_rate == 60) { | 2024 | && refresh == 60) { |
2023 | /* The border is 8 pixels. */ | 2025 | /* The border is 8 pixels. */ |
2024 | crt_reg.hor_blank_start = crt_reg.hor_blank_start - 8; | 2026 | crt_reg.hor_blank_start = crt_reg.hor_blank_start - 8; |
2025 | 2027 | ||
@@ -2070,7 +2072,6 @@ void __devinit viafb_init_chip_info(int chip_type) | |||
2070 | init_lvds_chip_info(); | 2072 | init_lvds_chip_info(); |
2071 | 2073 | ||
2072 | viaparinfo->crt_setting_info->iga_path = IGA1; | 2074 | viaparinfo->crt_setting_info->iga_path = IGA1; |
2073 | viaparinfo->crt_setting_info->refresh_rate = viafb_refresh; | ||
2074 | 2075 | ||
2075 | /*Set IGA path for each device */ | 2076 | /*Set IGA path for each device */ |
2076 | viafb_set_iga_path(); | 2077 | viafb_set_iga_path(); |
@@ -2083,13 +2084,9 @@ void __devinit viafb_init_chip_info(int chip_type) | |||
2083 | viaparinfo->lvds_setting_info->lcd_mode; | 2084 | viaparinfo->lvds_setting_info->lcd_mode; |
2084 | } | 2085 | } |
2085 | 2086 | ||
2086 | void viafb_update_device_setting(int hres, int vres, | 2087 | void viafb_update_device_setting(int hres, int vres, int bpp, int flag) |
2087 | int bpp, int vmode_refresh, int flag) | ||
2088 | { | 2088 | { |
2089 | if (flag == 0) { | 2089 | if (flag == 0) { |
2090 | viaparinfo->crt_setting_info->refresh_rate = | ||
2091 | vmode_refresh; | ||
2092 | |||
2093 | viaparinfo->tmds_setting_info->h_active = hres; | 2090 | viaparinfo->tmds_setting_info->h_active = hres; |
2094 | viaparinfo->tmds_setting_info->v_active = vres; | 2091 | viaparinfo->tmds_setting_info->v_active = vres; |
2095 | 2092 | ||