aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/video/via/lcd.c40
1 files changed, 14 insertions, 26 deletions
diff --git a/drivers/video/via/lcd.c b/drivers/video/via/lcd.c
index e3e597f937a5..09353e2b92f6 100644
--- a/drivers/video/via/lcd.c
+++ b/drivers/video/via/lcd.c
@@ -1134,45 +1134,33 @@ static void integrated_lvds_enable(struct lvds_setting_information
1134 *plvds_setting_info, 1134 *plvds_setting_info,
1135 struct lvds_chip_information *plvds_chip_info) 1135 struct lvds_chip_information *plvds_chip_info)
1136{ 1136{
1137 bool turn_on_first_powersequence = false;
1138 bool turn_on_second_powersequence = false;
1139
1140 DEBUG_MSG(KERN_INFO "integrated_lvds_enable, out_interface:%d\n", 1137 DEBUG_MSG(KERN_INFO "integrated_lvds_enable, out_interface:%d\n",
1141 plvds_chip_info->output_interface); 1138 plvds_chip_info->output_interface);
1142 if (plvds_setting_info->lcd_mode == LCD_SPWG) 1139 if (plvds_setting_info->lcd_mode == LCD_SPWG)
1143 viafb_write_reg_mask(CRD2, VIACR, 0x00, BIT0 + BIT1); 1140 viafb_write_reg_mask(CRD2, VIACR, 0x00, BIT0 + BIT1);
1144 else 1141 else
1145 viafb_write_reg_mask(CRD2, VIACR, 0x03, BIT0 + BIT1); 1142 viafb_write_reg_mask(CRD2, VIACR, 0x03, BIT0 + BIT1);
1146 if (INTERFACE_LVDS0LVDS1 == plvds_chip_info->output_interface)
1147 turn_on_first_powersequence = true;
1148 if (INTERFACE_LVDS0 == plvds_chip_info->output_interface)
1149 turn_on_first_powersequence = true;
1150 if (INTERFACE_LVDS1 == plvds_chip_info->output_interface)
1151 turn_on_second_powersequence = true;
1152
1153 if (turn_on_second_powersequence) {
1154 /* Use second power sequence control: */
1155
1156 /* Use hardware control power sequence. */
1157 viafb_write_reg_mask(CRD3, VIACR, 0, BIT0);
1158
1159 /* Turn on back light. */
1160 viafb_write_reg_mask(CRD3, VIACR, 0, BIT6 + BIT7);
1161 1143
1162 /* Turn on hardware power sequence. */ 1144 switch (plvds_chip_info->output_interface) {
1163 viafb_write_reg_mask(CRD4, VIACR, 0x02, BIT1); 1145 case INTERFACE_LVDS0LVDS1:
1164 } 1146 case INTERFACE_LVDS0:
1165 if (turn_on_first_powersequence) {
1166 /* Use first power sequence control: */ 1147 /* Use first power sequence control: */
1167
1168 /* Use hardware control power sequence. */ 1148 /* Use hardware control power sequence. */
1169 viafb_write_reg_mask(CR91, VIACR, 0, BIT0); 1149 viafb_write_reg_mask(CR91, VIACR, 0, BIT0);
1170
1171 /* Turn on back light. */ 1150 /* Turn on back light. */
1172 viafb_write_reg_mask(CR91, VIACR, 0, BIT6 + BIT7); 1151 viafb_write_reg_mask(CR91, VIACR, 0, BIT6 + BIT7);
1173
1174 /* Turn on hardware power sequence. */ 1152 /* Turn on hardware power sequence. */
1175 viafb_write_reg_mask(CR6A, VIACR, 0x08, BIT3); 1153 viafb_write_reg_mask(CR6A, VIACR, 0x08, BIT3);
1154 break;
1155 case INTERFACE_LVDS1:
1156 /* Use second power sequence control: */
1157 /* Use hardware control power sequence. */
1158 viafb_write_reg_mask(CRD3, VIACR, 0, BIT0);
1159 /* Turn on back light. */
1160 viafb_write_reg_mask(CRD3, VIACR, 0, BIT6 + BIT7);
1161 /* Turn on hardware power sequence. */
1162 viafb_write_reg_mask(CRD4, VIACR, 0x02, BIT1);
1163 break;
1176 } 1164 }
1177 1165
1178 /* Turn DFP High/Low pad on. */ 1166 /* Turn DFP High/Low pad on. */