Repository navigation
phy/drm: apple: seamless handover from early bootloader HDMI bring-up (T6050/T8132) - #2764
DjDeveloperr wants to merge 2 commits into
Conversation
…ation When early bootloader HDMI bring-up leaves a T6050/T8132 lpdptx PHY running across handoff, the hardware PLL lock bit (dptx+0x1008 bit 3) is still set when Linux activates the PHY for the first time. Power down the PHY TX and unlock the PLL before rewriting PLL core calibration and configuration in t6050_activate(), leaving the cold-boot path unchanged when the PLL is already unlocked. Add a host regression test covering cold activation, warm bootloader-locked activation across both pclkdrv_select polarities, subsequent HBR3 reconfiguration, and PLL unlock error handling. Signed-off-by: Diljit Singh <[email protected]>
|
Read at 9cc0fb3 (draft). The PHY half keys on the hardware state (PLL lock bit still set) rather than on a board or a flag, which is the right shape, and cold boots take the old path. On the DCP half, Rows when it leaves draft: the J773g aura#445 -> simpledrm -> apple-dcp handover at 4K@120, plus one cold boot without aura#445 on the same head showing no change, and one T6050 board, since the PHY change covers it too. Assisted-by: LLM (Claude:Opus 5.5) |
9cc0fb3 to
e8ced17
Compare
|
Updated
Will add the J773g Assisted-by: LLM (Gemini:4 Neon) |
… reconnecting When early bootloader HDMI bring-up leaves DCP holding DPTX port 0 live across quiesce so simpledrm keeps scanning out through early boot, apple-dcp wakes firmware with the bootloader display already reported connected while Linux's dptxport[0].connected is still false and lpdptx_phy is still unactivated. Calling dcp_dptx_connect(dcp, 0) directly on that live session stalls for 2 s waiting for a linkcfg_completion callback that firmware never re-emits, and the timeout teardown then disconnects the output and leaves the connector permanently down. Detect an inherited fixed-HDMI DPTX session (non-Type-C with hdmi_hpd, port 0 service available, dptxport[0].connected still false, and display already reported connected) in dcp_enable_dp2hdmi_hpd() and release port 0 via dptxport_release_display() before the normal connect or poweroff path runs. Replace fixed polling delays with a completion (hdmi_disconnect_done) re-initialized before releasing port 0 and completed by the IOMFB hotplug disconnect handlers, waited outside hpd_mutex with a 500 ms timeout (~5x the 58..99 ms measured release-to-unplug latency on J773g 26B123). If release fails or the disconnect wait times out with the display still connected (or no connector yet), skip dcp_dptx_connect(dcp, 0) rather than racing a live session while still arming the HPD IRQ for replug recovery. Cold boots have no active display at takeover and remain unchanged. Add a host regression test in lifecycle.py exercising cold boot, warm inherited HDMI takeover (with and without connector), cable unplugged before takeover, hdmi_yielded, release errors, disconnect timeout skipping connect, timeout race where connector already cleared, stale nr_modes after unplug, and non-applicable paths. Signed-off-by: Diljit Singh <[email protected]>
e8ced17 to
5116f45
Compare
Summary
Enables clean Linux
lpdptx_phy+apple-dcptakeover when early bootloader HDMI bring-up (aurora-silicon/aura#445) leaves a T6050/T8132 HDMI link and DPTX port 0 live acrosssimpledrmboot:phy: apple: dptx: power down bootloader-locked PLL before T6050 activation: power down PHY TX and unlock the PLL before rewriting PLL calibration/config int6050_activate()when the PLL lock bit is still set from early bootloader bring-up. Cold boots (PLL already unlocked) are unchanged. Includes host regression test (phy.py).drm/apple: dcp: release inherited bootloader HDMI DPTX session before reconnecting: detect an inherited fixed-HDMI DPTX session indcp_enable_dp2hdmi_hpd()and release port 0 viadptxport_release_display()(waiting up to 260 ms outsidehpd_mutexfor disconnect) before normaldcp_dptx_connect()activates the PHY and trains the full link cleanly. Cold boots are unchanged. Includes host regression test (lifecycle.py).Verification
t6050-warm-activateandinherited-hdmi-handoff): PASS.aura#445→simpledrm→apple-dcp4K@120Hzhandoff verification.