[Pommed-commits] r403 - trunk/pommed/mactel

jblache at alioth.debian.org jblache at alioth.debian.org
Sat Dec 1 16:51:53 UTC 2007


Author: jblache
Date: 2007-12-01 16:51:53 +0000 (Sat, 01 Dec 2007)
New Revision: 403

Modified:
   trunk/pommed/mactel/gma950_backlight.c
Log:
Fix max backlight value for GMA950.


Modified: trunk/pommed/mactel/gma950_backlight.c
===================================================================
--- trunk/pommed/mactel/gma950_backlight.c	2007-12-01 16:35:07 UTC (rev 402)
+++ trunk/pommed/mactel/gma950_backlight.c	2007-12-01 16:51:53 UTC (rev 403)
@@ -25,13 +25,13 @@
  *
  * The GMA950 has a backlight control register at offset 0x00061254 in its
  * PCI memory space (512K region):
- *  - bits 0-7 represent the backlight value, 0x00 to 0xff
- *  - bits 8-15 look unused (and should be 0)
- *  - bits 16-31 are not to be touched (backlight duty cycle)
+ *  - bits 0-15 represent the backlight value, 0x00 to 0xff
+ *  - bits 16 indicates legacy mode is in use when set
+ *  - bits 17-31 hold the max backlight value / 2
  *
  * Bit 16 indicates whether the backlight control should be used in legacy
  * mode or not. This bit is 0 on MacBooks, indicating native mode should be
- * used.
+ * used. This is the only method supported here.
  */
 
 #include <stdio.h>
@@ -94,7 +94,7 @@
 static unsigned int
 gma950_backlight_get_max(void)
 {
-  return (INREG(REGISTER_OFFSET) >> 17);
+  return (INREG(REGISTER_OFFSET) >> 17) * 2;
 }
 
 static void




More information about the Pommed-commits mailing list