diff options
author | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2010-08-11 22:22:54 +0000 |
---|---|---|
committer | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2010-09-24 02:14:58 +0000 |
commit | cd7e9103e983ff0f518ac0e85cee265027ccbfa4 (patch) | |
tree | 3a87b00683aee3adc2c4670b0cb85a15b5d7dbb0 /drivers/video/via/lcd.c | |
parent | bc6848875152f3df860d0f54a2323cc7615527d9 (diff) | |
download | linux-cd7e9103e983ff0f518ac0e85cee265027ccbfa4.tar.bz2 |
viafb: merge the remaining output path with enable functions
This patch merges the remaining functionality of the output path
function in the associated enabling functions. This is very natural as
most of the remaining code does actually enable the device.
Just some more or less intelligent code merge. If no stupid mistakes
occured there should be no regressions.
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Joseph Chan <JosephChan@via.com.tw>
Diffstat (limited to 'drivers/video/via/lcd.c')
-rw-r--r-- | drivers/video/via/lcd.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/video/via/lcd.c b/drivers/video/via/lcd.c index c7de16430867..e99f933faf19 100644 --- a/drivers/video/via/lcd.c +++ b/drivers/video/via/lcd.c @@ -833,8 +833,36 @@ void viafb_lcd_disable(void) } +static void set_lcd_output_path(int set_iga, int output_interface) +{ + switch (output_interface) { + case INTERFACE_DFP: + if ((UNICHROME_K8M890 == viaparinfo->chip_info->gfx_chip_name) + || (UNICHROME_P4M890 == + viaparinfo->chip_info->gfx_chip_name)) + viafb_write_reg_mask(CR97, VIACR, 0x84, + BIT7 + BIT2 + BIT1 + BIT0); + case INTERFACE_DVP0: + case INTERFACE_DVP1: + case INTERFACE_DFP_HIGH: + case INTERFACE_DFP_LOW: + if (set_iga == IGA2) + viafb_write_reg(CR91, VIACR, 0x00); + break; + } +} + void viafb_lcd_enable(void) { + viafb_write_reg_mask(CR6B, VIACR, 0x00, BIT3); + viafb_write_reg_mask(CR6A, VIACR, 0x08, BIT3); + set_lcd_output_path(viaparinfo->lvds_setting_info->iga_path, + viaparinfo->chip_info->lvds_chip_info.output_interface); + if (viafb_LCD2_ON) + set_lcd_output_path(viaparinfo->lvds_setting_info2->iga_path, + viaparinfo->chip_info-> + lvds_chip_info2.output_interface); + if (viaparinfo->chip_info->gfx_chip_name == UNICHROME_CLE266) { /* DI1 pad on */ viafb_write_reg_mask(SR1E, VIASR, 0x30, 0x30); |