aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2010-06-02 15:41:23 -0400
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>2010-07-23 10:35:50 -0400
commitcc3fd679a344468e892a109b8de3e2948ce14e0f (patch)
treedf07323f350c4d90c81e7e2f0584d23c20e2e347 /drivers
parentad0676cf81c240e3857dc090c9ce0dde7537ac93 (diff)
viafb: simplify lcd size "detection"
viafb: simplify lcd size "detection" Remove all occurences of get_lcd_size_method as only the values GET_LCD_SIZE_BY_VGA_BIOS and GET_LCD_SIZE_BY_USER_SETTING were used which had the identical code so there is no need to make things look more complicated than they actually are. Just a bit of of cleanup, really no regressions expected. 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/chip.h1
-rw-r--r--drivers/video/via/hw.c9
-rw-r--r--drivers/video/via/lcd.c27
-rw-r--r--drivers/video/via/lcd.h5
4 files changed, 1 insertions, 41 deletions
diff --git a/drivers/video/via/chip.h b/drivers/video/via/chip.h
index d9b6e06e0700..ef1f3de2e052 100644
--- a/drivers/video/via/chip.h
+++ b/drivers/video/via/chip.h
@@ -160,7 +160,6 @@ struct lvds_setting_information {
160 int v_active; 160 int v_active;
161 int bpp; 161 int bpp;
162 int refresh_rate; 162 int refresh_rate;
163 int get_lcd_size_method;
164 int lcd_panel_id; 163 int lcd_panel_id;
165 int lcd_panel_hres; 164 int lcd_panel_hres;
166 int lcd_panel_vres; 165 int lcd_panel_vres;
diff --git a/drivers/video/via/hw.c b/drivers/video/via/hw.c
index b996803ae2c1..05be8c13765e 100644
--- a/drivers/video/via/hw.c
+++ b/drivers/video/via/hw.c
@@ -1791,8 +1791,6 @@ void viafb_init_chip_info(int chip_type)
1791 viafb_set_iga_path(); 1791 viafb_set_iga_path();
1792 1792
1793 viaparinfo->lvds_setting_info->display_method = viafb_lcd_dsp_method; 1793 viaparinfo->lvds_setting_info->display_method = viafb_lcd_dsp_method;
1794 viaparinfo->lvds_setting_info->get_lcd_size_method =
1795 GET_LCD_SIZE_BY_USER_SETTING;
1796 viaparinfo->lvds_setting_info->lcd_mode = viafb_lcd_mode; 1794 viaparinfo->lvds_setting_info->lcd_mode = viafb_lcd_mode;
1797 viaparinfo->lvds_setting_info2->display_method = 1795 viaparinfo->lvds_setting_info2->display_method =
1798 viaparinfo->lvds_setting_info->display_method; 1796 viaparinfo->lvds_setting_info->display_method;
@@ -1946,13 +1944,6 @@ static void init_tmds_chip_info(void)
1946 1944
1947static void init_lvds_chip_info(void) 1945static void init_lvds_chip_info(void)
1948{ 1946{
1949 if (viafb_lcd_panel_id > LCD_PANEL_ID_MAXIMUM)
1950 viaparinfo->lvds_setting_info->get_lcd_size_method =
1951 GET_LCD_SIZE_BY_VGA_BIOS;
1952 else
1953 viaparinfo->lvds_setting_info->get_lcd_size_method =
1954 GET_LCD_SIZE_BY_USER_SETTING;
1955
1956 viafb_lvds_trasmitter_identify(); 1947 viafb_lvds_trasmitter_identify();
1957 viafb_init_lcd_size(); 1948 viafb_init_lcd_size();
1958 viafb_init_lvds_output_interface(&viaparinfo->chip_info->lvds_chip_info, 1949 viafb_init_lvds_output_interface(&viaparinfo->chip_info->lvds_chip_info,
diff --git a/drivers/video/via/lcd.c b/drivers/video/via/lcd.c
index 568d15b91f0c..fc25ae30c5f6 100644
--- a/drivers/video/via/lcd.c
+++ b/drivers/video/via/lcd.c
@@ -87,33 +87,8 @@ static int check_lvds_chip(int device_id_subaddr, int device_id)
87void viafb_init_lcd_size(void) 87void viafb_init_lcd_size(void)
88{ 88{
89 DEBUG_MSG(KERN_INFO "viafb_init_lcd_size()\n"); 89 DEBUG_MSG(KERN_INFO "viafb_init_lcd_size()\n");
90 DEBUG_MSG(KERN_INFO
91 "viaparinfo->lvds_setting_info->get_lcd_size_method %d\n",
92 viaparinfo->lvds_setting_info->get_lcd_size_method);
93 90
94 switch (viaparinfo->lvds_setting_info->get_lcd_size_method) { 91 fp_id_to_vindex(viafb_lcd_panel_id);
95 case GET_LCD_SIZE_BY_SYSTEM_BIOS:
96 break;
97 case GET_LCD_SZIE_BY_HW_STRAPPING:
98 break;
99 case GET_LCD_SIZE_BY_VGA_BIOS:
100 DEBUG_MSG(KERN_INFO "Get LCD Size method by VGA BIOS !!\n");
101 fp_id_to_vindex(viafb_lcd_panel_id);
102 DEBUG_MSG(KERN_INFO "LCD Panel_ID = %d\n",
103 viaparinfo->lvds_setting_info->lcd_panel_id);
104 break;
105 case GET_LCD_SIZE_BY_USER_SETTING:
106 DEBUG_MSG(KERN_INFO "Get LCD Size method by user setting !!\n");
107 fp_id_to_vindex(viafb_lcd_panel_id);
108 DEBUG_MSG(KERN_INFO "LCD Panel_ID = %d\n",
109 viaparinfo->lvds_setting_info->lcd_panel_id);
110 break;
111 default:
112 DEBUG_MSG(KERN_INFO "viafb_init_lcd_size fail\n");
113 viaparinfo->lvds_setting_info->lcd_panel_id =
114 LCD_PANEL_ID1_800X600;
115 fp_id_to_vindex(LCD_PANEL_ID1_800X600);
116 }
117 viaparinfo->lvds_setting_info2->lcd_panel_id = 92 viaparinfo->lvds_setting_info2->lcd_panel_id =
118 viaparinfo->lvds_setting_info->lcd_panel_id; 93 viaparinfo->lvds_setting_info->lcd_panel_id;
119 viaparinfo->lvds_setting_info2->lcd_panel_hres = 94 viaparinfo->lvds_setting_info2->lcd_panel_hres =
diff --git a/drivers/video/via/lcd.h b/drivers/video/via/lcd.h
index 9762ec62b495..b348efc360b8 100644
--- a/drivers/video/via/lcd.h
+++ b/drivers/video/via/lcd.h
@@ -28,11 +28,6 @@
28#define VT3271_DEVICE_ID_REG 0x02 28#define VT3271_DEVICE_ID_REG 0x02
29#define VT3271_DEVICE_ID 0x71 29#define VT3271_DEVICE_ID 0x71
30 30
31#define GET_LCD_SIZE_BY_SYSTEM_BIOS 0x01
32#define GET_LCD_SIZE_BY_VGA_BIOS 0x02
33#define GET_LCD_SZIE_BY_HW_STRAPPING 0x03
34#define GET_LCD_SIZE_BY_USER_SETTING 0x04
35
36/* Definition DVI Panel ID*/ 31/* Definition DVI Panel ID*/
37/* Resolution: 640x480, Channel: single, Dithering: Enable */ 32/* Resolution: 640x480, Channel: single, Dithering: Enable */
38#define LCD_PANEL_ID0_640X480 0x00 33#define LCD_PANEL_ID0_640X480 0x00