patch-2.4.0-test9 linux/drivers/video/chipsfb.c
Next file: linux/drivers/video/controlfb.c
Previous file: linux/drivers/video/atyfb.c
Back to the patch index
Back to the overall index
- Lines: 44
- Date:
Sun Sep 17 09:48:05 2000
- Orig file:
v2.4.0-test8/linux/drivers/video/chipsfb.c
- Orig date:
Fri Aug 4 18:06:34 2000
diff -u --recursive --new-file v2.4.0-test8/linux/drivers/video/chipsfb.c linux/drivers/video/chipsfb.c
@@ -35,6 +35,9 @@
#include <asm/io.h>
#include <asm/prom.h>
#include <asm/pci-bridge.h>
+#ifdef CONFIG_PMAC_BACKLIGHT
+#include <asm/backlight.h>
+#endif
#include <linux/adb.h>
#include <linux/pmu.h>
@@ -245,7 +248,9 @@
// used to disable backlight only for blank > 1, but it seems
// useful at blank = 1 too (saves battery, extends backlight life)
if (blank) {
- pmu_enable_backlight(0);
+#ifdef CONFIG_PMAC_BACKLIGHT
+ set_backlight_enable(0);
+#endif /* CONFIG_PMAC_BACKLIGHT */
/* get the palette from the chip */
for (i = 0; i < 256; ++i) {
out_8(p->io_base + 0x3c7, i);
@@ -262,7 +267,9 @@
out_8(p->io_base + 0x3c9, 0);
}
} else {
- pmu_enable_backlight(1);
+#ifdef CONFIG_PMAC_BACKLIGHT
+ set_backlight_enable(1);
+#endif /* CONFIG_PMAC_BACKLIGHT */
for (i = 0; i < 256; ++i) {
out_8(p->io_base + 0x3c8, i);
udelay(1);
@@ -673,8 +680,10 @@
/* Clear the entire framebuffer */
memset(p->frame_buffer, 0, 0x100000);
+#ifdef CONFIG_PMAC_BACKLIGHT
/* turn on the backlight */
- pmu_enable_backlight(1);
+ set_backlight_enable(1);
+#endif /* CONFIG_PMAC_BACKLIGHT */
init_chips(p);
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)