Repository navigation
selftests: apple-dcp: stub the T6030 firmware 27.2 sleep state in host fixtures - #3939
Conversation
…t fixtures Since "drm/apple: restore the T6030 firmware 27.2 display after sleep" and "drm/apple: dcp: enable AFK init-prop name fallback on T6030 internal DCP", the production functions these host fixtures extract read state that their stub structs don't declare, so seven fixtures no longer compile: - display-sleep-merge-tests: dcp_platform_prepare() returns early for a 27.2 idle-only dcpext (dcp->ext272). - apple-dcp v27-panel-handoff: the T6030 profile names dcp_s2r_t6030 and sets afk_name_fallback and v27_early_stop. - apple-dcp t6041-v27-admission and t8122-dcpext-v27-admission: dcp_check_firmware_version() calls dcp_ext272_admitted(). - apple-dcp service-rebind: afk_recv_handle_init() reads hw.afk_name_fallback, and afk_v2_receive() reads ep->j516s_panel_service and the sleep_v27_closed gate (now an enum) and logs with dev_info_ratelimited(). - apple-dcp provider-admission and ordered-rx: dcp_afkep() also looks up dcp->v27_early_svc_ep[]. Declare the new fields in the stubs, take dcp_ext272_admitted() and the profiles' sleep layouts from the driver, and count dev_info_ratelimited() like dev_info(). No scenario sets the new state, so every fixture checks the same paths as before. Fixes: 7d82fde ("drm/apple: restore the T6030 firmware 27.2 display after sleep") Fixes: f35156e ("drm/apple: dcp: enable AFK init-prop name fallback on T6030 internal DCP") Signed-off-by: DjDeveloperr <hey@djdev.me>
RyanTheTide
left a comment
There was a problem hiding this comment.
The three Python fixture files now declare the driver state their extracted functions use. The admission helper and sleep layouts are taken from production source, and the existing assertions remain. The recorded host run goes from 950/952 on main to 952/952 with this patch.
satchlj
left a comment
There was a problem hiding this comment.
Reviewed 5351f41ea3b0 across tools/asahi/display-sleep-merge-tests.py, tools/testing/selftests/drivers/gpu/apple-dcp/boot.py, and tools/testing/selftests/drivers/gpu/apple-dcp/edid.py.
Declaring the new #3815 fields in the fixture stubs and extracting dcp_ext272_admitted() and dcp_s2r_layout / layouts directly from production source keeps the fixtures faithful without touching driver code or weakening any existing assertions. Verified locally at exact head 5351f41ea3b0: display-sleep-merge-tests.py passes (17/17 merge-boundary runs including runtime controls), apple-dcp/run.py --group boot passes (6/6, including v27-panel-handoff, t6041-v27-admission, t8122-dcpext-v27-admission), and apple-dcp/run.py --group edid passes (4/4, including service-rebind, provider-admission, ordered-rx), matching your 952/952 full-suite run. LGTM.
|
Merge check at head 5351f41: the local host-tests receipt (952/952 in the CI image, on parent 0bc45c5) still covers the current main 37916aa. In the 17 main commits since that parent, the only test or DCP file that changed is tools/asahi/apple-dart-isp-host-tests.py, which came from #3863 and passed 24/24 there. Hosted host-tests is still queued and is the only open gate. satchl approved this exact head. Merging pinned to 5351f41. |
Reconcile the #3273 dock-display present-retirement, Type-C release, and host-test changes with main (c948713, including #2673, #3655, and #3939): - drivers/gpu/drm/apple/dcp.c, dcp-internal.h: drop the removed dcpext_scanout_* hooks from dcp_dptx_connect_raw() and dcp_dptx_release_locked(), keep release_owed and the AFK release ticket, retain both dcp_swap_watchdog_keep() and dcp_swap_watchdog_cancel(), and keep main's dcp_typec_fw_unplug_wait() + _dcp_poweroff(dcp, pipe_unplugged) in dcp_poweroff() alongside iomfb_present_lost(dcp, true). - drivers/gpu/drm/apple/iomfb.c: combine iomfb_retire_dropped_present_h17p() attachment reporting with main's shared iomfb_retire_present_locked_h17p() helper while keeping iomfb_present_begun_h17p() and iomfb_present_lost(). - drivers/gpu/drm/apple/iomfb_template.c, dcp_dropped_swap_test.c: record both iomfb_present_begun_h17p() attachment and present_fw_unplugs in dcp_present_begin() and dropped_test_start(). - tools/testing/selftests/drivers/gpu/apple-dcp/edid.py, lifecycle.py, tools/asahi/dock-display-replug-tests.py: keep both the AFK ticket fields in struct epic_cmd_info / apple_dcp_afkep and main's T6030 firmware 27.2 sleep stub (j516s_panel_service) in edid.py, and reconcile poweroff_replug / dock-display-replug mocks with _dcp_poweroff(), dcp_swap_watchdog_cancel(), and iomfb_retire_present_locked_h17p(). Signed-off-by: Erik Bourget <erik@ebourget.net>
What: Host tests have failed on main since #3815. Seven fixtures in
display-sleep-merge-testsandapple-dcpno longer compile, because the driver functions they extract now read firmware 27.2 sleep state that their stub structs don't declare. This change declares that state in the stubs and takesdcp_ext272_admitted()and the profiles' sleep layouts from the driver. It changes no driver code.Tested: Full host-test suite in the
host-tests.ymltoolchain image (clang 18, gcc 13, rust 1.96.0, Python 3.14),--network=none. Head5351f41eon main0bc45c54: 952/952 passed. Main0bc45c54alone: 950/952 (apple-dcpanddisplay-sleep-merge-testsfail). No runtime change.Risk: two-way · none: only the host test fixtures change, and the kernel build is unchanged.
Not yet: the hosted Host tests run on this PR.
Details
The fixtures compile production functions from
drivers/gpu/drm/appleagainst hand-written stub structs. The two #3815 commits below added fields and calls those functions now use:display-sleep-merge-tests(prepare)dcp_platform_prepare()returns early ondcp->ext272apple-dcpv27-panel-handoffapple_dcp_hw_t6030sets.afk_name_fallback,.v27_early_stopand.s2r_layout = &dcp_s2r_t6030apple-dcpt6041-v27-admission, t8122-dcpext-v27-admissiondcp_check_firmware_version()callsdcp_ext272_admitted()apple-dcpservice-rebindafk_recv_handle_init()readshw.afk_name_fallback.afk_v2_receive()readsep->j516s_panel_serviceandsleep_v27_closed(now an enum,DCP_V27_TX_LIVE), and callsdev_info_ratelimited()apple-dcpprovider-admission, ordered-rxdcp_afkep()looks updcp->v27_early_svc_ep[]The fixes:
sleep_v27_closedcopies the driver's enum.dcp_ext272_admitted()is added to the extracted firmware selector. Itsof_property_read_u32()stub returns-ENOENT, and no fixture uses at6030-dcpextnode, so the selector's answers don't change.dcp_s2r_layoutstruct and every layout the four profiles name are taken fromdcp-internal.handdcp.c.dev_info_ratelimited()is counted likedev_info().No scenario sets the new state, so every fixture still exercises the same paths and assertions as before. The TAP count stays at 101.
Fixes: 7d82fde ("drm/apple: restore the T6030 firmware 27.2 display after sleep"), f35156e ("drm/apple: dcp: enable AFK init-prop name fallback on T6030 internal DCP").
Evidence
Image: ubuntu 24.04 with the
host-tests.ymlpins (clang 18.1.3, gcc 13.3.0, rustc 1.96.0, Python 3.14.10). Every run used--network=noneand--security-opt seccomp=unconfined.python3 -I tools/asahi/run-host-tests.py --jobs 8 # full suite python3 -I tools/asahi/run-host-tests.py --jobs 4 --only display-sleep-merge python3 -I tools/asahi/run-host-tests.py --jobs 4 --only apple-dcpdeedd808prepare.c: no member named 'ext272' in 'struct apple_dcp'0bc45c54(DTS-only changes sincedeedd808)5351f41e(treef5893778)Per-job comparison of the two full runs: only
apple-dcpanddisplay-sleep-merge-testsdiffer (FAIL → ok). There are no new failures.