https://bugzilla.kernel.org/show_bug.cgi?id=36322
--- Comment #12 from Joern Heissler <kernelb...@joern.heissler.de> 2011-06-03 06:33:36 --- I did some reverse engineering and trying. Here are my results and some thoughts: Calling _SB.PCI0.LPCB.EC0.BRXP "activates" the brightness which is set in the BLVL. The DSDT contains this code three times: If (LAnd (LLess (OSYS, 0x07D6), LEqual (SGST, Zero))) { BRXP () } Else { ... } OSYS on my machine is 0x07D9 ("Windows 2009"), while there is 0x03E8 ("Linux") available in the os setup (_INI). SGST, whatever that may be, is currently 0. After changing OSYS to 0x03E8, backlight control works. Now the question remains: How does Windows do it? PNLT = { 0x17, 0x2E, 0x45, 0x5C, 0x6B, 0x8F, 0xAA, 0xC5, 0xE6, 0xFF }; BRXP is called from within my DSDT only in _WAK (acpi wakeup) and from _Q8E, _Q8F. All three do the above check. Method (BRXP, 0, NotSerialized) { Multiply (DerefOf (Index (PNLT, BLVL)), 0x64, Local1) Divide (Local1, 0x0100, , Local2) ^^^GFX0.AINT (One, Local2) } So let's look for AINT. Only BRXP calls this method. AINT, stripped down, is: PARD() Store (Divide (Multiply (Arg1, 0xFF), 0x64, ), BCLP) Or (BCLP, 0x80000000, BCLP) Store (0x02, ASLC) Store (One, ASLE) The ISBC method looks very similar to this code and is the only other method which touches those three registers. Only AJBC calls ISBC. When PWSF (what's that?) is set and Windows is older than 2009, some fixed backlight value is automatically set. Maybe it's that feature which darkens the LCD when the user is idle? For Win2k9, NBTP is called with different values, probably the requested percentage of brightness. NBTP contains loops, sleeps, etc., but no code to update the brightness. I don't really understand what it does, but I guess that it causes a cool effect where the brightness is not stepped to the new value but changes smoothly? It probably notifies the OS to update the brightness using ISBC or BRXP. For fun, I've written a small method to get such a cool effect which first darkens my LCD and then increases brightness to maximum again: DefinitionBlock ("", "SSDT", 1, "", "", 0x20080715) { External (\_SB.PCI0.ISBC, MethodObj) Method (XXXX, 0, NotSerialized) { Store (255, Local0) While (LNotEqual(Local0, 0)) { \_SB.PCI0.ISBC (Local0) Sleep(4) Decrement (Local0) } \_SB.PCI0.ISBC(Local0) Sleep(1000) While (LNotEqual(Local0, 256)) { \_SB.PCI0.ISBC(Local0) Sleep(4) Increment (Local0) } } } It works :-) I still don't know the correct way to set the brightness. * Use the "Linux" OSYS? * Call BRXP after each change to the brightness? * Call ISBC? This would be cool because you don't have 10 but 256 different states. I hope that this helps you with updating the driver. -- Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. ------------------------------------------------------------------------------ Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Discover what all the cheering's about. Get your free trial download today. http://p.sf.net/sfu/quest-dev2dev2 _______________________________________________ acpi-bugzilla mailing list acpi-bugzilla@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/acpi-bugzilla