aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/aty/atyfb_base.c
diff options
context:
space:
mode:
authorAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
committerAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
commitada47b5fe13d89735805b566185f4885f5a3f750 (patch)
tree644b88f8a71896307d71438e9b3af49126ffb22b /drivers/video/aty/atyfb_base.c
parent43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff)
parent3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff)
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/video/aty/atyfb_base.c')
-rw-r--r--drivers/video/aty/atyfb_base.c21
1 files changed, 12 insertions, 9 deletions
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
2233static void aty_bl_init(struct atyfb_par *par) 2233static 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",