Skip to content

drm: apple: free a DP tunnel route when its HPD release times out - #460

Open
coffeejunk wants to merge 1 commit into
omacom:integration/aurorafrom
CaligraLtd:fix/dcp-tunnel-teardown-timeout
Open

coffeejunk wants to merge 1 commit into
omacom:integration/aurorafrom
CaligraLtd:fix/dcp-tunnel-teardown-timeout

Conversation

@coffeejunk

@coffeejunk coffeejunk commented Nov 12, 2026 •

Copy link
Copy Markdown

dcp_tb_release_locked() keeps the route when dcp_dptx_disconnect_oob() fails, expecting a later tunnel request on the port to release it. On unplug, apple_dpin_release_binding() calls the release once and does not retry. The route then holds its pipeline until reboot.

dcp_dptx_disconnect_oob() fails this way when DCP's DPTX service stops responding and dptxport_set_hpd() returns -ETIMEDOUT. T8112 has a single external pipeline, and any other display is then refused. A DP-alt display on the other port gets -ENOSPC from the mux:

thunderbolt-apple-acio 381ac0000.cio: dpin0: display teardown failed: -110
apple-dcp 271c00000.dcp: display on USB-C Left-front waits for a free external display pipeline ...
tps6598x 3-003f: failed to configure Type-C connection: -28

Treat -ETIMEDOUT as a completed release: call dcp_dptx_disconnect() to release the DPTX port, then deactivate the route as on success. Other errors keep the route, as before.

Testing

J413 on b798f2b plus the t8112 PCIe-C patches from #143, with an LG UltraFine 5K on a faulty Thunderbolt cable that drops the link during DP tunnel setup. Each attach times out on HPD, and the route is freed:

apple-dcp 271c00000.dcp: dcp_dptx_connect: failed to assert Type-C HPD: -110
apple-dcp 271c00000.dcp: DP tunnel dpin0: HPD release timed out, releasing its pipeline anyway
apple-dcp 271c00000.dcp: dcp_dptx_disconnect(port=0)

After unplugging the 5K, an Apple USB-C HDMI adapter on the same port gets the external pipeline:

apple-display-crossbar 38304c000.mux: Switched dpphy to dispext1,0
apple-dcp 271c00000.dcp: dcp_hotplug() connected:1 valid_mode:0 nr_modes:27

dcp_tb_release_locked() keeps the route when dcp_dptx_disconnect_oob()
fails, expecting a later tunnel request on the port to release it. On
unplug, apple_dpin_release_binding() calls the release once and does
not retry. The route then holds its pipeline until reboot.

dcp_dptx_disconnect_oob() fails this way when DCP's DPTX service stops
responding and dptxport_set_hpd() returns -ETIMEDOUT. T8112 has a
single external pipeline, and any other display is then refused:

  apple-dcp 271c00000.dcp: display on USB-C Left-front waits for a free external display pipeline ...

Treat -ETIMEDOUT as a completed release and free the route.

Tested on J413 with an LG UltraFine 5K and a faulty Thunderbolt cable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant