diff options
Diffstat (limited to 'drivers/video/aty')
-rw-r--r-- | drivers/video/aty/aty128fb.c | 22 | ||||
-rw-r--r-- | drivers/video/aty/atyfb_base.c | 21 | ||||
-rw-r--r-- | drivers/video/aty/mach64_cursor.c | 1 | ||||
-rw-r--r-- | drivers/video/aty/radeon_backlight.c | 14 | ||||
-rw-r--r-- | drivers/video/aty/radeon_monitor.c | 3 |
5 files changed, 36 insertions, 25 deletions
diff --git a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c index e4e4d433b007..34a0851bcbfa 100644 --- a/drivers/video/aty/aty128fb.c +++ b/drivers/video/aty/aty128fb.c | |||
@@ -52,7 +52,6 @@ | |||
52 | #include <linux/errno.h> | 52 | #include <linux/errno.h> |
53 | #include <linux/string.h> | 53 | #include <linux/string.h> |
54 | #include <linux/mm.h> | 54 | #include <linux/mm.h> |
55 | #include <linux/slab.h> | ||
56 | #include <linux/vmalloc.h> | 55 | #include <linux/vmalloc.h> |
57 | #include <linux/delay.h> | 56 | #include <linux/delay.h> |
58 | #include <linux/interrupt.h> | 57 | #include <linux/interrupt.h> |
@@ -1802,6 +1801,7 @@ static void aty128_bl_set_power(struct fb_info *info, int power) | |||
1802 | 1801 | ||
1803 | static void aty128_bl_init(struct aty128fb_par *par) | 1802 | static void aty128_bl_init(struct aty128fb_par *par) |
1804 | { | 1803 | { |
1804 | struct backlight_properties props; | ||
1805 | struct fb_info *info = pci_get_drvdata(par->pdev); | 1805 | struct fb_info *info = pci_get_drvdata(par->pdev); |
1806 | struct backlight_device *bd; | 1806 | struct backlight_device *bd; |
1807 | char name[12]; | 1807 | char name[12]; |
@@ -1817,7 +1817,10 @@ static void aty128_bl_init(struct aty128fb_par *par) | |||
1817 | 1817 | ||
1818 | snprintf(name, sizeof(name), "aty128bl%d", info->node); | 1818 | snprintf(name, sizeof(name), "aty128bl%d", info->node); |
1819 | 1819 | ||
1820 | bd = backlight_device_register(name, info->dev, par, &aty128_bl_data); | 1820 | memset(&props, 0, sizeof(struct backlight_properties)); |
1821 | props.max_brightness = FB_BACKLIGHT_LEVELS - 1; | ||
1822 | bd = backlight_device_register(name, info->dev, par, &aty128_bl_data, | ||
1823 | &props); | ||
1821 | if (IS_ERR(bd)) { | 1824 | if (IS_ERR(bd)) { |
1822 | info->bl_dev = NULL; | 1825 | info->bl_dev = NULL; |
1823 | printk(KERN_WARNING "aty128: Backlight registration failed\n"); | 1826 | printk(KERN_WARNING "aty128: Backlight registration failed\n"); |
@@ -1829,7 +1832,6 @@ static void aty128_bl_init(struct aty128fb_par *par) | |||
1829 | 63 * FB_BACKLIGHT_MAX / MAX_LEVEL, | 1832 | 63 * FB_BACKLIGHT_MAX / MAX_LEVEL, |
1830 | 219 * FB_BACKLIGHT_MAX / MAX_LEVEL); | 1833 | 219 * FB_BACKLIGHT_MAX / MAX_LEVEL); |
1831 | 1834 | ||
1832 | bd->props.max_brightness = FB_BACKLIGHT_LEVELS - 1; | ||
1833 | bd->props.brightness = bd->props.max_brightness; | 1835 | bd->props.brightness = bd->props.max_brightness; |
1834 | bd->props.power = FB_BLANK_UNBLANK; | 1836 | bd->props.power = FB_BLANK_UNBLANK; |
1835 | backlight_update_status(bd); | 1837 | backlight_update_status(bd); |
@@ -1931,22 +1933,22 @@ static int __devinit aty128_init(struct pci_dev *pdev, const struct pci_device_i | |||
1931 | * PowerMac2,2 summer 2000 iMacs | 1933 | * PowerMac2,2 summer 2000 iMacs |
1932 | * PowerMac4,1 january 2001 iMacs "flower power" | 1934 | * PowerMac4,1 january 2001 iMacs "flower power" |
1933 | */ | 1935 | */ |
1934 | if (machine_is_compatible("PowerMac2,1") || | 1936 | if (of_machine_is_compatible("PowerMac2,1") || |
1935 | machine_is_compatible("PowerMac2,2") || | 1937 | of_machine_is_compatible("PowerMac2,2") || |
1936 | machine_is_compatible("PowerMac4,1")) | 1938 | of_machine_is_compatible("PowerMac4,1")) |
1937 | default_vmode = VMODE_1024_768_75; | 1939 | default_vmode = VMODE_1024_768_75; |
1938 | 1940 | ||
1939 | /* iBook SE */ | 1941 | /* iBook SE */ |
1940 | if (machine_is_compatible("PowerBook2,2")) | 1942 | if (of_machine_is_compatible("PowerBook2,2")) |
1941 | default_vmode = VMODE_800_600_60; | 1943 | default_vmode = VMODE_800_600_60; |
1942 | 1944 | ||
1943 | /* PowerBook Firewire (Pismo), iBook Dual USB */ | 1945 | /* PowerBook Firewire (Pismo), iBook Dual USB */ |
1944 | if (machine_is_compatible("PowerBook3,1") || | 1946 | if (of_machine_is_compatible("PowerBook3,1") || |
1945 | machine_is_compatible("PowerBook4,1")) | 1947 | of_machine_is_compatible("PowerBook4,1")) |
1946 | default_vmode = VMODE_1024_768_60; | 1948 | default_vmode = VMODE_1024_768_60; |
1947 | 1949 | ||
1948 | /* PowerBook Titanium */ | 1950 | /* PowerBook Titanium */ |
1949 | if (machine_is_compatible("PowerBook3,2")) | 1951 | if (of_machine_is_compatible("PowerBook3,2")) |
1950 | default_vmode = VMODE_1152_768_60; | 1952 | default_vmode = VMODE_1152_768_60; |
1951 | 1953 | ||
1952 | if (default_cmode > 16) | 1954 | if (default_cmode > 16) |
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c index 913b4a47ae52..29d72851f85b 100644 --- a/drivers/video/aty/atyfb_base.c +++ b/drivers/video/aty/atyfb_base.c | |||
@@ -2232,6 +2232,7 @@ static struct backlight_ops aty_bl_data = { | |||
2232 | 2232 | ||
2233 | static void aty_bl_init(struct atyfb_par *par) | 2233 | static void aty_bl_init(struct atyfb_par *par) |
2234 | { | 2234 | { |
2235 | struct backlight_properties props; | ||
2235 | struct fb_info *info = pci_get_drvdata(par->pdev); | 2236 | struct fb_info *info = pci_get_drvdata(par->pdev); |
2236 | struct backlight_device *bd; | 2237 | struct backlight_device *bd; |
2237 | char name[12]; | 2238 | char name[12]; |
@@ -2243,7 +2244,10 @@ static void aty_bl_init(struct atyfb_par *par) | |||
2243 | 2244 | ||
2244 | snprintf(name, sizeof(name), "atybl%d", info->node); | 2245 | snprintf(name, sizeof(name), "atybl%d", info->node); |
2245 | 2246 | ||
2246 | bd = backlight_device_register(name, info->dev, par, &aty_bl_data); | 2247 | memset(&props, 0, sizeof(struct backlight_properties)); |
2248 | props.max_brightness = FB_BACKLIGHT_LEVELS - 1; | ||
2249 | bd = backlight_device_register(name, info->dev, par, &aty_bl_data, | ||
2250 | &props); | ||
2247 | if (IS_ERR(bd)) { | 2251 | if (IS_ERR(bd)) { |
2248 | info->bl_dev = NULL; | 2252 | info->bl_dev = NULL; |
2249 | printk(KERN_WARNING "aty: Backlight registration failed\n"); | 2253 | printk(KERN_WARNING "aty: Backlight registration failed\n"); |
@@ -2255,7 +2259,6 @@ static void aty_bl_init(struct atyfb_par *par) | |||
2255 | 0x3F * FB_BACKLIGHT_MAX / MAX_LEVEL, | 2259 | 0x3F * FB_BACKLIGHT_MAX / MAX_LEVEL, |
2256 | 0xFF * FB_BACKLIGHT_MAX / MAX_LEVEL); | 2260 | 0xFF * FB_BACKLIGHT_MAX / MAX_LEVEL); |
2257 | 2261 | ||
2258 | bd->props.max_brightness = FB_BACKLIGHT_LEVELS - 1; | ||
2259 | bd->props.brightness = bd->props.max_brightness; | 2262 | bd->props.brightness = bd->props.max_brightness; |
2260 | bd->props.power = FB_BLANK_UNBLANK; | 2263 | bd->props.power = FB_BLANK_UNBLANK; |
2261 | backlight_update_status(bd); | 2264 | backlight_update_status(bd); |
@@ -2439,7 +2442,7 @@ static int __devinit aty_init(struct fb_info *info) | |||
2439 | * The Apple iBook1 uses non-standard memory frequencies. | 2442 | * The Apple iBook1 uses non-standard memory frequencies. |
2440 | * We detect it and set the frequency manually. | 2443 | * We detect it and set the frequency manually. |
2441 | */ | 2444 | */ |
2442 | if (machine_is_compatible("PowerBook2,1")) { | 2445 | if (of_machine_is_compatible("PowerBook2,1")) { |
2443 | par->pll_limits.mclk = 70; | 2446 | par->pll_limits.mclk = 70; |
2444 | par->pll_limits.xclk = 53; | 2447 | par->pll_limits.xclk = 53; |
2445 | } | 2448 | } |
@@ -2659,7 +2662,7 @@ static int __devinit aty_init(struct fb_info *info) | |||
2659 | FBINFO_HWACCEL_YPAN; | 2662 | FBINFO_HWACCEL_YPAN; |
2660 | 2663 | ||
2661 | #ifdef CONFIG_PMAC_BACKLIGHT | 2664 | #ifdef CONFIG_PMAC_BACKLIGHT |
2662 | if (M64_HAS(G3_PB_1_1) && machine_is_compatible("PowerBook1,1")) { | 2665 | if (M64_HAS(G3_PB_1_1) && of_machine_is_compatible("PowerBook1,1")) { |
2663 | /* | 2666 | /* |
2664 | * these bits let the 101 powerbook | 2667 | * these bits let the 101 powerbook |
2665 | * wake up from sleep -- paulus | 2668 | * wake up from sleep -- paulus |
@@ -2690,9 +2693,9 @@ static int __devinit aty_init(struct fb_info *info) | |||
2690 | if (M64_HAS(G3_PB_1024x768)) | 2693 | if (M64_HAS(G3_PB_1024x768)) |
2691 | /* G3 PowerBook with 1024x768 LCD */ | 2694 | /* G3 PowerBook with 1024x768 LCD */ |
2692 | default_vmode = VMODE_1024_768_60; | 2695 | default_vmode = VMODE_1024_768_60; |
2693 | else if (machine_is_compatible("iMac")) | 2696 | else if (of_machine_is_compatible("iMac")) |
2694 | default_vmode = VMODE_1024_768_75; | 2697 | default_vmode = VMODE_1024_768_75; |
2695 | else if (machine_is_compatible("PowerBook2,1")) | 2698 | else if (of_machine_is_compatible("PowerBook2,1")) |
2696 | /* iBook with 800x600 LCD */ | 2699 | /* iBook with 800x600 LCD */ |
2697 | default_vmode = VMODE_800_600_60; | 2700 | default_vmode = VMODE_800_600_60; |
2698 | else | 2701 | else |
@@ -3104,7 +3107,7 @@ static int __devinit atyfb_setup_sparc(struct pci_dev *pdev, | |||
3104 | } | 3107 | } |
3105 | 3108 | ||
3106 | dp = pci_device_to_OF_node(pdev); | 3109 | dp = pci_device_to_OF_node(pdev); |
3107 | if (node == dp->node) { | 3110 | if (node == dp->phandle) { |
3108 | struct fb_var_screeninfo *var = &default_var; | 3111 | struct fb_var_screeninfo *var = &default_var; |
3109 | unsigned int N, P, Q, M, T, R; | 3112 | unsigned int N, P, Q, M, T, R; |
3110 | u32 v_total, h_total; | 3113 | u32 v_total, h_total; |
@@ -3276,7 +3279,7 @@ static void __devinit aty_init_lcd(struct atyfb_par *par, u32 bios_base) | |||
3276 | txtformat = "24 bit interface"; | 3279 | txtformat = "24 bit interface"; |
3277 | break; | 3280 | break; |
3278 | default: | 3281 | default: |
3279 | txtformat = "unkown format"; | 3282 | txtformat = "unknown format"; |
3280 | } | 3283 | } |
3281 | } else { | 3284 | } else { |
3282 | switch (format & 7) { | 3285 | switch (format & 7) { |
@@ -3299,7 +3302,7 @@ static void __devinit aty_init_lcd(struct atyfb_par *par, u32 bios_base) | |||
3299 | txtformat = "262144 colours (FDPI-2 mode)"; | 3302 | txtformat = "262144 colours (FDPI-2 mode)"; |
3300 | break; | 3303 | break; |
3301 | default: | 3304 | default: |
3302 | txtformat = "unkown format"; | 3305 | txtformat = "unknown format"; |
3303 | } | 3306 | } |
3304 | } | 3307 | } |
3305 | PRINTKI("%s%s %s monitor detected: %s\n", | 3308 | PRINTKI("%s%s %s monitor detected: %s\n", |
diff --git a/drivers/video/aty/mach64_cursor.c b/drivers/video/aty/mach64_cursor.c index 04c710804bb0..2ba8b3c421a1 100644 --- a/drivers/video/aty/mach64_cursor.c +++ b/drivers/video/aty/mach64_cursor.c | |||
@@ -2,7 +2,6 @@ | |||
2 | * ATI Mach64 CT/VT/GT/LT Cursor Support | 2 | * ATI Mach64 CT/VT/GT/LT Cursor Support |
3 | */ | 3 | */ |
4 | 4 | ||
5 | #include <linux/slab.h> | ||
6 | #include <linux/fb.h> | 5 | #include <linux/fb.h> |
7 | #include <linux/init.h> | 6 | #include <linux/init.h> |
8 | #include <linux/string.h> | 7 | #include <linux/string.h> |
diff --git a/drivers/video/aty/radeon_backlight.c b/drivers/video/aty/radeon_backlight.c index 1a056adb61c8..256966e9667d 100644 --- a/drivers/video/aty/radeon_backlight.c +++ b/drivers/video/aty/radeon_backlight.c | |||
@@ -12,6 +12,7 @@ | |||
12 | 12 | ||
13 | #include "radeonfb.h" | 13 | #include "radeonfb.h" |
14 | #include <linux/backlight.h> | 14 | #include <linux/backlight.h> |
15 | #include <linux/slab.h> | ||
15 | 16 | ||
16 | #ifdef CONFIG_PMAC_BACKLIGHT | 17 | #ifdef CONFIG_PMAC_BACKLIGHT |
17 | #include <asm/backlight.h> | 18 | #include <asm/backlight.h> |
@@ -134,6 +135,7 @@ static struct backlight_ops radeon_bl_data = { | |||
134 | 135 | ||
135 | void radeonfb_bl_init(struct radeonfb_info *rinfo) | 136 | void radeonfb_bl_init(struct radeonfb_info *rinfo) |
136 | { | 137 | { |
138 | struct backlight_properties props; | ||
137 | struct backlight_device *bd; | 139 | struct backlight_device *bd; |
138 | struct radeon_bl_privdata *pdata; | 140 | struct radeon_bl_privdata *pdata; |
139 | char name[12]; | 141 | char name[12]; |
@@ -155,7 +157,10 @@ void radeonfb_bl_init(struct radeonfb_info *rinfo) | |||
155 | 157 | ||
156 | snprintf(name, sizeof(name), "radeonbl%d", rinfo->info->node); | 158 | snprintf(name, sizeof(name), "radeonbl%d", rinfo->info->node); |
157 | 159 | ||
158 | bd = backlight_device_register(name, rinfo->info->dev, pdata, &radeon_bl_data); | 160 | memset(&props, 0, sizeof(struct backlight_properties)); |
161 | props.max_brightness = FB_BACKLIGHT_LEVELS - 1; | ||
162 | bd = backlight_device_register(name, rinfo->info->dev, pdata, | ||
163 | &radeon_bl_data, &props); | ||
159 | if (IS_ERR(bd)) { | 164 | if (IS_ERR(bd)) { |
160 | rinfo->info->bl_dev = NULL; | 165 | rinfo->info->bl_dev = NULL; |
161 | printk("radeonfb: Backlight registration failed\n"); | 166 | printk("radeonfb: Backlight registration failed\n"); |
@@ -175,9 +180,9 @@ void radeonfb_bl_init(struct radeonfb_info *rinfo) | |||
175 | 180 | ||
176 | #ifdef CONFIG_PMAC_BACKLIGHT | 181 | #ifdef CONFIG_PMAC_BACKLIGHT |
177 | pdata->negative = pdata->negative || | 182 | pdata->negative = pdata->negative || |
178 | machine_is_compatible("PowerBook4,3") || | 183 | of_machine_is_compatible("PowerBook4,3") || |
179 | machine_is_compatible("PowerBook6,3") || | 184 | of_machine_is_compatible("PowerBook6,3") || |
180 | machine_is_compatible("PowerBook6,5"); | 185 | of_machine_is_compatible("PowerBook6,5"); |
181 | #endif | 186 | #endif |
182 | 187 | ||
183 | rinfo->info->bl_dev = bd; | 188 | rinfo->info->bl_dev = bd; |
@@ -185,7 +190,6 @@ void radeonfb_bl_init(struct radeonfb_info *rinfo) | |||
185 | 63 * FB_BACKLIGHT_MAX / MAX_RADEON_LEVEL, | 190 | 63 * FB_BACKLIGHT_MAX / MAX_RADEON_LEVEL, |
186 | 217 * FB_BACKLIGHT_MAX / MAX_RADEON_LEVEL); | 191 | 217 * FB_BACKLIGHT_MAX / MAX_RADEON_LEVEL); |
187 | 192 | ||
188 | bd->props.max_brightness = FB_BACKLIGHT_LEVELS - 1; | ||
189 | bd->props.brightness = bd->props.max_brightness; | 193 | bd->props.brightness = bd->props.max_brightness; |
190 | bd->props.power = FB_BLANK_UNBLANK; | 194 | bd->props.power = FB_BLANK_UNBLANK; |
191 | backlight_update_status(bd); | 195 | backlight_update_status(bd); |
diff --git a/drivers/video/aty/radeon_monitor.c b/drivers/video/aty/radeon_monitor.c index b4d4b88afc09..9261c918fde8 100644 --- a/drivers/video/aty/radeon_monitor.c +++ b/drivers/video/aty/radeon_monitor.c | |||
@@ -1,4 +1,7 @@ | |||
1 | #include "radeonfb.h" | 1 | #include "radeonfb.h" |
2 | |||
3 | #include <linux/slab.h> | ||
4 | |||
2 | #include "../edid.h" | 5 | #include "../edid.h" |
3 | 6 | ||
4 | static struct fb_var_screeninfo radeonfb_default_var = { | 7 | static struct fb_var_screeninfo radeonfb_default_var = { |