aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/video/via/hw.c20
-rw-r--r--drivers/video/via/lcd.c12
-rw-r--r--drivers/video/via/lcd.h5
3 files changed, 15 insertions, 22 deletions
diff --git a/drivers/video/via/hw.c b/drivers/video/via/hw.c
index 76fad92600f0..30668bd17875 100644
--- a/drivers/video/via/hw.c
+++ b/drivers/video/via/hw.c
@@ -1937,9 +1937,8 @@ int viafb_setmode(struct VideoModeTable *vmode_tbl, int video_bpp,
1937 if (viafb_SAMM_ON && 1937 if (viafb_SAMM_ON &&
1938 (viaparinfo->lvds_setting_info->iga_path == IGA2)) { 1938 (viaparinfo->lvds_setting_info->iga_path == IGA2)) {
1939 viaparinfo->lvds_setting_info->bpp = video_bpp1; 1939 viaparinfo->lvds_setting_info->bpp = video_bpp1;
1940 viafb_lcd_set_mode(crt_timing1, viaparinfo-> 1940 viafb_lcd_set_mode(viaparinfo->lvds_setting_info,
1941 lvds_setting_info, 1941 &viaparinfo->chip_info->lvds_chip_info);
1942 &viaparinfo->chip_info->lvds_chip_info);
1943 } else { 1942 } else {
1944 /* IGA1 doesn't have LCD scaling, so set it center. */ 1943 /* IGA1 doesn't have LCD scaling, so set it center. */
1945 if (viaparinfo->lvds_setting_info->iga_path == IGA1) { 1944 if (viaparinfo->lvds_setting_info->iga_path == IGA1) {
@@ -1947,18 +1946,16 @@ int viafb_setmode(struct VideoModeTable *vmode_tbl, int video_bpp,
1947 LCD_CENTERING; 1946 LCD_CENTERING;
1948 } 1947 }
1949 viaparinfo->lvds_setting_info->bpp = video_bpp; 1948 viaparinfo->lvds_setting_info->bpp = video_bpp;
1950 viafb_lcd_set_mode(crt_timing, viaparinfo-> 1949 viafb_lcd_set_mode(viaparinfo->lvds_setting_info,
1951 lvds_setting_info, 1950 &viaparinfo->chip_info->lvds_chip_info);
1952 &viaparinfo->chip_info->lvds_chip_info);
1953 } 1951 }
1954 } 1952 }
1955 if (viafb_LCD2_ON) { 1953 if (viafb_LCD2_ON) {
1956 if (viafb_SAMM_ON && 1954 if (viafb_SAMM_ON &&
1957 (viaparinfo->lvds_setting_info2->iga_path == IGA2)) { 1955 (viaparinfo->lvds_setting_info2->iga_path == IGA2)) {
1958 viaparinfo->lvds_setting_info2->bpp = video_bpp1; 1956 viaparinfo->lvds_setting_info2->bpp = video_bpp1;
1959 viafb_lcd_set_mode(crt_timing1, viaparinfo-> 1957 viafb_lcd_set_mode(viaparinfo->lvds_setting_info2,
1960 lvds_setting_info2, 1958 &viaparinfo->chip_info->lvds_chip_info2);
1961 &viaparinfo->chip_info->lvds_chip_info2);
1962 } else { 1959 } else {
1963 /* IGA1 doesn't have LCD scaling, so set it center. */ 1960 /* IGA1 doesn't have LCD scaling, so set it center. */
1964 if (viaparinfo->lvds_setting_info2->iga_path == IGA1) { 1961 if (viaparinfo->lvds_setting_info2->iga_path == IGA1) {
@@ -1966,9 +1963,8 @@ int viafb_setmode(struct VideoModeTable *vmode_tbl, int video_bpp,
1966 LCD_CENTERING; 1963 LCD_CENTERING;
1967 } 1964 }
1968 viaparinfo->lvds_setting_info2->bpp = video_bpp; 1965 viaparinfo->lvds_setting_info2->bpp = video_bpp;
1969 viafb_lcd_set_mode(crt_timing, viaparinfo-> 1966 viafb_lcd_set_mode(viaparinfo->lvds_setting_info2,
1970 lvds_setting_info2, 1967 &viaparinfo->chip_info->lvds_chip_info2);
1971 &viaparinfo->chip_info->lvds_chip_info2);
1972 } 1968 }
1973 } 1969 }
1974 1970
diff --git a/drivers/video/via/lcd.c b/drivers/video/via/lcd.c
index 0a38e4de9979..5f3b4e394e82 100644
--- a/drivers/video/via/lcd.c
+++ b/drivers/video/via/lcd.c
@@ -548,9 +548,8 @@ static void lcd_patch_skew(struct lvds_setting_information
548} 548}
549 549
550/* LCD Set Mode */ 550/* LCD Set Mode */
551void viafb_lcd_set_mode(struct crt_mode_table *mode_crt_table, 551void viafb_lcd_set_mode(struct lvds_setting_information *plvds_setting_info,
552 struct lvds_setting_information *plvds_setting_info, 552 struct lvds_chip_information *plvds_chip_info)
553 struct lvds_chip_information *plvds_chip_info)
554{ 553{
555 int set_iga = plvds_setting_info->iga_path; 554 int set_iga = plvds_setting_info->iga_path;
556 int mode_bpp = plvds_setting_info->bpp; 555 int mode_bpp = plvds_setting_info->bpp;
@@ -560,15 +559,14 @@ void viafb_lcd_set_mode(struct crt_mode_table *mode_crt_table,
560 int panel_vres = plvds_setting_info->lcd_panel_vres; 559 int panel_vres = plvds_setting_info->lcd_panel_vres;
561 u32 clock; 560 u32 clock;
562 struct display_timing mode_crt_reg, panel_crt_reg, timing; 561 struct display_timing mode_crt_reg, panel_crt_reg, timing;
563 struct crt_mode_table *panel_crt_table = NULL; 562 struct crt_mode_table *mode_crt_table, *panel_crt_table;
564 struct VideoModeTable *vmode_tbl = viafb_get_mode(panel_hres,
565 panel_vres);
566 563
567 DEBUG_MSG(KERN_INFO "viafb_lcd_set_mode!!\n"); 564 DEBUG_MSG(KERN_INFO "viafb_lcd_set_mode!!\n");
568 /* Get mode table */ 565 /* Get mode table */
566 mode_crt_table = viafb_get_best_mode(set_hres, set_vres, 60);
569 mode_crt_reg = mode_crt_table->crtc; 567 mode_crt_reg = mode_crt_table->crtc;
570 /* Get panel table Pointer */ 568 /* Get panel table Pointer */
571 panel_crt_table = vmode_tbl->crtc; 569 panel_crt_table = viafb_get_best_mode(panel_hres, panel_vres, 60);
572 panel_crt_reg = panel_crt_table->crtc; 570 panel_crt_reg = panel_crt_table->crtc;
573 DEBUG_MSG(KERN_INFO "bellow viafb_lcd_set_mode!!\n"); 571 DEBUG_MSG(KERN_INFO "bellow viafb_lcd_set_mode!!\n");
574 if (VT1636_LVDS == plvds_chip_info->lvds_chip_name) 572 if (VT1636_LVDS == plvds_chip_info->lvds_chip_name)
diff --git a/drivers/video/via/lcd.h b/drivers/video/via/lcd.h
index 3b9e5397aa69..77ca7b862e68 100644
--- a/drivers/video/via/lcd.h
+++ b/drivers/video/via/lcd.h
@@ -76,9 +76,8 @@ void __devinit viafb_init_lvds_output_interface(struct lvds_chip_information
76 *plvds_chip_info, 76 *plvds_chip_info,
77 struct lvds_setting_information 77 struct lvds_setting_information
78 *plvds_setting_info); 78 *plvds_setting_info);
79void viafb_lcd_set_mode(struct crt_mode_table *mode_crt_table, 79void viafb_lcd_set_mode(struct lvds_setting_information *plvds_setting_info,
80 struct lvds_setting_information *plvds_setting_info, 80 struct lvds_chip_information *plvds_chip_info);
81 struct lvds_chip_information *plvds_chip_info);
82bool __devinit viafb_lvds_trasmitter_identify(void); 81bool __devinit viafb_lvds_trasmitter_identify(void);
83void viafb_init_lvds_output_interface(struct lvds_chip_information 82void viafb_init_lvds_output_interface(struct lvds_chip_information
84 *plvds_chip_info, 83 *plvds_chip_info,