aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/via
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/via')
-rw-r--r--drivers/video/via/dvi.c10
-rw-r--r--drivers/video/via/dvi.h4
-rw-r--r--drivers/video/via/hw.c16
-rw-r--r--drivers/video/via/hw.h4
-rw-r--r--drivers/video/via/lcd.c10
-rw-r--r--drivers/video/via/lcd.h6
-rw-r--r--drivers/video/via/via-core.c19
-rw-r--r--drivers/video/via/via-gpio.c2
-rw-r--r--drivers/video/via/viafbdev.c12
9 files changed, 41 insertions, 42 deletions
diff --git a/drivers/video/via/dvi.c b/drivers/video/via/dvi.c
index 6be72f0ba21d..7789553952d3 100644
--- a/drivers/video/via/dvi.c
+++ b/drivers/video/via/dvi.c
@@ -25,7 +25,7 @@
25static void tmds_register_write(int index, u8 data); 25static void tmds_register_write(int index, u8 data);
26static int tmds_register_read(int index); 26static int tmds_register_read(int index);
27static int tmds_register_read_bytes(int index, u8 *buff, int buff_len); 27static int tmds_register_read_bytes(int index, u8 *buff, int buff_len);
28static void __devinit dvi_get_panel_size_from_DDCv1( 28static void dvi_get_panel_size_from_DDCv1(
29 struct tmds_chip_information *tmds_chip, 29 struct tmds_chip_information *tmds_chip,
30 struct tmds_setting_information *tmds_setting); 30 struct tmds_setting_information *tmds_setting);
31static int viafb_dvi_query_EDID(void); 31static int viafb_dvi_query_EDID(void);
@@ -35,8 +35,8 @@ static inline bool check_tmds_chip(int device_id_subaddr, int device_id)
35 return tmds_register_read(device_id_subaddr) == device_id; 35 return tmds_register_read(device_id_subaddr) == device_id;
36} 36}
37 37
38void __devinit viafb_init_dvi_size(struct tmds_chip_information *tmds_chip, 38void viafb_init_dvi_size(struct tmds_chip_information *tmds_chip,
39 struct tmds_setting_information *tmds_setting) 39 struct tmds_setting_information *tmds_setting)
40{ 40{
41 DEBUG_MSG(KERN_INFO "viafb_init_dvi_size()\n"); 41 DEBUG_MSG(KERN_INFO "viafb_init_dvi_size()\n");
42 42
@@ -47,7 +47,7 @@ void __devinit viafb_init_dvi_size(struct tmds_chip_information *tmds_chip,
47 return; 47 return;
48} 48}
49 49
50bool __devinit viafb_tmds_trasmitter_identify(void) 50bool viafb_tmds_trasmitter_identify(void)
51{ 51{
52 unsigned char sr2a = 0, sr1e = 0, sr3e = 0; 52 unsigned char sr2a = 0, sr1e = 0, sr3e = 0;
53 53
@@ -285,7 +285,7 @@ static int viafb_dvi_query_EDID(void)
285} 285}
286 286
287/* Get Panel Size Using EDID1 Table */ 287/* Get Panel Size Using EDID1 Table */
288static void __devinit dvi_get_panel_size_from_DDCv1( 288static void dvi_get_panel_size_from_DDCv1(
289 struct tmds_chip_information *tmds_chip, 289 struct tmds_chip_information *tmds_chip,
290 struct tmds_setting_information *tmds_setting) 290 struct tmds_setting_information *tmds_setting)
291{ 291{
diff --git a/drivers/video/via/dvi.h b/drivers/video/via/dvi.h
index db757850c216..4c6bfba57d11 100644
--- a/drivers/video/via/dvi.h
+++ b/drivers/video/via/dvi.h
@@ -56,8 +56,8 @@
56int viafb_dvi_sense(void); 56int viafb_dvi_sense(void);
57void viafb_dvi_disable(void); 57void viafb_dvi_disable(void);
58void viafb_dvi_enable(void); 58void viafb_dvi_enable(void);
59bool __devinit viafb_tmds_trasmitter_identify(void); 59bool viafb_tmds_trasmitter_identify(void);
60void __devinit viafb_init_dvi_size(struct tmds_chip_information *tmds_chip, 60void viafb_init_dvi_size(struct tmds_chip_information *tmds_chip,
61 struct tmds_setting_information *tmds_setting); 61 struct tmds_setting_information *tmds_setting);
62void viafb_dvi_set_mode(const struct fb_var_screeninfo *var, 62void viafb_dvi_set_mode(const struct fb_var_screeninfo *var,
63 u16 cxres, u16 cyres, int iga); 63 u16 cxres, u16 cyres, int iga);
diff --git a/drivers/video/via/hw.c b/drivers/video/via/hw.c
index 898590db5e14..80233dae358a 100644
--- a/drivers/video/via/hw.c
+++ b/drivers/video/via/hw.c
@@ -465,9 +465,9 @@ static struct via_device_mapping device_mapping[] = {
465static struct via_clock clock; 465static struct via_clock clock;
466 466
467static void load_fix_bit_crtc_reg(void); 467static void load_fix_bit_crtc_reg(void);
468static void __devinit init_gfx_chip_info(int chip_type); 468static void init_gfx_chip_info(int chip_type);
469static void __devinit init_tmds_chip_info(void); 469static void init_tmds_chip_info(void);
470static void __devinit init_lvds_chip_info(void); 470static void init_lvds_chip_info(void);
471static void device_screen_off(void); 471static void device_screen_off(void);
472static void device_screen_on(void); 472static void device_screen_on(void);
473static void set_display_channel(void); 473static void set_display_channel(void);
@@ -1507,7 +1507,7 @@ void viafb_fill_crtc_timing(const struct fb_var_screeninfo *var,
1507 viafb_set_vclock(PICOS2KHZ(var->pixclock) * 1000, iga); 1507 viafb_set_vclock(PICOS2KHZ(var->pixclock) * 1000, iga);
1508} 1508}
1509 1509
1510void __devinit viafb_init_chip_info(int chip_type) 1510void viafb_init_chip_info(int chip_type)
1511{ 1511{
1512 via_clock_init(&clock, chip_type); 1512 via_clock_init(&clock, chip_type);
1513 init_gfx_chip_info(chip_type); 1513 init_gfx_chip_info(chip_type);
@@ -1540,7 +1540,7 @@ void viafb_update_device_setting(int hres, int vres, int bpp, int flag)
1540 } 1540 }
1541} 1541}
1542 1542
1543static void __devinit init_gfx_chip_info(int chip_type) 1543static void init_gfx_chip_info(int chip_type)
1544{ 1544{
1545 u8 tmp; 1545 u8 tmp;
1546 1546
@@ -1593,7 +1593,7 @@ static void __devinit init_gfx_chip_info(int chip_type)
1593 } 1593 }
1594} 1594}
1595 1595
1596static void __devinit init_tmds_chip_info(void) 1596static void init_tmds_chip_info(void)
1597{ 1597{
1598 viafb_tmds_trasmitter_identify(); 1598 viafb_tmds_trasmitter_identify();
1599 1599
@@ -1638,7 +1638,7 @@ static void __devinit init_tmds_chip_info(void)
1638 &viaparinfo->shared->tmds_setting_info); 1638 &viaparinfo->shared->tmds_setting_info);
1639} 1639}
1640 1640
1641static void __devinit init_lvds_chip_info(void) 1641static void init_lvds_chip_info(void)
1642{ 1642{
1643 viafb_lvds_trasmitter_identify(); 1643 viafb_lvds_trasmitter_identify();
1644 viafb_init_lcd_size(); 1644 viafb_init_lcd_size();
@@ -1672,7 +1672,7 @@ static void __devinit init_lvds_chip_info(void)
1672 viaparinfo->chip_info->lvds_chip_info.output_interface); 1672 viaparinfo->chip_info->lvds_chip_info.output_interface);
1673} 1673}
1674 1674
1675void __devinit viafb_init_dac(int set_iga) 1675void viafb_init_dac(int set_iga)
1676{ 1676{
1677 int i; 1677 int i;
1678 u8 tmp; 1678 u8 tmp;
diff --git a/drivers/video/via/hw.h b/drivers/video/via/hw.h
index 6be243cfc823..a8205754c736 100644
--- a/drivers/video/via/hw.h
+++ b/drivers/video/via/hw.h
@@ -663,8 +663,8 @@ void viafb_set_dpa_gfx(int output_interface, struct GFX_DPA_SETTING\
663int viafb_setmode(void); 663int viafb_setmode(void);
664void viafb_fill_var_timing_info(struct fb_var_screeninfo *var, 664void viafb_fill_var_timing_info(struct fb_var_screeninfo *var,
665 const struct fb_videomode *mode); 665 const struct fb_videomode *mode);
666void __devinit viafb_init_chip_info(int chip_type); 666void viafb_init_chip_info(int chip_type);
667void __devinit viafb_init_dac(int set_iga); 667void viafb_init_dac(int set_iga);
668int viafb_get_refresh(int hres, int vres, u32 float_refresh); 668int viafb_get_refresh(int hres, int vres, u32 float_refresh);
669void viafb_update_device_setting(int hres, int vres, int bpp, int flag); 669void viafb_update_device_setting(int hres, int vres, int bpp, int flag);
670 670
diff --git a/drivers/video/via/lcd.c b/drivers/video/via/lcd.c
index 165037910536..980ee1b1dcf3 100644
--- a/drivers/video/via/lcd.c
+++ b/drivers/video/via/lcd.c
@@ -49,7 +49,7 @@ static struct _lcd_scaling_factor lcd_scaling_factor_CLE = {
49}; 49};
50 50
51static bool lvds_identify_integratedlvds(void); 51static bool lvds_identify_integratedlvds(void);
52static void __devinit fp_id_to_vindex(int panel_id); 52static void fp_id_to_vindex(int panel_id);
53static int lvds_register_read(int index); 53static int lvds_register_read(int index);
54static void load_lcd_scaling(int set_hres, int set_vres, int panel_hres, 54static void load_lcd_scaling(int set_hres, int set_vres, int panel_hres,
55 int panel_vres); 55 int panel_vres);
@@ -81,7 +81,7 @@ static inline bool check_lvds_chip(int device_id_subaddr, int device_id)
81 return lvds_register_read(device_id_subaddr) == device_id; 81 return lvds_register_read(device_id_subaddr) == device_id;
82} 82}
83 83
84void __devinit viafb_init_lcd_size(void) 84void viafb_init_lcd_size(void)
85{ 85{
86 DEBUG_MSG(KERN_INFO "viafb_init_lcd_size()\n"); 86 DEBUG_MSG(KERN_INFO "viafb_init_lcd_size()\n");
87 87
@@ -139,7 +139,7 @@ static bool lvds_identify_integratedlvds(void)
139 return true; 139 return true;
140} 140}
141 141
142bool __devinit viafb_lvds_trasmitter_identify(void) 142bool viafb_lvds_trasmitter_identify(void)
143{ 143{
144 if (viafb_lvds_identify_vt1636(VIA_PORT_31)) { 144 if (viafb_lvds_identify_vt1636(VIA_PORT_31)) {
145 viaparinfo->chip_info->lvds_chip_info.i2c_port = VIA_PORT_31; 145 viaparinfo->chip_info->lvds_chip_info.i2c_port = VIA_PORT_31;
@@ -180,7 +180,7 @@ bool __devinit viafb_lvds_trasmitter_identify(void)
180 return false; 180 return false;
181} 181}
182 182
183static void __devinit fp_id_to_vindex(int panel_id) 183static void fp_id_to_vindex(int panel_id)
184{ 184{
185 DEBUG_MSG(KERN_INFO "fp_get_panel_id()\n"); 185 DEBUG_MSG(KERN_INFO "fp_get_panel_id()\n");
186 186
@@ -914,7 +914,7 @@ static void check_diport_of_integrated_lvds(
914 plvds_chip_info->output_interface); 914 plvds_chip_info->output_interface);
915} 915}
916 916
917void __devinit viafb_init_lvds_output_interface(struct lvds_chip_information 917void viafb_init_lvds_output_interface(struct lvds_chip_information
918 *plvds_chip_info, 918 *plvds_chip_info,
919 struct lvds_setting_information 919 struct lvds_setting_information
920 *plvds_setting_info) 920 *plvds_setting_info)
diff --git a/drivers/video/via/lcd.h b/drivers/video/via/lcd.h
index 8f3e4e06156c..5c988a063ad5 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);
72void viafb_lcd_disable(void); 72void viafb_lcd_disable(void);
73void viafb_lcd_enable(void); 73void viafb_lcd_enable(void);
74void __devinit viafb_init_lcd_size(void); 74void viafb_init_lcd_size(void);
75void __devinit viafb_init_lvds_output_interface(struct lvds_chip_information 75void 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(const struct fb_var_screeninfo *var, u16 cxres, 79void viafb_lcd_set_mode(const struct fb_var_screeninfo *var, u16 cxres,
80 u16 cyres, struct lvds_setting_information *plvds_setting_info, 80 u16 cyres, struct lvds_setting_information *plvds_setting_info,
81 struct lvds_chip_information *plvds_chip_info); 81 struct lvds_chip_information *plvds_chip_info);
82bool __devinit viafb_lvds_trasmitter_identify(void); 82bool viafb_lvds_trasmitter_identify(void);
83void viafb_init_lvds_output_interface(struct lvds_chip_information 83void 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/via-core.c b/drivers/video/via/via-core.c
index dd58b530c0df..6e274825fb31 100644
--- a/drivers/video/via/via-core.c
+++ b/drivers/video/via/via-core.c
@@ -80,7 +80,7 @@ static inline int viafb_mmio_read(int reg)
80 */ 80 */
81static u32 viafb_enabled_ints; 81static u32 viafb_enabled_ints;
82 82
83static void __devinit viafb_int_init(void) 83static void viafb_int_init(void)
84{ 84{
85 viafb_enabled_ints = 0; 85 viafb_enabled_ints = 0;
86 86
@@ -475,7 +475,7 @@ static int viafb_get_fb_size_from_pci(int chip_type)
475/* 475/*
476 * Figure out and map our MMIO regions. 476 * Figure out and map our MMIO regions.
477 */ 477 */
478static int __devinit via_pci_setup_mmio(struct viafb_dev *vdev) 478static int via_pci_setup_mmio(struct viafb_dev *vdev)
479{ 479{
480 int ret; 480 int ret;
481 /* 481 /*
@@ -550,8 +550,8 @@ static struct viafb_subdev_info {
550}; 550};
551#define N_SUBDEVS ARRAY_SIZE(viafb_subdevs) 551#define N_SUBDEVS ARRAY_SIZE(viafb_subdevs)
552 552
553static int __devinit via_create_subdev(struct viafb_dev *vdev, 553static int via_create_subdev(struct viafb_dev *vdev,
554 struct viafb_subdev_info *info) 554 struct viafb_subdev_info *info)
555{ 555{
556 int ret; 556 int ret;
557 557
@@ -573,7 +573,7 @@ static int __devinit via_create_subdev(struct viafb_dev *vdev,
573 return ret; 573 return ret;
574} 574}
575 575
576static int __devinit via_setup_subdevs(struct viafb_dev *vdev) 576static int via_setup_subdevs(struct viafb_dev *vdev)
577{ 577{
578 int i; 578 int i;
579 579
@@ -671,8 +671,7 @@ static int via_resume(struct pci_dev *pdev)
671} 671}
672#endif /* CONFIG_PM */ 672#endif /* CONFIG_PM */
673 673
674static int __devinit via_pci_probe(struct pci_dev *pdev, 674static int via_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
675 const struct pci_device_id *ent)
676{ 675{
677 int ret; 676 int ret;
678 677
@@ -716,7 +715,7 @@ out_disable:
716 return ret; 715 return ret;
717} 716}
718 717
719static void __devexit via_pci_remove(struct pci_dev *pdev) 718static void via_pci_remove(struct pci_dev *pdev)
720{ 719{
721 via_teardown_subdevs(); 720 via_teardown_subdevs();
722 via_fb_pci_remove(pdev); 721 via_fb_pci_remove(pdev);
@@ -725,7 +724,7 @@ static void __devexit via_pci_remove(struct pci_dev *pdev)
725} 724}
726 725
727 726
728static struct pci_device_id via_pci_table[] __devinitdata = { 727static struct pci_device_id via_pci_table[] = {
729 { PCI_DEVICE(PCI_VENDOR_ID_VIA, UNICHROME_CLE266_DID), 728 { PCI_DEVICE(PCI_VENDOR_ID_VIA, UNICHROME_CLE266_DID),
730 .driver_data = UNICHROME_CLE266 }, 729 .driver_data = UNICHROME_CLE266 },
731 { PCI_DEVICE(PCI_VENDOR_ID_VIA, UNICHROME_K400_DID), 730 { PCI_DEVICE(PCI_VENDOR_ID_VIA, UNICHROME_K400_DID),
@@ -760,7 +759,7 @@ static struct pci_driver via_driver = {
760 .name = "viafb", 759 .name = "viafb",
761 .id_table = via_pci_table, 760 .id_table = via_pci_table,
762 .probe = via_pci_probe, 761 .probe = via_pci_probe,
763 .remove = __devexit_p(via_pci_remove), 762 .remove = via_pci_remove,
764#ifdef CONFIG_PM 763#ifdef CONFIG_PM
765 .suspend = via_suspend, 764 .suspend = via_suspend,
766 .resume = via_resume, 765 .resume = via_resume,
diff --git a/drivers/video/via/via-gpio.c b/drivers/video/via/via-gpio.c
index d69cfef7c338..e408679081ab 100644
--- a/drivers/video/via/via-gpio.c
+++ b/drivers/video/via/via-gpio.c
@@ -212,7 +212,7 @@ EXPORT_SYMBOL_GPL(viafb_gpio_lookup);
212/* 212/*
213 * Platform device stuff. 213 * Platform device stuff.
214 */ 214 */
215static __devinit int viafb_gpio_probe(struct platform_device *platdev) 215static int viafb_gpio_probe(struct platform_device *platdev)
216{ 216{
217 struct viafb_dev *vdev = platdev->dev.platform_data; 217 struct viafb_dev *vdev = platdev->dev.platform_data;
218 struct via_port_cfg *port_cfg = vdev->port_cfg; 218 struct via_port_cfg *port_cfg = vdev->port_cfg;
diff --git a/drivers/video/via/viafbdev.c b/drivers/video/via/viafbdev.c
index c80e770e1800..325c43c6ff97 100644
--- a/drivers/video/via/viafbdev.c
+++ b/drivers/video/via/viafbdev.c
@@ -1072,7 +1072,7 @@ static int __init parse_active_dev(void)
1072 return 0; 1072 return 0;
1073} 1073}
1074 1074
1075static int __devinit parse_port(char *opt_str, int *output_interface) 1075static int parse_port(char *opt_str, int *output_interface)
1076{ 1076{
1077 if (!strncmp(opt_str, "DVP0", 4)) 1077 if (!strncmp(opt_str, "DVP0", 4))
1078 *output_interface = INTERFACE_DVP0; 1078 *output_interface = INTERFACE_DVP0;
@@ -1089,7 +1089,7 @@ static int __devinit parse_port(char *opt_str, int *output_interface)
1089 return 0; 1089 return 0;
1090} 1090}
1091 1091
1092static void __devinit parse_lcd_port(void) 1092static void parse_lcd_port(void)
1093{ 1093{
1094 parse_port(viafb_lcd_port, &viaparinfo->chip_info->lvds_chip_info. 1094 parse_port(viafb_lcd_port, &viaparinfo->chip_info->lvds_chip_info.
1095 output_interface); 1095 output_interface);
@@ -1102,7 +1102,7 @@ static void __devinit parse_lcd_port(void)
1102 output_interface); 1102 output_interface);
1103} 1103}
1104 1104
1105static void __devinit parse_dvi_port(void) 1105static void parse_dvi_port(void)
1106{ 1106{
1107 parse_port(viafb_dvi_port, &viaparinfo->chip_info->tmds_chip_info. 1107 parse_port(viafb_dvi_port, &viaparinfo->chip_info->tmds_chip_info.
1108 output_interface); 1108 output_interface);
@@ -1727,7 +1727,7 @@ static struct viafb_pm_hooks viafb_fb_pm_hooks = {
1727 1727
1728#endif 1728#endif
1729 1729
1730static void __devinit i2c_bus_probe(struct viafb_shared *shared) 1730static void i2c_bus_probe(struct viafb_shared *shared)
1731{ 1731{
1732 /* should be always CRT */ 1732 /* should be always CRT */
1733 printk(KERN_INFO "viafb: Probing I2C bus 0x26\n"); 1733 printk(KERN_INFO "viafb: Probing I2C bus 0x26\n");
@@ -1753,7 +1753,7 @@ static void i2c_bus_free(struct viafb_shared *shared)
1753 via_aux_free(shared->i2c_2C); 1753 via_aux_free(shared->i2c_2C);
1754} 1754}
1755 1755
1756int __devinit via_fb_pci_probe(struct viafb_dev *vdev) 1756int via_fb_pci_probe(struct viafb_dev *vdev)
1757{ 1757{
1758 u32 default_xres, default_yres; 1758 u32 default_xres, default_yres;
1759 struct fb_var_screeninfo default_var; 1759 struct fb_var_screeninfo default_var;
@@ -1945,7 +1945,7 @@ out_fb_release:
1945 return rc; 1945 return rc;
1946} 1946}
1947 1947
1948void __devexit via_fb_pci_remove(struct pci_dev *pdev) 1948void via_fb_pci_remove(struct pci_dev *pdev)
1949{ 1949{
1950 DEBUG_MSG(KERN_INFO "via_pci_remove!\n"); 1950 DEBUG_MSG(KERN_INFO "via_pci_remove!\n");
1951 fb_dealloc_cmap(&viafbinfo->cmap); 1951 fb_dealloc_cmap(&viafbinfo->cmap);