aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/aty/aty128fb.c
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@rpsys.net>2007-03-03 12:43:52 -0500
committerRichard Purdie <rpurdie@rpsys.net>2007-03-05 03:49:38 -0500
commit202d4e602555e68c2bc71775228876b0356785c8 (patch)
treee47c4013016e21a231b9d2873a2d75aa2750c5fe /drivers/video/aty/aty128fb.c
parent238576e12fef1d52751c6e08db2d0bdb0e248caf (diff)
backlight: Allow enable/disable of fb backlights, fixing regressions
Enabling the backlight by default appears to cause problems for many users. This patch disables backlight controls unless explicitly enabled by users via a module parameter. Since PMAC users are known to work, default to enabled in that case. Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
Diffstat (limited to 'drivers/video/aty/aty128fb.c')
-rw-r--r--drivers/video/aty/aty128fb.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c
index 8726c3669713..e86d7e0c9825 100644
--- a/drivers/video/aty/aty128fb.c
+++ b/drivers/video/aty/aty128fb.c
@@ -357,6 +357,12 @@ static int default_lcd_on __devinitdata = 1;
357static int mtrr = 1; 357static int mtrr = 1;
358#endif 358#endif
359 359
360#ifdef CONFIG_PMAC_BACKLIGHT
361static int backlight __devinitdata = 1;
362#else
363static int backlight __devinitdata = 0;
364#endif
365
360/* PLL constants */ 366/* PLL constants */
361struct aty128_constants { 367struct aty128_constants {
362 u32 ref_clk; 368 u32 ref_clk;
@@ -1652,6 +1658,9 @@ static int __devinit aty128fb_setup(char *options)
1652 } else if (!strncmp(this_opt, "crt:", 4)) { 1658 } else if (!strncmp(this_opt, "crt:", 4)) {
1653 default_crt_on = simple_strtoul(this_opt+4, NULL, 0); 1659 default_crt_on = simple_strtoul(this_opt+4, NULL, 0);
1654 continue; 1660 continue;
1661 } else if (!strncmp(this_opt, "backlight:", 10)) {
1662 backlight = simple_strtoul(this_opt+10, NULL, 0);
1663 continue;
1655 } 1664 }
1656#ifdef CONFIG_MTRR 1665#ifdef CONFIG_MTRR
1657 if(!strncmp(this_opt, "nomtrr", 6)) { 1666 if(!strncmp(this_opt, "nomtrr", 6)) {
@@ -1985,7 +1994,8 @@ static int __devinit aty128_init(struct pci_dev *pdev, const struct pci_device_i
1985 par->lock_blank = 0; 1994 par->lock_blank = 0;
1986 1995
1987#ifdef CONFIG_FB_ATY128_BACKLIGHT 1996#ifdef CONFIG_FB_ATY128_BACKLIGHT
1988 aty128_bl_init(par); 1997 if (backlight)
1998 aty128_bl_init(par);
1989#endif 1999#endif
1990 2000
1991 if (register_framebuffer(info) < 0) 2001 if (register_framebuffer(info) < 0)