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: default avatarFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Joseph Chan <JosephChan@via.com.tw>
parent ad0676cf
...@@ -160,7 +160,6 @@ struct lvds_setting_information { ...@@ -160,7 +160,6 @@ struct lvds_setting_information {
int v_active; int v_active;
int bpp; int bpp;
int refresh_rate; int refresh_rate;
int get_lcd_size_method;
int lcd_panel_id; int lcd_panel_id;
int lcd_panel_hres; int lcd_panel_hres;
int lcd_panel_vres; int lcd_panel_vres;
......
...@@ -1791,8 +1791,6 @@ void viafb_init_chip_info(int chip_type) ...@@ -1791,8 +1791,6 @@ void viafb_init_chip_info(int chip_type)
viafb_set_iga_path(); viafb_set_iga_path();
viaparinfo->lvds_setting_info->display_method = viafb_lcd_dsp_method; viaparinfo->lvds_setting_info->display_method = viafb_lcd_dsp_method;
viaparinfo->lvds_setting_info->get_lcd_size_method =
GET_LCD_SIZE_BY_USER_SETTING;
viaparinfo->lvds_setting_info->lcd_mode = viafb_lcd_mode; viaparinfo->lvds_setting_info->lcd_mode = viafb_lcd_mode;
viaparinfo->lvds_setting_info2->display_method = viaparinfo->lvds_setting_info2->display_method =
viaparinfo->lvds_setting_info->display_method; viaparinfo->lvds_setting_info->display_method;
...@@ -1946,13 +1944,6 @@ static void init_tmds_chip_info(void) ...@@ -1946,13 +1944,6 @@ static void init_tmds_chip_info(void)
static void init_lvds_chip_info(void) static void init_lvds_chip_info(void)
{ {
if (viafb_lcd_panel_id > LCD_PANEL_ID_MAXIMUM)
viaparinfo->lvds_setting_info->get_lcd_size_method =
GET_LCD_SIZE_BY_VGA_BIOS;
else
viaparinfo->lvds_setting_info->get_lcd_size_method =
GET_LCD_SIZE_BY_USER_SETTING;
viafb_lvds_trasmitter_identify(); viafb_lvds_trasmitter_identify();
viafb_init_lcd_size(); viafb_init_lcd_size();
viafb_init_lvds_output_interface(&viaparinfo->chip_info->lvds_chip_info, viafb_init_lvds_output_interface(&viaparinfo->chip_info->lvds_chip_info,
......
...@@ -87,33 +87,8 @@ static int check_lvds_chip(int device_id_subaddr, int device_id) ...@@ -87,33 +87,8 @@ static int check_lvds_chip(int device_id_subaddr, int device_id)
void viafb_init_lcd_size(void) void viafb_init_lcd_size(void)
{ {
DEBUG_MSG(KERN_INFO "viafb_init_lcd_size()\n"); DEBUG_MSG(KERN_INFO "viafb_init_lcd_size()\n");
DEBUG_MSG(KERN_INFO
"viaparinfo->lvds_setting_info->get_lcd_size_method %d\n",
viaparinfo->lvds_setting_info->get_lcd_size_method);
switch (viaparinfo->lvds_setting_info->get_lcd_size_method) {
case GET_LCD_SIZE_BY_SYSTEM_BIOS:
break;
case GET_LCD_SZIE_BY_HW_STRAPPING:
break;
case GET_LCD_SIZE_BY_VGA_BIOS:
DEBUG_MSG(KERN_INFO "Get LCD Size method by VGA BIOS !!\n");
fp_id_to_vindex(viafb_lcd_panel_id);
DEBUG_MSG(KERN_INFO "LCD Panel_ID = %d\n",
viaparinfo->lvds_setting_info->lcd_panel_id);
break;
case GET_LCD_SIZE_BY_USER_SETTING:
DEBUG_MSG(KERN_INFO "Get LCD Size method by user setting !!\n");
fp_id_to_vindex(viafb_lcd_panel_id); fp_id_to_vindex(viafb_lcd_panel_id);
DEBUG_MSG(KERN_INFO "LCD Panel_ID = %d\n",
viaparinfo->lvds_setting_info->lcd_panel_id);
break;
default:
DEBUG_MSG(KERN_INFO "viafb_init_lcd_size fail\n");
viaparinfo->lvds_setting_info->lcd_panel_id =
LCD_PANEL_ID1_800X600;
fp_id_to_vindex(LCD_PANEL_ID1_800X600);
}
viaparinfo->lvds_setting_info2->lcd_panel_id = viaparinfo->lvds_setting_info2->lcd_panel_id =
viaparinfo->lvds_setting_info->lcd_panel_id; viaparinfo->lvds_setting_info->lcd_panel_id;
viaparinfo->lvds_setting_info2->lcd_panel_hres = viaparinfo->lvds_setting_info2->lcd_panel_hres =
......
...@@ -28,11 +28,6 @@ ...@@ -28,11 +28,6 @@
#define VT3271_DEVICE_ID_REG 0x02 #define VT3271_DEVICE_ID_REG 0x02
#define VT3271_DEVICE_ID 0x71 #define VT3271_DEVICE_ID 0x71
#define GET_LCD_SIZE_BY_SYSTEM_BIOS 0x01
#define GET_LCD_SIZE_BY_VGA_BIOS 0x02
#define GET_LCD_SZIE_BY_HW_STRAPPING 0x03
#define GET_LCD_SIZE_BY_USER_SETTING 0x04
/* Definition DVI Panel ID*/ /* Definition DVI Panel ID*/
/* Resolution: 640x480, Channel: single, Dithering: Enable */ /* Resolution: 640x480, Channel: single, Dithering: Enable */
#define LCD_PANEL_ID0_640X480 0x00 #define LCD_PANEL_ID0_640X480 0x00
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment