diff options
author | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2010-08-07 22:14:59 -0400 |
---|---|---|
committer | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2010-09-23 22:14:36 -0400 |
commit | 414d3ce1b34384dd42e31536075583b9edb3cab6 (patch) | |
tree | db999b3da587eeb55cf15a27068d0a58b3f4293c /drivers/video | |
parent | 646aafa649abb5362e55176cc5ee9c14c3c463a1 (diff) |
viafb: unify output path configuration
Move all output path routing directly in the viafb_setmode. This
gives a better overview and allows to factor similar parts out.
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Joseph Chan <JosephChan@via.com.tw>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/via/dvi.c | 2 | ||||
-rw-r--r-- | drivers/video/via/hw.c | 19 | ||||
-rw-r--r-- | drivers/video/via/lcd.c | 3 |
3 files changed, 17 insertions, 7 deletions
diff --git a/drivers/video/via/dvi.c b/drivers/video/via/dvi.c index 39b040bb3817..92a2027593d3 100644 --- a/drivers/video/via/dvi.c +++ b/drivers/video/via/dvi.c | |||
@@ -208,8 +208,6 @@ void viafb_dvi_set_mode(struct VideoModeTable *mode, int mode_bpp, | |||
208 | } | 208 | } |
209 | } | 209 | } |
210 | viafb_fill_crtc_timing(pDviTiming, mode, mode_bpp / 8, set_iga); | 210 | viafb_fill_crtc_timing(pDviTiming, mode, mode_bpp / 8, set_iga); |
211 | viafb_set_output_path(DEVICE_DVI, set_iga, | ||
212 | viaparinfo->chip_info->tmds_chip_info.output_interface); | ||
213 | } | 211 | } |
214 | 212 | ||
215 | /* Sense DVI Connector */ | 213 | /* Sense DVI Connector */ |
diff --git a/drivers/video/via/hw.c b/drivers/video/via/hw.c index 63b672260479..a3db80417593 100644 --- a/drivers/video/via/hw.c +++ b/drivers/video/via/hw.c | |||
@@ -2377,8 +2377,6 @@ int viafb_setmode(struct VideoModeTable *vmode_tbl, int video_bpp, | |||
2377 | viaparinfo->crt_setting_info->iga_path); | 2377 | viaparinfo->crt_setting_info->iga_path); |
2378 | } | 2378 | } |
2379 | 2379 | ||
2380 | set_crt_output_path(viaparinfo->crt_setting_info->iga_path); | ||
2381 | |||
2382 | /* Patch if set_hres is not 8 alignment (1366) to viafb_setmode | 2380 | /* Patch if set_hres is not 8 alignment (1366) to viafb_setmode |
2383 | to 8 alignment (1368),there is several pixels (2 pixels) | 2381 | to 8 alignment (1368),there is several pixels (2 pixels) |
2384 | on right side of screen. */ | 2382 | on right side of screen. */ |
@@ -2388,6 +2386,9 @@ int viafb_setmode(struct VideoModeTable *vmode_tbl, int video_bpp, | |||
2388 | viafb_read_reg(VIACR, CR02) - 1); | 2386 | viafb_read_reg(VIACR, CR02) - 1); |
2389 | viafb_lock_crt(); | 2387 | viafb_lock_crt(); |
2390 | } | 2388 | } |
2389 | |||
2390 | viafb_set_output_path(DEVICE_CRT, | ||
2391 | viaparinfo->crt_setting_info->iga_path, 0); | ||
2391 | } | 2392 | } |
2392 | 2393 | ||
2393 | if (viafb_DVI_ON) { | 2394 | if (viafb_DVI_ON) { |
@@ -2407,6 +2408,10 @@ int viafb_setmode(struct VideoModeTable *vmode_tbl, int video_bpp, | |||
2407 | video_bpp, viaparinfo-> | 2408 | video_bpp, viaparinfo-> |
2408 | tmds_setting_info->iga_path); | 2409 | tmds_setting_info->iga_path); |
2409 | } | 2410 | } |
2411 | |||
2412 | viafb_set_output_path(DEVICE_DVI, | ||
2413 | viaparinfo->tmds_setting_info->iga_path, | ||
2414 | viaparinfo->chip_info->tmds_chip_info.output_interface); | ||
2410 | } | 2415 | } |
2411 | 2416 | ||
2412 | if (viafb_LCD_ON) { | 2417 | if (viafb_LCD_ON) { |
@@ -2427,6 +2432,11 @@ int viafb_setmode(struct VideoModeTable *vmode_tbl, int video_bpp, | |||
2427 | lvds_setting_info, | 2432 | lvds_setting_info, |
2428 | &viaparinfo->chip_info->lvds_chip_info); | 2433 | &viaparinfo->chip_info->lvds_chip_info); |
2429 | } | 2434 | } |
2435 | |||
2436 | viafb_set_output_path(DEVICE_LCD, | ||
2437 | viaparinfo->lvds_setting_info->iga_path, | ||
2438 | viaparinfo->chip_info-> | ||
2439 | lvds_chip_info.output_interface); | ||
2430 | } | 2440 | } |
2431 | if (viafb_LCD2_ON) { | 2441 | if (viafb_LCD2_ON) { |
2432 | if (viafb_SAMM_ON && | 2442 | if (viafb_SAMM_ON && |
@@ -2446,6 +2456,11 @@ int viafb_setmode(struct VideoModeTable *vmode_tbl, int video_bpp, | |||
2446 | lvds_setting_info2, | 2456 | lvds_setting_info2, |
2447 | &viaparinfo->chip_info->lvds_chip_info2); | 2457 | &viaparinfo->chip_info->lvds_chip_info2); |
2448 | } | 2458 | } |
2459 | |||
2460 | viafb_set_output_path(DEVICE_LCD, | ||
2461 | viaparinfo->lvds_setting_info2->iga_path, | ||
2462 | viaparinfo->chip_info-> | ||
2463 | lvds_chip_info2.output_interface); | ||
2449 | } | 2464 | } |
2450 | 2465 | ||
2451 | if ((viaparinfo->chip_info->gfx_chip_name == UNICHROME_CX700) | 2466 | if ((viaparinfo->chip_info->gfx_chip_name == UNICHROME_CX700) |
diff --git a/drivers/video/via/lcd.c b/drivers/video/via/lcd.c index bda124682dab..e48117e40102 100644 --- a/drivers/video/via/lcd.c +++ b/drivers/video/via/lcd.c | |||
@@ -661,9 +661,6 @@ void viafb_lcd_set_mode(struct crt_mode_table *mode_crt_table, | |||
661 | pll_D_N = viafb_get_clk_value(panel_crt_table[0].clk); | 661 | pll_D_N = viafb_get_clk_value(panel_crt_table[0].clk); |
662 | DEBUG_MSG(KERN_INFO "PLL=0x%x", pll_D_N); | 662 | DEBUG_MSG(KERN_INFO "PLL=0x%x", pll_D_N); |
663 | viafb_set_vclock(pll_D_N, set_iga); | 663 | viafb_set_vclock(pll_D_N, set_iga); |
664 | |||
665 | viafb_set_output_path(DEVICE_LCD, set_iga, | ||
666 | plvds_chip_info->output_interface); | ||
667 | lcd_patch_skew(plvds_setting_info, plvds_chip_info); | 664 | lcd_patch_skew(plvds_setting_info, plvds_chip_info); |
668 | 665 | ||
669 | /* If K8M800, enable LCD Prefetch Mode. */ | 666 | /* If K8M800, enable LCD Prefetch Mode. */ |