diff options
Diffstat (limited to 'drivers/video/via')
-rw-r--r-- | drivers/video/via/dvi.c | 24 | ||||
-rw-r--r-- | drivers/video/via/dvi.h | 4 | ||||
-rw-r--r-- | drivers/video/via/hw.c | 16 | ||||
-rw-r--r-- | drivers/video/via/hw.h | 4 | ||||
-rw-r--r-- | drivers/video/via/lcd.c | 10 | ||||
-rw-r--r-- | drivers/video/via/lcd.h | 6 | ||||
-rw-r--r-- | drivers/video/via/viafbdev.c | 8 |
7 files changed, 38 insertions, 34 deletions
diff --git a/drivers/video/via/dvi.c b/drivers/video/via/dvi.c index 92a2027593d3..ab6145da1a2f 100644 --- a/drivers/video/via/dvi.c +++ b/drivers/video/via/dvi.c | |||
@@ -25,10 +25,12 @@ | |||
25 | static void tmds_register_write(int index, u8 data); | 25 | static void tmds_register_write(int index, u8 data); |
26 | static int tmds_register_read(int index); | 26 | static int tmds_register_read(int index); |
27 | static int tmds_register_read_bytes(int index, u8 *buff, int buff_len); | 27 | static int tmds_register_read_bytes(int index, u8 *buff, int buff_len); |
28 | static void dvi_get_panel_size_from_DDCv1(struct tmds_chip_information | 28 | static void __devinit dvi_get_panel_size_from_DDCv1( |
29 | *tmds_chip, struct tmds_setting_information *tmds_setting); | 29 | struct tmds_chip_information *tmds_chip, |
30 | static void dvi_get_panel_size_from_DDCv2(struct tmds_chip_information | 30 | struct tmds_setting_information *tmds_setting); |
31 | *tmds_chip, struct tmds_setting_information *tmds_setting); | 31 | static void __devinit dvi_get_panel_size_from_DDCv2( |
32 | struct tmds_chip_information *tmds_chip, | ||
33 | struct tmds_setting_information *tmds_setting); | ||
32 | static int viafb_dvi_query_EDID(void); | 34 | static int viafb_dvi_query_EDID(void); |
33 | 35 | ||
34 | static int check_tmds_chip(int device_id_subaddr, int device_id) | 36 | static int check_tmds_chip(int device_id_subaddr, int device_id) |
@@ -39,7 +41,7 @@ static int check_tmds_chip(int device_id_subaddr, int device_id) | |||
39 | return FAIL; | 41 | return FAIL; |
40 | } | 42 | } |
41 | 43 | ||
42 | void viafb_init_dvi_size(struct tmds_chip_information *tmds_chip, | 44 | void __devinit viafb_init_dvi_size(struct tmds_chip_information *tmds_chip, |
43 | struct tmds_setting_information *tmds_setting) | 45 | struct tmds_setting_information *tmds_setting) |
44 | { | 46 | { |
45 | DEBUG_MSG(KERN_INFO "viafb_init_dvi_size()\n"); | 47 | DEBUG_MSG(KERN_INFO "viafb_init_dvi_size()\n"); |
@@ -60,7 +62,7 @@ void viafb_init_dvi_size(struct tmds_chip_information *tmds_chip, | |||
60 | return; | 62 | return; |
61 | } | 63 | } |
62 | 64 | ||
63 | int viafb_tmds_trasmitter_identify(void) | 65 | int __devinit viafb_tmds_trasmitter_identify(void) |
64 | { | 66 | { |
65 | unsigned char sr2a = 0, sr1e = 0, sr3e = 0; | 67 | unsigned char sr2a = 0, sr1e = 0, sr3e = 0; |
66 | 68 | ||
@@ -311,8 +313,9 @@ static int viafb_dvi_query_EDID(void) | |||
311 | } | 313 | } |
312 | 314 | ||
313 | /* Get Panel Size Using EDID1 Table */ | 315 | /* Get Panel Size Using EDID1 Table */ |
314 | static void dvi_get_panel_size_from_DDCv1(struct tmds_chip_information | 316 | static void __devinit dvi_get_panel_size_from_DDCv1( |
315 | *tmds_chip, struct tmds_setting_information *tmds_setting) | 317 | struct tmds_chip_information *tmds_chip, |
318 | struct tmds_setting_information *tmds_setting) | ||
316 | { | 319 | { |
317 | int i, max_h = 0, tmp, restore; | 320 | int i, max_h = 0, tmp, restore; |
318 | unsigned char rData; | 321 | unsigned char rData; |
@@ -416,8 +419,9 @@ static void dvi_get_panel_size_from_DDCv1(struct tmds_chip_information | |||
416 | } | 419 | } |
417 | 420 | ||
418 | /* Get Panel Size Using EDID2 Table */ | 421 | /* Get Panel Size Using EDID2 Table */ |
419 | static void dvi_get_panel_size_from_DDCv2(struct tmds_chip_information | 422 | static void __devinit dvi_get_panel_size_from_DDCv2( |
420 | *tmds_chip, struct tmds_setting_information *tmds_setting) | 423 | struct tmds_chip_information *tmds_chip, |
424 | struct tmds_setting_information *tmds_setting) | ||
421 | { | 425 | { |
422 | int restore; | 426 | int restore; |
423 | unsigned char R_Buffer[2]; | 427 | unsigned char R_Buffer[2]; |
diff --git a/drivers/video/via/dvi.h b/drivers/video/via/dvi.h index 0dffcfd395f3..2c525c0c1adb 100644 --- a/drivers/video/via/dvi.h +++ b/drivers/video/via/dvi.h | |||
@@ -56,8 +56,8 @@ | |||
56 | int viafb_dvi_sense(void); | 56 | int viafb_dvi_sense(void); |
57 | void viafb_dvi_disable(void); | 57 | void viafb_dvi_disable(void); |
58 | void viafb_dvi_enable(void); | 58 | void viafb_dvi_enable(void); |
59 | int viafb_tmds_trasmitter_identify(void); | 59 | int __devinit viafb_tmds_trasmitter_identify(void); |
60 | void viafb_init_dvi_size(struct tmds_chip_information *tmds_chip, | 60 | void __devinit viafb_init_dvi_size(struct tmds_chip_information *tmds_chip, |
61 | struct tmds_setting_information *tmds_setting); | 61 | struct tmds_setting_information *tmds_setting); |
62 | void viafb_dvi_set_mode(struct VideoModeTable *videoMode, int mode_bpp, | 62 | void viafb_dvi_set_mode(struct VideoModeTable *videoMode, int mode_bpp, |
63 | int set_iga); | 63 | int set_iga); |
diff --git a/drivers/video/via/hw.c b/drivers/video/via/hw.c index 2f7f64006499..4407943fa7d7 100644 --- a/drivers/video/via/hw.c +++ b/drivers/video/via/hw.c | |||
@@ -724,9 +724,9 @@ static void dvi_patch_skew_dvp_low(void); | |||
724 | static void set_dvi_output_path(int set_iga, int output_interface); | 724 | static void set_dvi_output_path(int set_iga, int output_interface); |
725 | static void set_lcd_output_path(int set_iga, int output_interface); | 725 | static void set_lcd_output_path(int set_iga, int output_interface); |
726 | static void load_fix_bit_crtc_reg(void); | 726 | static void load_fix_bit_crtc_reg(void); |
727 | static void init_gfx_chip_info(int chip_type); | 727 | static void __devinit init_gfx_chip_info(int chip_type); |
728 | static void init_tmds_chip_info(void); | 728 | static void __devinit init_tmds_chip_info(void); |
729 | static void init_lvds_chip_info(void); | 729 | static void __devinit init_lvds_chip_info(void); |
730 | static void device_screen_off(void); | 730 | static void device_screen_off(void); |
731 | static void device_screen_on(void); | 731 | static void device_screen_on(void); |
732 | static void set_display_channel(void); | 732 | static void set_display_channel(void); |
@@ -1980,7 +1980,7 @@ void viafb_fill_crtc_timing(struct crt_mode_table *crt_table, | |||
1980 | 1980 | ||
1981 | } | 1981 | } |
1982 | 1982 | ||
1983 | void viafb_init_chip_info(int chip_type) | 1983 | void __devinit viafb_init_chip_info(int chip_type) |
1984 | { | 1984 | { |
1985 | init_gfx_chip_info(chip_type); | 1985 | init_gfx_chip_info(chip_type); |
1986 | init_tmds_chip_info(); | 1986 | init_tmds_chip_info(); |
@@ -2047,7 +2047,7 @@ void viafb_update_device_setting(int hres, int vres, | |||
2047 | } | 2047 | } |
2048 | } | 2048 | } |
2049 | 2049 | ||
2050 | static void init_gfx_chip_info(int chip_type) | 2050 | static void __devinit init_gfx_chip_info(int chip_type) |
2051 | { | 2051 | { |
2052 | u8 tmp; | 2052 | u8 tmp; |
2053 | 2053 | ||
@@ -2099,7 +2099,7 @@ static void init_gfx_chip_info(int chip_type) | |||
2099 | } | 2099 | } |
2100 | } | 2100 | } |
2101 | 2101 | ||
2102 | static void init_tmds_chip_info(void) | 2102 | static void __devinit init_tmds_chip_info(void) |
2103 | { | 2103 | { |
2104 | viafb_tmds_trasmitter_identify(); | 2104 | viafb_tmds_trasmitter_identify(); |
2105 | 2105 | ||
@@ -2144,7 +2144,7 @@ static void init_tmds_chip_info(void) | |||
2144 | &viaparinfo->shared->tmds_setting_info); | 2144 | &viaparinfo->shared->tmds_setting_info); |
2145 | } | 2145 | } |
2146 | 2146 | ||
2147 | static void init_lvds_chip_info(void) | 2147 | static void __devinit init_lvds_chip_info(void) |
2148 | { | 2148 | { |
2149 | viafb_lvds_trasmitter_identify(); | 2149 | viafb_lvds_trasmitter_identify(); |
2150 | viafb_init_lcd_size(); | 2150 | viafb_init_lcd_size(); |
@@ -2178,7 +2178,7 @@ static void init_lvds_chip_info(void) | |||
2178 | viaparinfo->chip_info->lvds_chip_info.output_interface); | 2178 | viaparinfo->chip_info->lvds_chip_info.output_interface); |
2179 | } | 2179 | } |
2180 | 2180 | ||
2181 | void viafb_init_dac(int set_iga) | 2181 | void __devinit viafb_init_dac(int set_iga) |
2182 | { | 2182 | { |
2183 | int i; | 2183 | int i; |
2184 | u8 tmp; | 2184 | u8 tmp; |
diff --git a/drivers/video/via/hw.h b/drivers/video/via/hw.h index c44399895294..39f3a69bbbd8 100644 --- a/drivers/video/via/hw.h +++ b/drivers/video/via/hw.h | |||
@@ -908,8 +908,8 @@ int viafb_setmode(struct VideoModeTable *vmode_tbl, int video_bpp, | |||
908 | struct VideoModeTable *vmode_tbl1, int video_bpp1); | 908 | struct VideoModeTable *vmode_tbl1, int video_bpp1); |
909 | void viafb_fill_var_timing_info(struct fb_var_screeninfo *var, int refresh, | 909 | void viafb_fill_var_timing_info(struct fb_var_screeninfo *var, int refresh, |
910 | struct VideoModeTable *vmode_tbl); | 910 | struct VideoModeTable *vmode_tbl); |
911 | void viafb_init_chip_info(int chip_type); | 911 | void __devinit viafb_init_chip_info(int chip_type); |
912 | void viafb_init_dac(int set_iga); | 912 | void __devinit viafb_init_dac(int set_iga); |
913 | int viafb_get_pixclock(int hres, int vres, int vmode_refresh); | 913 | int viafb_get_pixclock(int hres, int vres, int vmode_refresh); |
914 | int viafb_get_refresh(int hres, int vres, u32 float_refresh); | 914 | int viafb_get_refresh(int hres, int vres, u32 float_refresh); |
915 | void viafb_update_device_setting(int hres, int vres, int bpp, | 915 | void viafb_update_device_setting(int hres, int vres, int bpp, |
diff --git a/drivers/video/via/lcd.c b/drivers/video/via/lcd.c index e48117e40102..c7de16430867 100644 --- a/drivers/video/via/lcd.c +++ b/drivers/video/via/lcd.c | |||
@@ -48,7 +48,7 @@ static struct _lcd_scaling_factor lcd_scaling_factor_CLE = { | |||
48 | 48 | ||
49 | static int check_lvds_chip(int device_id_subaddr, int device_id); | 49 | static int check_lvds_chip(int device_id_subaddr, int device_id); |
50 | static bool lvds_identify_integratedlvds(void); | 50 | static bool lvds_identify_integratedlvds(void); |
51 | static void fp_id_to_vindex(int panel_id); | 51 | static void __devinit fp_id_to_vindex(int panel_id); |
52 | static int lvds_register_read(int index); | 52 | static int lvds_register_read(int index); |
53 | static void load_lcd_scaling(int set_hres, int set_vres, int panel_hres, | 53 | static void load_lcd_scaling(int set_hres, int set_vres, int panel_hres, |
54 | int panel_vres); | 54 | int panel_vres); |
@@ -90,7 +90,7 @@ static int check_lvds_chip(int device_id_subaddr, int device_id) | |||
90 | return FAIL; | 90 | return FAIL; |
91 | } | 91 | } |
92 | 92 | ||
93 | void viafb_init_lcd_size(void) | 93 | void __devinit viafb_init_lcd_size(void) |
94 | { | 94 | { |
95 | DEBUG_MSG(KERN_INFO "viafb_init_lcd_size()\n"); | 95 | DEBUG_MSG(KERN_INFO "viafb_init_lcd_size()\n"); |
96 | 96 | ||
@@ -150,7 +150,7 @@ static bool lvds_identify_integratedlvds(void) | |||
150 | return true; | 150 | return true; |
151 | } | 151 | } |
152 | 152 | ||
153 | int viafb_lvds_trasmitter_identify(void) | 153 | int __devinit viafb_lvds_trasmitter_identify(void) |
154 | { | 154 | { |
155 | if (viafb_lvds_identify_vt1636(VIA_PORT_31)) { | 155 | if (viafb_lvds_identify_vt1636(VIA_PORT_31)) { |
156 | viaparinfo->chip_info->lvds_chip_info.i2c_port = VIA_PORT_31; | 156 | viaparinfo->chip_info->lvds_chip_info.i2c_port = VIA_PORT_31; |
@@ -191,7 +191,7 @@ int viafb_lvds_trasmitter_identify(void) | |||
191 | return FAIL; | 191 | return FAIL; |
192 | } | 192 | } |
193 | 193 | ||
194 | static void fp_id_to_vindex(int panel_id) | 194 | static void __devinit fp_id_to_vindex(int panel_id) |
195 | { | 195 | { |
196 | DEBUG_MSG(KERN_INFO "fp_get_panel_id()\n"); | 196 | DEBUG_MSG(KERN_INFO "fp_get_panel_id()\n"); |
197 | 197 | ||
@@ -996,7 +996,7 @@ static void check_diport_of_integrated_lvds( | |||
996 | plvds_chip_info->output_interface); | 996 | plvds_chip_info->output_interface); |
997 | } | 997 | } |
998 | 998 | ||
999 | void viafb_init_lvds_output_interface(struct lvds_chip_information | 999 | void __devinit viafb_init_lvds_output_interface(struct lvds_chip_information |
1000 | *plvds_chip_info, | 1000 | *plvds_chip_info, |
1001 | struct lvds_setting_information | 1001 | struct lvds_setting_information |
1002 | *plvds_setting_info) | 1002 | *plvds_setting_info) |
diff --git a/drivers/video/via/lcd.h b/drivers/video/via/lcd.h index b348efc360b8..c7909fe29550 100644 --- a/drivers/video/via/lcd.h +++ b/drivers/video/via/lcd.h | |||
@@ -71,15 +71,15 @@ void viafb_enable_lvds_vt1636(struct lvds_setting_information | |||
71 | struct lvds_chip_information *plvds_chip_info); | 71 | struct lvds_chip_information *plvds_chip_info); |
72 | void viafb_lcd_disable(void); | 72 | void viafb_lcd_disable(void); |
73 | void viafb_lcd_enable(void); | 73 | void viafb_lcd_enable(void); |
74 | void viafb_init_lcd_size(void); | 74 | void __devinit viafb_init_lcd_size(void); |
75 | void viafb_init_lvds_output_interface(struct lvds_chip_information | 75 | 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); |
79 | void viafb_lcd_set_mode(struct crt_mode_table *mode_crt_table, | 79 | void viafb_lcd_set_mode(struct crt_mode_table *mode_crt_table, |
80 | struct lvds_setting_information *plvds_setting_info, | 80 | struct lvds_setting_information *plvds_setting_info, |
81 | struct lvds_chip_information *plvds_chip_info); | 81 | struct lvds_chip_information *plvds_chip_info); |
82 | int viafb_lvds_trasmitter_identify(void); | 82 | int __devinit viafb_lvds_trasmitter_identify(void); |
83 | void viafb_init_lvds_output_interface(struct lvds_chip_information | 83 | void viafb_init_lvds_output_interface(struct lvds_chip_information |
84 | *plvds_chip_info, | 84 | *plvds_chip_info, |
85 | struct lvds_setting_information | 85 | struct lvds_setting_information |
diff --git a/drivers/video/via/viafbdev.c b/drivers/video/via/viafbdev.c index bdd0e4130f4e..5a947b096269 100644 --- a/drivers/video/via/viafbdev.c +++ b/drivers/video/via/viafbdev.c | |||
@@ -961,7 +961,7 @@ static void retrieve_device_setting(struct viafb_ioctl_setting | |||
961 | setting_info->lcd_attributes.lcd_mode = viafb_lcd_mode; | 961 | setting_info->lcd_attributes.lcd_mode = viafb_lcd_mode; |
962 | } | 962 | } |
963 | 963 | ||
964 | static int parse_active_dev(void) | 964 | static int __init parse_active_dev(void) |
965 | { | 965 | { |
966 | viafb_CRT_ON = STATE_OFF; | 966 | viafb_CRT_ON = STATE_OFF; |
967 | viafb_DVI_ON = STATE_OFF; | 967 | viafb_DVI_ON = STATE_OFF; |
@@ -1031,7 +1031,7 @@ static int parse_active_dev(void) | |||
1031 | return 0; | 1031 | return 0; |
1032 | } | 1032 | } |
1033 | 1033 | ||
1034 | static int parse_port(char *opt_str, int *output_interface) | 1034 | static int __devinit parse_port(char *opt_str, int *output_interface) |
1035 | { | 1035 | { |
1036 | if (!strncmp(opt_str, "DVP0", 4)) | 1036 | if (!strncmp(opt_str, "DVP0", 4)) |
1037 | *output_interface = INTERFACE_DVP0; | 1037 | *output_interface = INTERFACE_DVP0; |
@@ -1048,7 +1048,7 @@ static int parse_port(char *opt_str, int *output_interface) | |||
1048 | return 0; | 1048 | return 0; |
1049 | } | 1049 | } |
1050 | 1050 | ||
1051 | static void parse_lcd_port(void) | 1051 | static void __devinit parse_lcd_port(void) |
1052 | { | 1052 | { |
1053 | parse_port(viafb_lcd_port, &viaparinfo->chip_info->lvds_chip_info. | 1053 | parse_port(viafb_lcd_port, &viaparinfo->chip_info->lvds_chip_info. |
1054 | output_interface); | 1054 | output_interface); |
@@ -1061,7 +1061,7 @@ static void parse_lcd_port(void) | |||
1061 | output_interface); | 1061 | output_interface); |
1062 | } | 1062 | } |
1063 | 1063 | ||
1064 | static void parse_dvi_port(void) | 1064 | static void __devinit parse_dvi_port(void) |
1065 | { | 1065 | { |
1066 | parse_port(viafb_dvi_port, &viaparinfo->chip_info->tmds_chip_info. | 1066 | parse_port(viafb_dvi_port, &viaparinfo->chip_info->tmds_chip_info. |
1067 | output_interface); | 1067 | output_interface); |