- Joined
- Aug 1, 2012
- Messages
- 691
- Motherboard
- Asus ProArt Z690 Creator
- CPU
- i7-13700K
- Graphics
- RX 6800 XT
- Mac
- Mobile Phone
Enabling 5K display with ATI Radeon RX480/580
As matter of fact I’ve always been driven by a desire to have a 5K monitor working in a multi display configuration. Since last year I’ve jumped on the red ATI bandwagon and, in doing so, all my efforts have been moved towards ATI GPUs.
My HW test configuration is the following:
• SKU GA Z170-HD3 DDR3
• GPU PowerColor Radeon RX480 8GB Red Devil
• GPU (alternate) PowerColor Radeon RX580 8GB Red Devil Golden Sample (it's coming...)
• CPU Intel Kaby Lake I7-7700K
• HP Z27Q 5K
Following the guides here and here and using tools provided in the 1st posts of each guide I made all my homework and got the complete dump of the necessary infos regarding my RX480:
where from left to right we have:
- 01 [DISPLAY_PORT] (top)
- 02 [DISPLAY_PORT] (middle)
- 03 [DISPLAY_PORT] (bottom)
- 04 [HDMI_TYPE_A]
- on the second row 05 [DVI_TYPE_D]
01 [DISPLAY_PORT] (top)
redsock_bios_decoder :
enc obj id [0x21] txmit [0x12] duallink [0x2] enc [0x4]
radeon_bios_decode :
Connector at index 0
Type [@offset 40862]: DisplayPort (10)
Encoder [@offset 40866]: INTERNAL_UNIPHY2 (0x21)
i2cid [@offset 40972]: 0x90, OSX senseid: 0x1
HotPlugID: 06
Code Costruction: 12 04 06 01
=========================================================
02 [DISPLAY_PORT] (middle)
redsock_bios_decoder :
encoder obj id [0x21] txmit [0x22] duallink [0x2] enc [0x5]
radeon_bios_decode :
Connector at index 1
Type [@offset 40872]: DisplayPort (10)
Encoder [@offset 40876]: INTERNAL_UNIPHY2 (0x21)
i2cid [@offset 40999]: 0x92, OSX senseid: 0x3
HotPlugID: 04
Code Costruction: 22 05 04 03
=========================================================
03 [DISPLAY_PORT] (bottom)
redsock_bios_decoder :
encoder obj id [0x20] txmit [0x11] duallink [0x1] enc [0x2]
radeon_bios_decode :
Connector at index 2
Type [@offset 40882]: DisplayPort (10)
Encoder [@offset 40886]: INTERNAL_UNIPHY1 (0x20)
i2cid [@offset 41026]: 0x91, OSX senseid: 0x2
HotPlugID: 01
Code Costruction: 11 02 01 02
=========================================================
04 [HDMI_TYPE_A]
redsock_bios_decoder :
encoder obj id [0x20] txmit [0x21] duallink [0x1] enc [0x3]
radeon_bios_decode :
Connector at index 3
Type [@offset 40892]: HDMI-A (11)
Encoder [@offset 40896]: INTERNAL_UNIPHY1 (0x20)
i2cid [@offset 41053]: 0x93, OSX senseid: 0x4
HotPlugID: 05
Code Costruction: 21 03 05 04
===========================================================
05 [DVI_TYPE_D]
redsock_bios_decoder :
encoder obj id [0x1e] txmit [0x10] duallink [0x0] enc [0x0]
radeon_bios_decode :
Connector at index 4
Type [@offset 40902]: DVI-D (3)
Encoder [@offset 40906]: INTERNAL_UNIPHY (0x1e)
i2cid [@offset 41080]: 0x95, OSX senseid: 0x6
HotPlugID: 03
Code Costruction: 10 00 03 06
=========================== END ============================
redsock_bios_decoder :
enc obj id [0x21] txmit [0x12] duallink [0x2] enc [0x4]
radeon_bios_decode :
Connector at index 0
Type [@offset 40862]: DisplayPort (10)
Encoder [@offset 40866]: INTERNAL_UNIPHY2 (0x21)
i2cid [@offset 40972]: 0x90, OSX senseid: 0x1
HotPlugID: 06
Code Costruction: 12 04 06 01
=========================================================
02 [DISPLAY_PORT] (middle)
redsock_bios_decoder :
encoder obj id [0x21] txmit [0x22] duallink [0x2] enc [0x5]
radeon_bios_decode :
Connector at index 1
Type [@offset 40872]: DisplayPort (10)
Encoder [@offset 40876]: INTERNAL_UNIPHY2 (0x21)
i2cid [@offset 40999]: 0x92, OSX senseid: 0x3
HotPlugID: 04
Code Costruction: 22 05 04 03
=========================================================
03 [DISPLAY_PORT] (bottom)
redsock_bios_decoder :
encoder obj id [0x20] txmit [0x11] duallink [0x1] enc [0x2]
radeon_bios_decode :
Connector at index 2
Type [@offset 40882]: DisplayPort (10)
Encoder [@offset 40886]: INTERNAL_UNIPHY1 (0x20)
i2cid [@offset 41026]: 0x91, OSX senseid: 0x2
HotPlugID: 01
Code Costruction: 11 02 01 02
=========================================================
04 [HDMI_TYPE_A]
redsock_bios_decoder :
encoder obj id [0x20] txmit [0x21] duallink [0x1] enc [0x3]
radeon_bios_decode :
Connector at index 3
Type [@offset 40892]: HDMI-A (11)
Encoder [@offset 40896]: INTERNAL_UNIPHY1 (0x20)
i2cid [@offset 41053]: 0x93, OSX senseid: 0x4
HotPlugID: 05
Code Costruction: 21 03 05 04
===========================================================
05 [DVI_TYPE_D]
redsock_bios_decoder :
encoder obj id [0x1e] txmit [0x10] duallink [0x0] enc [0x0]
radeon_bios_decode :
Connector at index 4
Type [@offset 40902]: DVI-D (3)
Encoder [@offset 40906]: INTERNAL_UNIPHY (0x1e)
i2cid [@offset 41080]: 0x95, OSX senseid: 0x6
HotPlugID: 03
Code Costruction: 10 00 03 06
=========================== END ============================
All the necessary dumps and scripts results are in a zip file where everyone can find the hardware details of my PowerColor. it's called Archive.zip.
The second piece of information needed is the correct FB to choose.
Code:
AMD9500Controller — Acre, Dayman, Guariba, Huallaga
0x67E01002 0x67EF1002 0x67FF1002 0x67C01002 0x67DF1002
AMD9510Controller — Berbice
0x67EF1002
AMD9515Controller — Longavi, Mazaruni
0x67EF1002
AMD9520Controller — Caroni, Elqui, Florin
0x67E01002 0x67EF1002 0x67FF1002 0x67C01002 0x67DF1002
AMDRadeonX4100_AMDBaffinGraphicsAccelerator
0x67E01002 0x67FF1002 0x67EF1002
AMDRadeonX4150_AMDBaffinGraphicsAccelerator
0x67E01002 0x67FF1002 0x67EF1002
AMDRadeonX4200_AMDBaffinGraphicsAccelerator
0x67EF1002 0x67FF1002
AMDRadeonX4200_AMDEllesmereGraphicsAccelerator
0x67DF1002 0x67C01002
As you can see the Device ID of my card 0x67DF1002 is present in more than one kext and there are many FBs available for each Kext. After a long long examination I choose to go with Dayman but I've tried extensively also OPM which leads basically to the same results but needs much more modifications.
So i Put in Clover Dayman, Inject ATI, and videoport=5. As you can see here:
and rebooted. Et voilà: 5K is enabled!
The correct resolution is stated in HP OSD panel. And OSX says the same: 5120*2880 HP Z27Q in About this Mac. But there are some caveats which I was not able to solve completely.
- NOT ALL THE DP ports are working at the same time. Only two of them can work simultaneously. I really don't know why and I ask for help to solve this limit. The middle DP (2) seems to be inactive or kind of passive... But more of this later.
- It's fundamental that the 1st DP port of the monitor starts as really as first that's to say 1st from an hardware point of view.
Infact HP Z27Q has the following display modes:
And the main is DP is the HP_DP1 as you can see here at the point number 3. in the next figure:
so HP_DP1 must start before(*) HP_DP2 for having the monitor correctly display 5K res. So you can have plenty of configurations here, all working. I.e. :
GPU_DP1 <-> HP_DP1
GPU_DP2 <-> HP_DP2
or i.e.:
GPU_DP1 <-> HP_DP1
GPU_DP3 <-> HP_DP2
all of them are working.
But unfortunately the left GPU DP is not working, no matter if you connect a 1K, or 2K or 4K display. It won't work: black screen and then the monitor will go to sleep and, above all, the monitor is not present in system report. Furthermore HDMI and/or DVI were not tested at that moment.
All this without any modding of the Dayman FB. All Vanilla. SO I tried to work on the FB personality to improve the situation. Let's look at the Dayman a bit closer:
Code:
Dayman (6) @ 0x102370
DP, DP, DP, HDMI, DVI-D, DP
000400000403000000010101000000001204060100000000
000400000403000000010201000000002205040300000000
000400000403000000010301000000001102010200000000
000800000402000000010400000000002103050400000000
040000000402000000010500000000000000030600000000
000400000001000000010601000000002001020500000000
and as you can see, last DP aside, Dayman is exactly the same hw configuration of my GPU. More than that, Dayman has almost the right connectors code in place. Before modding we have:
1a row: 00040000 04030000 00010101 00000000 12 04 06 01 00000000
2a row: 00040000 04030000 00010201 00000000 22 05 04 03 00000000
3a row: 00040000 04030000 00010301 00000000 11 02 01 02 00000000
4a row: 00080000 04020000 00010400 00000000 21 03 05 04 00000000
5a row: 04000000 04020000 00010500 00000000 00 00 03 06 00000000
and I don't consider the 6th row because my GPU has only 5 ports. After modding we have:
1a row: 00040000 04030000 00010101 00000000 12 04 06 01 00000000
2a row: 00040000 04030000 00010201 00000000 22 05 04 03 00000000
3a row: 00040000 04030000 00010301 00000000 11 02 01 02 00000000
4a row: 00080000 04020000 00010400 00000000 21 03 05 04 00000000
5a row: 04000000 04020000 00010500 00000000 10 00 03 06 00000000
the underlined byte is the only one modified. And the explanation is pretty clear as already stated in many FB modding guides: if, for example, we just consider the 1st row, then we'll have:
Code:
00 04 00 00 / Display Port
04 03 00 00 /ATY, ControlFlags
00 01 01 01 / Features
00 00 00 00 /Sierra control code
12 / Trasmitter
04 / Encoder
06 /hotplug ID
01 / Sense ID
00 00 00 00 /Sierra control code
and this matches perfectly what we have got from the hw dump of my GPU. Now I put my attention on the corsive 8 bytes coloured in medium grey. We have:
1a row: 00010101
2a row: 00010201
3a row: 00010301
This is the part that relates to the ATY,Features (hex digits),
Code:
and the first pair of numbers are:
0 × 0002: LVDS * 0x09 = 09
0 × 0004: DVI 0x00 = 00
0 × 0010: VGA 0x00 = 00
0 × 0080: S-Video 0x04 = 04
0 × 0200: DVI 0x00 = 00
0 × 0400: Display Port 0 × 00 = 00
0 × 0800: HDMI 0 × 00 = 00
0 × 1000: DVI 0x00 = 00
The second pair of numbers:
Use Internal * 0 × 01 = 01
Use RGB YUV On 0 × 04 = 04
Use Backlight * 0 × 08 = 08
Backlight Inverted 0 × 10 = 10
Use Clamshell 0 × 20 = 20
A third pair of numbers represents the order of connector activation
01 = first active connector
02 = second active connector
03 = third active connector
etc. ...
I suggest that you mark as first, connector row that your monitor will use it as primary. Anyway in this case we have:
1a row: 00 01 01 01 <=> DP port; Internal Use; 1st active connector; Unknown;
now I modified the 3rd pair of bytes to mirror the Sense ID order of the other octet as follow:
1a row: 00040000 04030000 0001 01 01 00000000 12 04 06 01 00000000
2a row: 00040000 04030000 0001 03 01 00000000 22 05 04 03 00000000
3a row: 00040000 04030000 0001 02 01 00000000 11 02 01 02 00000000
now look at the underlined bytes to see the modification and just notice the relation with OSX SenseID: I have to admit this is a total try... and I have the suspect this modification is more related to Hotplug ID order than Sense ID order. But I'm open to experimenting here! Anyway what I got was:
all the 4 monitor (I consider 5K an MST double monitor as required two DPs) working at the same time! 3 DP ports and 1 HDMI!
and here there is a video :
but as you can see from the video (sorry it's in my italian! The video was not initially meant for the forum!), the 5K starts in scaled mode and the HP OSD panel states 2560*1440 px while the RetinaDisplayMenu app states correctly 2560*1440px (HiDPI) mode, that means full 5K res. I also tried cmd+alt+3 to make a screen capture and the png is 5120*2880px , so I'm pretty sure that the monitor is working correctly.
Thanks to @Fl0r!an for his guide. Thanks to @LostVector for his tips.
BTW @LostVector , at least for now, I haven't used any modification of the "CFG_USE_AGDC" var neither in AMD*controllers.kext nor in AGDP.kext.
I'm asking for help, suggestions or any ideas to remove that last strange scaled mode in which 5K is presented even if it's working in 5K correctly. I'm really close to have everything working as it has to be.
That's my actual environment:
- MacOS 10.12.6 Public
Beta 3Beta 5 - SYsDef 17,1 (but tried also with 18,3 and it's working)
- CSM disabled in BIOS
- iGPU (HD630) as helper graphics enabled (and needed!)
- Clover v.
40914097
Attachments
Last edited: