Repository navigation
drm/apple: admit DCPDPService/AppleDCPPS186 on 0x28 and fix live DPTX handoff hotplug - #3567
Conversation
On T8103 external DisplayPort over USB-C (dcpext) with firmware 27.2, DPAVSERV_ENDPOINT (0x28) announces the sink EDID service as class DCPDPService with EPICUnit 0. Admit DCPDPService on DPAVSERV_ENDPOINT alongside DCPDP13Service (still requiring unit 0 and a bounded dynamic interface ID) so external DP Alt Mode displays expose their full sink EDID instead of dropping the service as unsupported. Update the dpavservep identity KUnit test cases accordingly. Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
When a boot stage hands an active DPTX DCP (such as T8103 dcpext over USB-C DP Alt Mode) over live via dcp-live-v1, releasing the adopted display before iomfb_start_rtkit() prevents firmware from observing the disconnect over IOMFB. On the subsequent Type-C connect, firmware trains the link and enumerates sink modes but never delivers the connect hotplug, leaving the connector stuck disconnected. Move the adopted DPTX HPD-low and release_display sequence to right after iomfb_start_rtkit(). Guard dcp_connector_update_dict() against a NULL connector (freeing the incoming chunk buffer cleanly) because IOMFB can deliver boot-display property updates during iomfb_start_rtkit() before a Type-C route binds a connector to dcpext. Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
There was a problem hiding this comment.
Verdict: MERGE at d00e528a (once queued CI checks pass; paired with aura#566)
Blockers: none
Checked:
- Audited both commits (
b0f1acfc,d00e528a) across all 4 touched files (+46/-27); zero code blockers found. - Verified
dcpavserv_identity()indrivers/gpu/drm/apple/epic/dpavservep.cadmits"DCPDPService"only onDPAVSERV_ENDPOINT(0x28) withunit == 0and bounded dynamic interface-id (1..0xffff), matchingDCPDP13Service, with full positive and negative unit/channel/class coverage added indpavservep-identity-test.c. - Verified
dcp_start()indrivers/gpu/drm/apple/dcp.cmoves thedcp->rtkit_adopted && dptx_service_available(&dcp->dptxport[0])dptxport_set_hpd(false)+dptxport_release_display()release to immediately afteriomfb_start_rtkit()while keeping the#ifdef DCP_DPTX_DISCONNECT_ON_INITbranch gated with!dcp->rtkit_adopted. - Verified
dcp_connector_update_dict()indrivers/gpu/drm/apple/connector.csafely frees and clearschunks->data(kvfree,NULL,length = 0) and returns whenconnector == NULL, preventing both a NULL dereference and a memory leak if IOMFB delivers boot-display dictionary updates before a connector is bound. - Verified exact-head
J274(T8103, firmware 27.2) live handoff and dual-display Sway (DP-22560x1440@60with 256-byte EDID +HDMI-A-11920x1200@60, DPMS blank/unblank clean, 0 failed units, 0 kernel errors),141/141arm64apple-*KUnit,checkpatch.pl --strict0/0/0, and PR text (What/Tested/Risktwo-way door).
Evidence
drivers/gpu/drm/apple/connector.c:333-348:if (!connector)freeschunks->dataviakvfree()and clearsdata/lengthbefore lockingconnector->chunk_lock.drivers/gpu/drm/apple/dcp.c:5180-5230: adopted DPTX release now runs afteriomfb_start_rtkit()succeeds so firmware deliversconnected:0thenconnected:1(t=3.35son J274).drivers/gpu/drm/apple/epic/dpavservep-identity-test.c: testsDCPDPServiceunit 0 (accept), unit 1 (reject), channel 0 (reject), channel0x10000(reject), andDCPUnknownService(reject).
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
|
code-owner ping <@422957901716652033> / @DjDeveloperr: merge train at |
USB-C to HDMI docks using a Parade PS186 converter announce their AV service on DPAVSERV_ENDPOINT (0x28) as class AppleDCPPS186 with EPICUnit 0 on firmware 27.2. Admit AppleDCPPS186 alongside the MCDP29xx DP-to-HDMI converter classes (requiring unit 0 and a bounded dynamic interface ID) so displays behind PS186 docks expose their sink EDID. Add KUnit identity cases for AppleDCPPS186 unit 0 and unit 1. Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
There was a problem hiding this comment.
Verdict: MERGE at f75c5e8ecf41 after hosted CI and the peer hardware row.
Blockers: The existing second-family Type-C display regression and hosted checks remain due. If the peer uses a PS186 dock on a laptop, also check that ordinary SDR hotplug still works with the HDR service bound.
Checked: The incremental change admits the named PS186 class on the classic AFKv2 endpoint at unit zero. The service-name, endpoint, channel bounds, and generation/epoch checks remain in force. The unit-one test rejects the new class outside its expected unit. HDR publication remains under the existing laptop and firmware checks. The exact J274 receipt covers native USB-C DP, the PS186 dock, EDID and hotplug and reports 143/143 display KUnit tests.
Evidence
- One commit over the previously approved
d00e528aa06b. Checked the two-file delta and the exact J274 receipt in the PR body.
|
J716c (16-inch M5 Max) at EvidenceBatched kernel
|
There was a problem hiding this comment.
Verdict: HOLD at f75c5e8ecf41 pending the peer physical hotplug and hosted checks.
Blockers: Keep the J616s physical unplug/replug row. Confirm connector rediscovery, EDID and modes after reconnect, and check the kernel log for DART or DCP errors.
Checked: The J716c receipt adds a second-family attached boot and two DPMS cycles with both external displays returning and zero DART faults. DPMS exercises display power transitions. Physical disconnect and rediscovery remain untested on that peer. J274 already covers native USB-C DP and live PS186 hotplug. The J716c boot used a Thunderbolt dock and the documented media-DT workaround for #3618.
Evidence
|
Hardware verification (second-family peer physical hotplug): MacBook Air (13-inch, M5, J813 / T8142) at
|
There was a problem hiding this comment.
Verdict: MERGE at f75c5e8e once the merge gates are satisfied.
Checked: The J813 physical replug receipt satisfies the outstanding request for a second DCP family. The internal panel stayed enabled, the external connector dropped on unplug, and the same 256-byte sink EDID and 18 modes returned after replug. The receipt reports zero DART faults or DCP/IOMFB errors and confirms return to the stock boot. The earlier J274 exact-head row covers native USB-C DP and the PS186 dock. Hosted Apple build, host tests, KUnit, and the latest PR-text and readiness jobs passed.
Please update the validation summary with the J813 receipt so the hardware gate can pick it up.
DjDeveloperr
left a comment
There was a problem hiding this comment.
Approved at f75c5e8. The new DP service identities require unit zero and retain the interface ID bounds. An adopted port releases its display after IOMFB starts. The early connector callback frees its unclaimed chunks. The J274 runs covered native DisplayPort and the PS186 dock. The J813 physical replug restored the 256-byte EDID and all 18 modes without a DART fault or DCP error.
|
Regression on J775c (M5 Max, HDMI through a live-handed-over dcpext0) from With linux The same tree with only So moving the adopted-DPTX HPD-low and release after |
What: Admit
DCPDPServiceandAppleDCPPS186(unit 0) onDPAVSERV_ENDPOINT(0x28) so T8103dcpextexposes the sink EDID over USB-C DP Alt Mode and PS186 USB-C-to-HDMI docks, and release a boot-adopted DPTX display afteriomfb_start_rtkit()(guardingdcp_connector_update_dict()against aNULLconnector) so livedcp-live-v1DPTX handoff delivers the connect hotplug immediately — fixing USB-C display EDID, live handoff, and DCP audio on both HDMI and USB-C outputs on the M1 Mac mini (J274).Tested: J274 M1 Mac mini at
f75c5e8ecf41(firmware 27.2,7.3.0-j313-272+, default cmdline): full 6-case autonomous live handoff matrix from Aura (749dd6de) — USB-C port 0 (card1-DP-1, EV2780,2560x1440@60,edid=256), USB-C port 1 (card1-DP-2, EV2780 & Parade PS186 USB3/HDMI dock,2560x1440@60,edid=256), two-USB-C live pipeline handover, HDMI only (card1-HDMI-A-1,2560x1440@60,edid=256), HDMI + USB-C live hotplug and dual livedcp+dcpextcold boot (both2560x1440@60,edid=256), audible DCP audio on both HDMI (Apple HDMI,238330000.audio-controller) and USB-C (Apple USB-C DisplayPort,238334000.audio-controller) via ALSA and PipeWire (s24-32le 2ch 48000Hz), DPMS off/on, and dual-display Sway, 0 failed units, 0 new kernel errors; arm64 KUnitapple-*: 143/143 passed;checkpatch.pl --strict --git: 0 errors, 0 warnings.Risk: two-way door · M1–M4 Macs with external DisplayPort over
apple-dcp(dcpext/DPAVSERV_ENDPOINT).Not yet: Tested on J274 (T8103); M2/M3/M4 Macs with live DPTX handoff or
DPAVSERV_ENDPOINTnot yet re-run at this head.Details
dpavservep.c/dpavservep-identity-test.c: On T8103dcpextwith firmware 27.2,DPAVSERV_ENDPOINT(0x28) advertises native DP Alt Mode EDID services as classDCPDPServiceand Parade PS186 USB-C-to-HDMI dock EDID services as classAppleDCPPS186withEPICUnit0 (while channel 7 is rejected as optional/unsupported). Admitting both withunit == 0alongsideDCPDP13ServiceandAppleDCPMCDP29XX/AppleDCPMCDP2900(keeping the bounded dynamic interface-id check and rejectingunit != 0and non-DP classes) allowsdcpextto read the 256-byte sink EDID (and populate the audio ELD) on both native DP and PS186 HDMI docks.dcp.c/connector.c: When Aura handsdcpexton running viadcp-live-v1, releasing the adopted DPTX display (dptxport_set_hpd(false)+dptxport_release_display()) beforeiomfb_start_rtkit()prevented firmware from observing the disconnect over IOMFB; on the subsequent Type-C connect firmware trained the link and enumerated sink modes, but never delivereddcpep_cb_hotplug(1). Moving the release to immediately afteriomfb_start_rtkit()deliversconnected:0followed byconnected:1right away (t~2.55s). Because IOMFB can deliver boot-display dictionary updates duringiomfb_start_rtkit()before a Type-C route binds a connector todcpext,dcp_connector_update_dict()now frees the incoming chunk buffer and returns cleanly whenconnector == NULL.Evidence
main(37a9d68180b2):b0f1acfc21d1drm/apple: dpavservep: admit DCPDPService on DPAVSERV_ENDPOINTd00e528aa06bdrm/apple: dcp: release adopted DPTX display after starting IOMFBf75c5e8ecf41drm/apple: dpavservep: admit AppleDCPPS186 on DPAVSERV_ENDPOINT./scripts/checkpatch.pl --strict --git origin/main..HEAD: 0 errors, 0 warnings, 0 checks../tools/testing/kunit/kunit.py run --arch=arm64 --cross_compile=aarch64-linux-gnu- --kunitconfig=drivers/gpu/drm/apple/tests/display.kunitconfig 'apple-*':Ran 143 tests: passed: 143.dcp-live-v1from Aura749dd6de):card1-DP-1& port 1card1-DP-2):AFK[ep:28]: new service DCPDPService on channel 5,dcp_hotplug() connected:1 nr_modes:18,boot scanout retired by displayed swap 3,edid=256,2560x1440@60.card1-DP-2):AFK[ep:28]: new service AppleDCPPS186 on channel 5,dcp_hotplug() connected:1 nr_modes:22,boot scanout retired by displayed swap 3,edid=256,2560x1440@60.card1-HDMI-A-1):boot scanout retired by displayed swap 3,edid=256,2560x1440@60;card1-DP-1/2disconnected.dcp+dcpextcold boot): bothcard1-HDMI-A-1andcard1-DP-1connected,enabled,edid=256,2560x1440@60, bothboot scanout retired by displayed swap 3.card 8(Apple HDMI,238330000.audio-controller, ELDEV2780, 32–48 kHz) andcard 9(Apple USB-C DisplayPort,238334000.audio-controller, ELDEV2780, 32–96 kHz) play audibly through ALSA (S16_LE) and PipeWire (s24-32le 2ch 48000Hz) viaapple-sio, 0 kernel errors.fb0/blank4 -> 0): cleanly powered off and restored2560x1440@60.DP-2(2560x1440 @ 59.951 Hz) +HDMI-A-1(1920x1200 @ 59.950 Hz) active simultaneously, 0 failed units (systemctl --failed), 0 display/DART/SError kernel errors.