Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

M2+ desktop dcp/dptx HDMI output support #329

Merged
merged 21 commits into from
Oct 5, 2023

Commits on Sep 20, 2023

  1. display: Use dcp iboot SetSurface instead of SwapLayer

    iboot uses this and it's simpler. m1n1 doesn't need to swap surfaces
    for tear free display.
    
    Signed-off-by: Janne Grunau <[email protected]>
    jannau committed Sep 20, 2023
    Configuration menu
    Copy the full SHA
    988c1c8 View commit details
    Browse the repository at this point in the history
  2. rtkit: Add rtkit_can_recv()

    Required non-blocking handling of multiple AFK endpoints for the same
    mailbox.
    
    Signed-off-by: Janne Grunau <[email protected]>
    jannau committed Sep 20, 2023
    Configuration menu
    Copy the full SHA
    6b24255 View commit details
    Browse the repository at this point in the history
  3. dart: limit vm-base to 36-bit io address space

    Required for t602x dcp*.
    
    Signed-off-by: Janne Grunau <[email protected]>
    jannau committed Sep 20, 2023
    Configuration menu
    Copy the full SHA
    b157803 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    5a939c6 View commit details
    Browse the repository at this point in the history
  5. dcp: Add (lp)dptx-phy support for M2* desktops

    Phy "implementation" is simplified a replay of a macos trace with on
    t8112 with a 1920x1080 display.
    
    Signed-off-by: Janne Grunau <[email protected]>
    jannau committed Sep 20, 2023
    Configuration menu
    Copy the full SHA
    16af849 View commit details
    Browse the repository at this point in the history
  6. dcp: dptx-phy: rewrite dptx_phy_activate() for dptx/lpdptx-phy

    Signed-off-by: Janne Grunau <[email protected]>
    jannau committed Sep 20, 2023
    Configuration menu
    Copy the full SHA
    a1ac36e View commit details
    Browse the repository at this point in the history
  7. dcp: dptx-phy: make dptx_phy_set_link_rate() SoC independent

    Signed-off-by: Janne Grunau <[email protected]>
    jannau committed Sep 20, 2023
    Configuration menu
    Copy the full SHA
    74f427b View commit details
    Browse the repository at this point in the history
  8. afk: Sync structs/names with proxyclient's python definitions

    Signed-off-by: Janne Grunau <[email protected]>
    jannau committed Sep 20, 2023
    Configuration menu
    Copy the full SHA
    ab72df1 View commit details
    Browse the repository at this point in the history
  9. 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 <[email protected]>
    jannau committed Sep 20, 2023
    Configuration menu
    Copy the full SHA
    6a2bbbd View commit details
    Browse the repository at this point in the history
  10. afk: Fix a NULL pointer dereference in adfk_epic_send()

    Signed-off-by: Janne Grunau <[email protected]>
    jannau committed Sep 20, 2023
    Configuration menu
    Copy the full SHA
    32881dc View commit details
    Browse the repository at this point in the history
  11. afk: Introduce EPIC services

    To be used on the dptx-port endpoint.
    
    Signed-off-by: Janne Grunau <[email protected]>
    jannau committed Sep 20, 2023
    Configuration menu
    Copy the full SHA
    aebaa1c View commit details
    Browse the repository at this point in the history
  12. afk: use increasing EPIC sequence numbers

    Signed-off-by: Janne Grunau <[email protected]>
    jannau committed Sep 20, 2023
    Configuration menu
    Copy the full SHA
    b9b0755 View commit details
    Browse the repository at this point in the history
  13. afk: Add EPIC std services IOp -> AP calls

    Used on dptx-port endpoint.
    
    Signed-off-by: Janne Grunau <[email protected]>
    jannau committed Sep 20, 2023
    Configuration menu
    Copy the full SHA
    26fa229 View commit details
    Browse the repository at this point in the history
  14. afk: epic channel/interface numbers do not reset

    They exceed 256 with repeated chainloading of m1n1.bin on j473. Do not
    hold a service for every possible channel but keep a fixed array of 8
    services identified by the channel number.
    
    Signed-off-by: Janne Grunau <[email protected]>
    jannau committed Sep 20, 2023
    Configuration menu
    Copy the full SHA
    6f4cc40 View commit details
    Browse the repository at this point in the history
  15. dcp: Do not use an anonymous struct for dcp_dev_t typedef

    This allows forward declarations in other headers.
    
    Signed-off-by: Janne Grunau <[email protected]>
    jannau committed Sep 20, 2023
    Configuration menu
    Copy the full SHA
    ac32c0e View commit details
    Browse the repository at this point in the history
  16. dcp/dptx: Add dptx-port endpoint

    Based on the linux kernel implementation with updates for the macOS 13.5
    based DCP firmware.
    
    Signed-off-by: Janne Grunau <[email protected]>
    jannau committed Sep 20, 2023
    Configuration menu
    Copy the full SHA
    20442d3 View commit details
    Browse the repository at this point in the history
  17. dcp/dpav: Add DPAV endpoint

    Signed-off-by: Janne Grunau <[email protected]>
    jannau committed Sep 20, 2023
    Configuration menu
    Copy the full SHA
    1705397 View commit details
    Browse the repository at this point in the history
  18. dcp/system: Add system endpoint

    This on is boring but allows turning additional logging on.
    
    Signed-off-by: Janne Grunau <[email protected]>
    jannau committed Sep 20, 2023
    Configuration menu
    Copy the full SHA
    7c99be9 View commit details
    Browse the repository at this point in the history
  19. rtkit: Support usage with SRAM

    Will be used by SMC.
    
    Signed-off-by: Janne Grunau <[email protected]>
    jannau committed Sep 20, 2023
    Configuration menu
    Copy the full SHA
    327ce34 View commit details
    Browse the repository at this point in the history
  20. smc: Add minimal smc client

    Only supported operation is smc_write_u32() for turning the dp2hdmi
    converter on M2 desktop systems on.
    
    Signed-off-by: Janne Grunau <[email protected]>
    jannau committed Sep 20, 2023
    Configuration menu
    Copy the full SHA
    075267e View commit details
    Browse the repository at this point in the history

Commits on Sep 22, 2023

  1. 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 <[email protected]>
    jannau committed Sep 22, 2023
    Configuration menu
    Copy the full SHA
    ae41be1 View commit details
    Browse the repository at this point in the history