Skip to content

selftests: apple-dcp: extract the DPTX withdrawal in the disconnect fixture - #4019

Merged
DjDeveloperr merged 1 commit into
mainfrom
fix/apple-dcp-selftest-dptx-withdraw
Dec 3, 2026
Merged

DjDeveloperr merged 1 commit into
mainfrom
fix/apple-dcp-selftest-dptx-withdraw

Conversation

@DjDeveloperr

Copy link
Copy Markdown
Contributor

What: Fix the three apple-dcp selftests that #4013 broke on main: physical-disconnect, fast-replug-bounce and dropped-swap-teardown. Their fixture copies dcp_external_stop_locked() out of dcp.c, and that function now calls the new dcp_external_withdraw_dptx_locked() and rearms typec_iomfb_hpd_ready. The fixture knows neither, so it does not compile. It now extracts the helper when dcp.c has it and models the completion. No test is added or relaxed.

Tested: In the Ubuntu 24.04 host-tests image (clang 18.1.3), on main 37a630623169:

  • without this change tools/testing/selftests/drivers/gpu/apple-dcp/run.sh is 98/101, failing exactly those three;
  • with it, 101/101.
  • The three also pass against the dcp.c from before drm/apple: dcp: rearm Type-C IOMFB HPD completion on deep-sleep DPTX release #4013, so an older --source tree still works.
  • checkpatch.pl --strict: 0 errors, 0 checks; its only two warnings are that a tree without git history can't look up 2a8d8087827f, which is on main.

Risk: two-way · host selftest fixture only; nothing that runs on a Mac changes, so no hardware row applies.

Not yet: nothing.

…ixture

Commit 2a8d808 ("drm/apple: dcp: rearm Type-C IOMFB HPD completion on
deep-sleep DPTX release") moved the HPD-low and display-release calls of
dcp_external_stop_locked() into a helper,
dcp_external_withdraw_dptx_locked(), and made the stop rearm
typec_iomfb_hpd_ready. The disconnect fixture extracts
dcp_external_stop_locked() from dcp.c but knows neither, so
physical-disconnect, fast-replug-bounce and dropped-swap-teardown no
longer compile.

Extract the helper when dcp.c has it, and model the completion as the
other fixtures of this file do. No test is added or relaxed.

Fixes: 2a8d808 ("drm/apple: dcp: rearm Type-C IOMFB HPD completion on deep-sleep DPTX release")
Signed-off-by: DjDeveloperr <hey@djdev.me>

@RyanTheTide RyanTheTide left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed ce31dd3. The fixture extracts the production withdrawal helper when present and models the new completion reset. Existing assertions and production code are unchanged. The reported before/after run isolates the three repaired tests, which also pass with the older source.

@DjDeveloperr
DjDeveloperr merged commit cebaa8a into main Dec 3, 2026
3 checks passed
@DjDeveloperr
DjDeveloperr deleted the fix/apple-dcp-selftest-dptx-withdraw branch December 3, 2026 00:03
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.

2 participants