viafb: simplify lcd size "detection"
authorFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
Wed, 2 Jun 2010 19:41:23 +0000 (19:41 +0000)
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
Fri, 23 Jul 2010 14:35:50 +0000 (14:35 +0000)
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>
drivers/video/via/chip.h
drivers/video/via/hw.c
drivers/video/via/lcd.c
drivers/video/via/lcd.h

index d9b6e06..ef1f3de 100644 (file)
@@ -160,7 +160,6 @@ struct lvds_setting_information {
        int v_active;
        int bpp;
        int refresh_rate;
-       int get_lcd_size_method;
        int lcd_panel_id;
        int lcd_panel_hres;
        int lcd_panel_vres;
index b996803..05be8c1 100644 (file)
@@ -1791,8 +1791,6 @@ void viafb_init_chip_info(int chip_type)
        viafb_set_iga_path();
 
        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_info2->display_method =
                viaparinfo->lvds_setting_info->display_method;
@@ -1946,13 +1944,6 @@ static void init_tmds_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_init_lcd_size();
        viafb_init_lvds_output_interface(&viaparinfo->chip_info->lvds_chip_info,
index 568d15b..fc25ae3 100644 (file)
@@ -87,33 +87,8 @@ static int check_lvds_chip(int device_id_subaddr, int device_id)
 void viafb_init_lcd_size(void)
 {
        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);
-               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);
-       }
+       fp_id_to_vindex(viafb_lcd_panel_id);
        viaparinfo->lvds_setting_info2->lcd_panel_id =
                viaparinfo->lvds_setting_info->lcd_panel_id;
        viaparinfo->lvds_setting_info2->lcd_panel_hres =
index 9762ec6..b348efc 100644 (file)
 #define     VT3271_DEVICE_ID_REG        0x02
 #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*/
 /* Resolution: 640x480,   Channel: single, Dithering: Enable */
 #define     LCD_PANEL_ID0_640X480       0x00