Re: Brightness and Contrast controls on iMacs
Benjamin Herrenschmidt wrote:
> On Fri, 2003-01-10 at 11:14, Scott McMahan wrote:
> > I'm looking for a way to adjust the screen settings on my iMac. I've
> > search the list/newsgroups and the answers I've found don't work on CRTs
> > (fblevel) or don't really address the right problem (xgamma). Is there
> > a utility available to handle this problem? If not, is anyone working
> > on one? If not, can anyone help point me in the right direction so I
> > can start working on one?
> My understanding is that the screen (brightness, contrast, power
> management and geometry) on iMacs is handled by tapping an i2c
> device. On some iMacs, it's on one of the PMU i2c busses, I'm not
> too sure about older iMacs, it's either on Cuda or on the video
> card's i2c bus.
> There is no real support for PMU i2c currently in the kernel,
> though you can eventually try to feed PMU i2c commands via
> /dev/adb, though I'm not completely sure you'll get the replies
> properly, that's something I have to investigate.
You can send a request and then poll for a reply. Not sure if it works
via /dev/adb, but I think it will (i2c isn't very timing sensitive :) )
Bit 0x08 of byte 0x0e of the system config says if you have such a crt
controller (all UMA iMacs and eMacs do).
The controller is at i2c address 8c, with an eeprom at a6; the eMac has
an additional thingy at 98. All at pmu i2c bus 2. The commands you send
it are two bytes: register, value. That's about all I can remember
offhand. So you send the pmu something like
9a 09 02 00 00 8c 00 00 02 reg val
and read back two bytes for status.
> Most of the informations about the device itself can be found
> in Darwin's source AppleOnboardDisplay module.
Thanks! I'll go read that.