Finally got backlight, all resolutions and external monitor output/detection working on my QXGA T60p (v5200) with 10.6.7
Updated May 12 2011: Dual link DVI output is fully functional too, see bellow.
Backlight By default ATI1600Controller uses 0x5208 as backlight-PWM-freq, which after some convoluted processing in the driver becomes a 0 in LVTMA_BL_MOD_REF_DIV, apparently that doesn't work well for T60p, which usually has values like 0x80 in that field. The result is uneven left-to-right backlight on all but the brightest levels.
Setting backlight-PWM-freq to 0x100 brings the LVTMA_BL_MOD_REF_DIV to 0xF0, which seems to work nicely on my laptop. Please be careful experimenting with it, I don't know if setting this too high or too low might damage your inverter. The following works for my T60p just fine (note that it's little-endian in the plist - 0x00010000) :
Code:
<key>@0,backlight-PWM-freq</key>
<data>
AAEAAA==
</data>
See
http://www.x.org/docs/AMD/RRG-216M56-03oOEM.pdf for the ATI X1600 registers description.
ResolutionsMy QXGA panel is programmed with the following EDID (found here on forums):
Code:
# EDID version 1 revision 3
Section "Monitor"
# Block type: 2:0 3:f
# Block type: 2:0 3:fe
Identifier "LEN:4940"
VendorName "LEN"
ModelName "LEN:4940"
# Block type: 2:0 3:f
# Block type: 2:0 3:fe
# DPMS capabilities: Active off:yes Suspend:yes Standby:yes
Mode "2048x1536" # vfreq 50.088Hz, hfreq 77.185kHz
DotClock 164.250000
HTimings 2048 2080 2096 2128
VTimings 1536 1537 1540 1541
Flags "-HSync" "-VSync"
EndMode
Mode "2048x1536" # vfreq 50.467Hz, hfreq 77.770kHz
DotClock 164.250000
HTimings 2048 2080 2096 2112
VTimings 1536 1537 1540 1541
Flags "-HSync" "-VSync"
EndMode
# Block type: 2:0 3:f
# Block type: 2:0 3:fe
EndSection
It doesn't have maximum HorizSync, VertRefresh and Dot Clock specified. So ATI driver can't figure out proper timing for all derived resolutions.
Replacing this EDID with a fixed stock one, which has all the information, completely solves the problem.
Code:
00 FF FF FF FF FF FF 00 24 94 CE 22 00 00 00 00
00 00 01 03 80 1E 17 78 0A CD 71 91 55 4F 8B 26
21 54 56 00 00 00 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 29 40 00 60 80 00 13 60 10 10
11 00 30 E4 10 00 00 1E 00 00 00 FD 00 30 32 4C
4D 11 00 0A 20 20 20 20 20 20 00 00 00 0F 00 A9
43 32 A9 43 28 14 02 0A 0A 0A 0A 0A 00 00 00 FE
00 49 41 51 58 31 30 0A 20 20 20 20 20 20 00 3D
Code:
Section "Monitor"
# Block type: 2:0 3:fd
# Block type: 2:0 3:f
# Block type: 2:0 3:fe
Identifier "IDT:ce22"
VendorName "IDT"
ModelName "IDT:ce22"
# Block type: 2:0 3:fd
HorizSync 76-77
VertRefresh 48-50
# Max dot clock (video bandwidth) 170 MHz
# Block type: 2:0 3:f
# Block type: 2:0 3:fe
# DPMS capabilities: Active off:no Suspend:no Standby:no
Mode "2048x1536" # vfreq 49.266Hz, hfreq 76.609kHz
DotClock 164.250000
HTimings 2048 2064 2080 2144
VTimings 1536 1537 1538 1555
Flags "+HSync" "+VSync"
EndMode
# Block type: 2:0 3:fd
# Block type: 2:0 3:f
# Block type: 2:0 3:fe
EndSection
So, to make all derived resolutions work, put the missing information into your EDID and add it as shown bellow to your ATI parameters.
Code:
<key>AAPL00,override-has-edid-digital</key>
<data>
AP///////wAklM4iAAAAAAAAAQOAHhd4Cs1xkVVPiyYhVFYAAAABAQEBAQEB
AQEBAQEBAQEBKUAAYIAAE2AQEBEAMOQQAAAeAAAA/QAwMkxNEQAKICAgICAg
AAAADwCpQzKpQygUAgoKCgoKAAAA/gBJQVFYMTAKICAgICAgAD0=
</data>
External monitor detection (VGA only for now)This one requires ATIFramebuffer.kext patching.
Here is a quote from bcc9
Quote:
"The problem:
Under OSX the ATI driver uses a hard-coded set of personalities to define some of the video card's capabilities, most notably the connector layout. This is sufficient to support the limited number of configurations that Apple ships, but leads to non-working monitors (black displays) in many hackintosh configurations. Users have limited success & limited functionality by simply guessing which hard-coded personality best matches their video card."
See his post for more info:
http://www.insanelymac.com/forum/index. ... ed&start=0Apparently ATI,Wormy personality in ATIFramebufer has the following ConnectorInfo
Code:
0000000 02 00 00 00 40 00 00 00 29 00 00 00 00 01 01 03
0000010 04 00 00 00 16 00 00 00 00 00 00 00 00 10 02 01
Which makes the ATI drivers think that VGA port is connected to DAC B, when in fact it is connected to DAC A. So when the monitor is attached/detached OSX turns on and off the wrong DAC. If monitor was there at the power-on the correct DAC is initialized by the BIOS and is never touched by the ATI driver after that.
Changing 0x10 to 0x00 solves the problem. Now the external monitor detection and output works even if the monitor wasn't there at power-on.
Code:
0000000 02 00 00 00 40 00 00 00 29 00 00 00 00 01 01 03
0000010 04 00 00 00 16 00 00 00 00 00 00 00 00 00 02 01
The DVI output will probably require a little bit more hacking, perhaps someone else could have a look at it, as I just don't have means to test it at this point.
Update May 12, 2011:Got the DVI output working. Sometimes there is no output signal on DVI connector after reboot, though a monitor is properly detected. Reconnecting the monitor or turning Mirroring on and off usually fixes the issue.
The ATY,Wormy personality has only 2 ConnectorInfo's. The DVI output is on 3rd. So we need to pick another personality if we want DVI.
I used ATY,Flicker. To do it I set @0,name, @1,name and @2,name to ATY,Flicker and removed all x@,compatible settings. In the ATIFramebufer
I copied two Wormy ConnectorInfo's over Flipper's ones, and created a third one for DVI:
Code:
Personality: Flicker
ConnectorInfo count in decimal: 3
Disk offset in decimal 225336
0000000 02 00 00 00 40 00 00 00 29 00 00 00 00 01 01 03
0000010 04 00 00 00 16 00 00 00 00 00 00 00 00 00 02 01
0000020 04 00 00 00 16 00 00 00 00 00 00 00 00 10 03 02
Also I replaced references to Wormy with references to Flicker in the ATIFramebuferr's Info.plist. Though this step is optional.
You can download the patched ATIFramebuffer.kext with my com.apple.Boot.plist and ATI.plist from
https://rapidshare.com/files/856477928/ ... 10.6.7.zipNote that you need to remove my EDID from ati plist and change the Graphics mode in the boot plist if you don't have a QXGA panel.
Enjoy,
Bgm.