aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2010-05-22 17:32:32 -0400
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2010-07-23 10:17:58 -0400
commit119b953a80d28821a56567d84dab860b0edc7940 (patch)
treea3cbcc11459d6ae8dfb68700ed9b411dc0868fb3 /drivers
parent4a73d70ebe890fb71dcdd1cfcb788e1432ed0034 (diff)
viafb: improve lcd code readability
viafb: improve lcd code readability This changes the code to better reflect that we can (currently) only perform upscaling. Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Joseph Chan <JosephChan@via.com.tw>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/via/lcd.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/video/via/lcd.c b/drivers/video/via/lcd.c
index 438a106c7a4b..55cb4ecfad00 100644
--- a/drivers/video/via/lcd.c
+++ b/drivers/video/via/lcd.c
@@ -437,7 +437,7 @@ static void load_lcd_scaling(int set_hres, int set_vres, int panel_hres,
437 viafb_write_reg_mask(CR79, VIACR, 0x07, BIT0 + BIT1 + BIT2); 437 viafb_write_reg_mask(CR79, VIACR, 0x07, BIT0 + BIT1 + BIT2);
438 438
439 /* Check if expansion for horizontal */ 439 /* Check if expansion for horizontal */
440 if (set_hres != panel_hres) { 440 if (set_hres < panel_hres) {
441 /* Load Horizontal Scaling Factor */ 441 /* Load Horizontal Scaling Factor */
442 switch (viaparinfo->chip_info->gfx_chip_name) { 442 switch (viaparinfo->chip_info->gfx_chip_name) {
443 case UNICHROME_CLE266: 443 case UNICHROME_CLE266:
@@ -477,7 +477,7 @@ static void load_lcd_scaling(int set_hres, int set_vres, int panel_hres,
477 } 477 }
478 478
479 /* Check if expansion for vertical */ 479 /* Check if expansion for vertical */
480 if (set_vres != panel_vres) { 480 if (set_vres < panel_vres) {
481 /* Load Vertical Scaling Factor */ 481 /* Load Vertical Scaling Factor */
482 switch (viaparinfo->chip_info->gfx_chip_name) { 482 switch (viaparinfo->chip_info->gfx_chip_name) {
483 case UNICHROME_CLE266: 483 case UNICHROME_CLE266:
@@ -643,9 +643,8 @@ void viafb_lcd_set_mode(struct crt_mode_table *mode_crt_table,
643 (mode_crt_reg, panel_crt_reg), IGA1); 643 (mode_crt_reg, panel_crt_reg), IGA1);
644 } else { 644 } else {
645 /* Expansion */ 645 /* Expansion */
646 if ((plvds_setting_info->display_method == 646 if (plvds_setting_info->display_method == LCD_EXPANDSION
647 LCD_EXPANDSION) & ((set_hres != panel_hres) 647 && (set_hres < panel_hres || set_vres < panel_vres)) {
648 || (set_vres != panel_vres))) {
649 /* expansion timing IGA2 loaded panel set timing*/ 648 /* expansion timing IGA2 loaded panel set timing*/
650 viafb_load_crtc_timing(panel_crt_reg, IGA2); 649 viafb_load_crtc_timing(panel_crt_reg, IGA2);
651 DEBUG_MSG(KERN_INFO "viafb_load_crtc_timing!!\n"); 650 DEBUG_MSG(KERN_INFO "viafb_load_crtc_timing!!\n");