Repository navigation
Conversation
The AV endpoint (0x29) announces a fresh DCPAVSimpleVideoInterface and DCPAVAudioInterface on new channels for every DPTX connection, so every display replug or DPMS wake that drops HPD uses two more slots. Since "drm/apple: pin DP service owners before recycling retired AFK slots" a torn-down slot is only reclaimed if its ops opt in with .reusable, which the AV services never did. After eight connections the 16-slot table is full, every later announcement fails with AFK[ep:29]: no reusable service slots and the audio service of that port is not re-registered until reboot. Convert the AV owners and opt in to reuse: - DCPAVSimpleVideoInterface keeps no pointer to its service. - asrv->srv now holds an owner pin taken in init and dropped in teardown. A teardown of an older generation no longer clears the pointer or unplugs the jack of its successor. - av_service_connect() and av_service_disconnect() call into the service after dropping srv_rwsem, so they pin it for the duration. Add afk_service_pin() for this; unlike afk_service_get() it also succeeds after teardown, so the close is still sent. Add a KUnit case for a close pinned across teardown. Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
Contributor
|
Closing as superseded: this work was ported by #328 (merged 2026-10-16) and carried into the maintained 7.3 integration/aurora line. Thanks for the original change; nothing here is lost. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The AV endpoint (0x29) announces a fresh
DCPAVSimpleVideoInterfaceandDCPAVAudioInterfaceon new channels for every DPTX connection. A display replug uses two more slots, and so does a DPMS wake on a monitor that drops HPD (both EIZO EV2780 and Fujitsu E24T-7 Pro do). Since 5837706 ("drm/apple: pin DP service owners before recycling retired AFK slots") a torn-down slot is only reclaimed if its ops set.reusable, which the AV services never did. After eight connections the 16-slot table is full:From then on the audio service of that port is not registered again until reboot, so DP audio on it stays silent. The display itself keeps working.
5837706 left these services out on purpose because their owners did not pin them. This PR converts them and opts in:
DCPAVSimpleVideoInterfacekeeps no pointer to its service.asrv->srvholds an owner pin from init until teardown. Teardown of an older generation no longer clears the pointer or unplugs the jack of its successor.av_service_connect()andav_service_disconnect()call into the service after droppingsrv_rwsem, so they pin it for the call. The newafk_service_pin()does that; unlikeafk_service_get()it also succeeds after teardown, so the close is still sent.afk_service_close_pin_test: a close pinned across teardown keeps the slot until it is put.Testing
Mac mini (j274), EIZO EV2780 on USB-C (dcp@271c00000) and on HDMI, aurora-wip 27da3a5 with #275, #276, #277, #281 and this PR:
swaymsg output DP-1 power off/on; channels up to 71, 36 services on 16 slots)no reusable service slots/expected announceThe KUnit case was not run (no
CONFIG_KUNITin the test config). The DCP host selftests pass 45/52; the same 7 fail on 27da3a5 alone, because the harnesses lack stubs fordev_dbg()andcd321x_display_taken().