December 21st, 2006

i830 is hard, let's go shopping

Spent some time again with my nemesis, the i830 laptop. With our new native modesetting, we have to know how to program every output chip on every system, and before the 915G there were a lot of chips. For the desktop ADD cards, this hasn't been hard -- look at the name on the chip, go look up the open documentation, implement, done. For laptops, it's a little uglier -- I can't see the chip without tearing the machine apart. And given that this machine is already rather flimsy, I wasn't too excited about tearing it apart and hoping it's fine after getting it back together.

I thought these laptops had Chrontel 7017 parts, generally. So a while ago, I tried writing a driver for that chip. I started it up, and I got no probe from the hardware. Hmm.

Well, I've got some BIOS source code, and each of the add-in drivers has a few strings in it. So I dumped the bios with some handy code I had, and ran strings over it. I found an instance of "ivch" and none of the other strings from drivers I had code for. So it seemed like a good guess. I found published docs, whipped up a driver, and got no probe again.

So we tried tracing what the BIOS did using mjg59/airlied's neat little tool. Unfortunately, the old driver doesn't use the same mechanism to talk to the graphics chip, so the log of the trace was rather short and uninteresting.

Then I decided to just see if I could get anything from I2C. I wrote code to try to read 1 or 2 bytes from every register of every possible slave device from every GPIO pin pair. And I got... nothing.

So today Keith and I sat down again and tried disassembling the machine's actual BIOS to try to confirm what it was doing. We confirmed that it had the ivch driver, in use, and that it was on the GPIO pair and slave address we initially expected. So we tried to run the BIOS code again just to confirm it still worked, and it can't set a video mode at all any more. And then we tried starting X with the BIOS-based modesetting driver, and that failed too now -- the backlight turns on, but nothing is displayed.

So, I think we killed our i830. Getting this one was hard -- scrounging through FreeGeek's laptop room, and finding one of them in the many 10s of laptops we looked through. I'm not sure where I'm going to get another.