diff options
author | Richard Purdie <rpurdie@rpsys.net> | 2007-03-03 17:43:52 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@rpsys.net> | 2007-03-05 08:49:38 +0000 |
commit | 202d4e602555e68c2bc71775228876b0356785c8 (patch) | |
tree | e47c4013016e21a231b9d2873a2d75aa2750c5fe /drivers/video/nvidia | |
parent | 238576e12fef1d52751c6e08db2d0bdb0e248caf (diff) | |
download | linux-202d4e602555e68c2bc71775228876b0356785c8.tar.bz2 |
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/nvidia')
-rw-r--r-- | drivers/video/nvidia/nvidia.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/video/nvidia/nvidia.c b/drivers/video/nvidia/nvidia.c index c18e9557ca30..b97ec6901263 100644 --- a/drivers/video/nvidia/nvidia.c +++ b/drivers/video/nvidia/nvidia.c @@ -83,6 +83,11 @@ static int bpp __devinitdata = 8; #ifdef CONFIG_MTRR static int nomtrr __devinitdata = 0; #endif +#ifdef CONFIG_PMAC_BACKLIGHT +static int backlight __devinitdata = 1; +#else +static int backlight __devinitdata = 0; +#endif static char *mode_option __devinitdata = NULL; @@ -1311,7 +1316,10 @@ static int __devinit nvidiafb_probe(struct pci_dev *pd, nvidia_save_vga(par, &par->SavedReg); pci_set_drvdata(pd, info); - nvidia_bl_init(par); + + if (backlight) + nvidia_bl_init(par); + if (register_framebuffer(info) < 0) { printk(KERN_ERR PFX "error registering nVidia framebuffer\n"); goto err_out_iounmap_fb; @@ -1408,6 +1416,8 @@ static int __devinit nvidiafb_setup(char *options) paneltweak = simple_strtoul(this_opt+11, NULL, 0); } else if (!strncmp(this_opt, "vram:", 5)) { vram = simple_strtoul(this_opt+5, NULL, 0); + } else if (!strncmp(this_opt, "backlight:", 10)) { + backlight = simple_strtoul(this_opt+10, NULL, 0); #ifdef CONFIG_MTRR } else if (!strncmp(this_opt, "nomtrr", 6)) { nomtrr = 1; |