Commit graph

8 commits

Author SHA1 Message Date
Janne Grunau
5006e083c7 display: Use dcpext0 for HDMI out on t8112/t6020/t6021
dcpext0 behaves like dcp on M1* devices and can sleep after display
init. This has the advantage of not breaking macOS when starting with an
initialized display.
dcpext* are according to Apple's tech specs slightly more powerful than
dcp. They are advertised as 6K at 60Hz while dcp seems to be limited to
5K at 60Hz.

Signed-off-by: Janne Grunau <j@jannau.net>
2023-11-27 13:33:08 +09:00
Janne Grunau
5245fc6a58 dcp: Pass the die number for dptx' connectTo method
Apperently just informative as display init on M2 Ultra in m1n1 worked
as expected despite passing '0' as die number.

Signed-off-by: Janne Grunau <j@jannau.net>
2023-11-27 13:33:08 +09:00
Janne Grunau
8c99a189e0 dptx: Add the number of dptxport services
Avoids waiting 500 ms for the second dptxport service on t6020 and
possibly t6021.

Signed-off-by: Janne Grunau <j@jannau.net>
2023-11-14 18:57:15 +09:00
Janne Grunau
31ee1499f8 display: Support the HDMI output on M2* desktop systems
On M2* desktop systems the HDMI output is not managed by dcp/dcp0. This
allows more flexibility, for example dcp on the M2 Mac mini can be
routed to the USB-C/ThunderBolt ports.
For m1n1 this adds quite ab bit of complexity. In addition to the DCP
iboot endpoint/protocol two additional endpoints have to be started.
Only the dptx-port endpoint has a meaningful AP <=> DCP communication.
In addition we start the system endpoint to optionally enable more
verbose syslog messages (if RTKIT_SYSLOG is defined).
In addition the dptx-phy or lpdptx-phy has to be programmed. Those two
phy look mostly identical. MacOS seems to use a static DP configuration
(4 lanes, HBR3*) regardless of the connected display.
The added SMC gpio support is used to power the MCDP29xx DP to HDMI
converter on.
Config  is unfortunately a mess since Apple can't name the device tree
nodes consistently. On M2 Ultra devices only the four dcpext*/dispext*
on each die are used. M2 Ultra support is untested.

* link rate might differ on t602x based devices for 8k60 support

Signed-off-by: Janne Grunau <j@jannau.net>
2023-10-05 12:33:35 +09:00
Janne Grunau
2b58bfd24b dcp: Do not use an anonymous struct for dcp_dev_t typedef
This allows forward declarations in other headers.

Signed-off-by: Janne Grunau <j@jannau.net>
2023-10-05 12:33:35 +09:00
Janne Grunau
76fbc77ad2 afk: Prepare afk/epic for handling of multiple endpoints
This needs to ensure that the data processing does not block on
message retrieval from the mailbox. Command processing must not block
and have to ensure that afk_epic_command() receives the reply to its
command.
DCP's dptx-port endpoint (endpoint 0x2a) can send notifies at any time
which needs to be processed in the right context.

Signed-off-by: Janne Grunau <j@jannau.net>
2023-10-05 12:33:35 +09:00
Hector Martin
714420a694 display: Put DCP to sleep if display is external
This stops DCP from killing our modeset if the connection cycles.

Also force a (potential) configure cycle if the display is external;
this makes sure updated stage2s will have a chance at fixing issues of
old stage1s. Modesetting is fast when it's the same mode as before.

Signed-off-by: Hector Martin <marcan@marcan.st>
2022-06-01 01:54:11 +09:00
Hector Martin
eaadc43fbb dcp: Add DCP and iBoot protocol support
Signed-off-by: Hector Martin <marcan@marcan.st>
2022-01-17 04:42:00 +09:00