diff options
author | Richard Purdie <rpurdie@rpsys.net> | 2007-03-03 12:43:52 -0500 |
---|---|---|
committer | Richard Purdie <rpurdie@rpsys.net> | 2007-03-05 03:49:38 -0500 |
commit | 202d4e602555e68c2bc71775228876b0356785c8 (patch) | |
tree | e47c4013016e21a231b9d2873a2d75aa2750c5fe /drivers/video/riva | |
parent | 238576e12fef1d52751c6e08db2d0bdb0e248caf (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/riva')
-rw-r--r-- | drivers/video/riva/fbdev.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/video/riva/fbdev.c b/drivers/video/riva/fbdev.c index f8a3d608b208..1d1c7c624d7f 100644 --- a/drivers/video/riva/fbdev.c +++ b/drivers/video/riva/fbdev.c | |||
@@ -215,6 +215,11 @@ static int noaccel __devinitdata = 0; | |||
215 | #ifdef CONFIG_MTRR | 215 | #ifdef CONFIG_MTRR |
216 | static int nomtrr __devinitdata = 0; | 216 | static int nomtrr __devinitdata = 0; |
217 | #endif | 217 | #endif |
218 | #ifdef CONFIG_PMAC_BACKLIGHT | ||
219 | static int backlight __devinitdata = 1; | ||
220 | #else | ||
221 | static int backlight __devinitdata = 0; | ||
222 | #endif | ||
218 | 223 | ||
219 | static char *mode_option __devinitdata = NULL; | 224 | static char *mode_option __devinitdata = NULL; |
220 | static int strictmode = 0; | 225 | static int strictmode = 0; |
@@ -2059,7 +2064,10 @@ static int __devinit rivafb_probe(struct pci_dev *pd, | |||
2059 | info->monspecs.modedb = NULL; | 2064 | info->monspecs.modedb = NULL; |
2060 | 2065 | ||
2061 | pci_set_drvdata(pd, info); | 2066 | pci_set_drvdata(pd, info); |
2062 | riva_bl_init(info->par); | 2067 | |
2068 | if (backlight) | ||
2069 | riva_bl_init(info->par); | ||
2070 | |||
2063 | ret = register_framebuffer(info); | 2071 | ret = register_framebuffer(info); |
2064 | if (ret < 0) { | 2072 | if (ret < 0) { |
2065 | printk(KERN_ERR PFX | 2073 | printk(KERN_ERR PFX |
@@ -2157,6 +2165,8 @@ static int __init rivafb_setup(char *options) | |||
2157 | forceCRTC = -1; | 2165 | forceCRTC = -1; |
2158 | } else if (!strncmp(this_opt, "flatpanel", 9)) { | 2166 | } else if (!strncmp(this_opt, "flatpanel", 9)) { |
2159 | flatpanel = 1; | 2167 | flatpanel = 1; |
2168 | } else if (!strncmp(this_opt, "backlight:", 10)) { | ||
2169 | backlight = simple_strtoul(this_opt+10, NULL, 0); | ||
2160 | #ifdef CONFIG_MTRR | 2170 | #ifdef CONFIG_MTRR |
2161 | } else if (!strncmp(this_opt, "nomtrr", 6)) { | 2171 | } else if (!strncmp(this_opt, "nomtrr", 6)) { |
2162 | nomtrr = 1; | 2172 | nomtrr = 1; |