Repository navigation
Conversation
|
Blockers: 2. The table-first translation is the right shape, and 27.0 is unchanged: iomfb_v27_methods_renumbered() is false for the 27.0 table and for the J714s copy, so every caller sends the same ID as before. Checked: the peer power/mode-set/swap callers, the sleep RPC, the stage calls, the out-of-band wake call, and the transport gate.
HW row: the J716c rows from the body on the rebased branch, plus one other T6050 board (J714s on 27.0: paired mode and deep sleep unchanged); if a 27.3 stub is available, a paired 4K240 mode on 27.3 is refused cleanly with no engine panic; 0 AVC / 0 failed units / 0 new kernel errors. Assisted-by: LLM (Claude:Opus 5.5) |
|
Erik, a heads-up from rebasing #2201 (which carries these three commits) onto The test extracts the function that now calls |
dcp_check_firmware_version() calls isdigit() since "drm/apple: send the firmware 27 calls named by ID in the engine's build", and t6041-v27-admission compiles a host copy of it without <ctype.h>: host.c:383:55: error: call to undeclared library function 'isdigit' Include it. Belongs with that commit (aurora-silicon#2187) and leaves this series when it is fixed there. Signed-off-by: Jens Axboe <axboe@kernel.dk>
… build The paired mode set (a mode too wide for one engine, run on two) sends its IOMFB calls through dcp_peer_video_call_stream() (and the opt-in peer setup diagnostic through peer_setup_test_store()), naming them by their 27.0 IDs. Firmware 27.2 renumbered the IOMobileFramebufferAP methods, and an ID the firmware does not know panics it: on a 27.2 stub the paired prepare's set_display_device went out as A411 and crashed both engines. Record every paired-mode and sleep method ID in each firmware 27 build's table (the shifted IDs on 27.2, plus the unchanged paired/DSC hand-off and sleep calls) while keeping them optional for single-engine boot admission in iomfb_v27_missing_method(). Translate each call's ID through iomfb_v27_tag(): on 27.0 (including the J714s copy) every ID is sent unchanged; on a renumbered build every ID must come from the build's table, returning -EOPNOTSUPP instead of sending an unmapped ID. Update the t6041-v27-admission host test fixture for the table helpers it extracts. Signed-off-by: Erik Bourget <erik@ebourget.net>
Besides the paired video calls, the firmware 27 paths name several calls by their 27.0 IDs: the primary's paired mode set (A413) and power step (A484), the paired background swap (A408), the sleep's power and A500 steps, the display stage calls and the out-of-band wake call (A442). On 27.2, which renumbered IOMobileFramebufferAP, several of those IDs are other methods: the paired mode's power step ran one and failed, and the second engine of a 4K240 mode never started. Translate each of them through iomfb_v27_tag() and refuse the call instead of sending it when the build's table lacks an entry. Zero the internal wake A442 payload's filler bytes on renumbered builds, where 27.2 rejects the 0xaa filler as an index count and block size. The J714s's A407 swap keeps its ID, which only its 27.0 table names, and its diagnostic now refuses a pair whose engines take different swap forms. 27.0 sends what it sent. Signed-off-by: Erik Bourget <erik@ebourget.net>
The T6050 display processors take part in a deep sleep through the firmware 27 endpoint transport, which previously gated on the J716c board compatible and a 27.0.0 compatibility string. On a 27.2 stub no processor registered for the sleep, and every deep sleep was refused ("display 0: no provider").
Admit a T6050 DCP or DCPEXT to the firmware 27 sleep transport whenever its build's method table has an ID for every call the sleep sends (iomfb_v27_sleep_methods_complete()). That covers 27.0 and 27.2 across T6050 boards without a board check while refusing 27.3 until its sleep methods are known. Add the v27-tag-translation host selftest covering table translation, fail-closed refusal on missing/unrecorded IDs, and data-driven sleep transport admission.
Signed-off-by: Erik Bourget <erik@ebourget.net>
aff9b61 to
7375b71
Compare
|
Note 🤖 Gemini 4 Neon responding on behalf of erikwb Rebased onto
Hardware re-runs on the rebased head are noted under Still to run in the PR body. |
|
Re-checked at 7375b71.
Nits:
Rows still needed at this head: J716c on 27.2 and 27.0 (paired 4K240, 30 s RTC deep sleep and resume, default command line, 0 AVC / 0 failed units / 0 new kernel errors); the J714s on 27.0 with paired mode and deep sleep unchanged; a boot and a deep sleep on a J714c or J716s, which this now admits; and, if a 27.3 stub is available, a clean refusal of the paired mode. Assisted-by: LLM (Claude:Opus 5.5) |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Review of 7375b71bfadf78bc86f6c897f34d01618e45922f
0 code/policy/attribution blockers. Holding APPROVE only for §5 hardware re-runs on the live head (plus merge coordination with #2070 / #2201).
Checklist summary
- §1 No model gating: Pass.
dcp_v27_sleep_transport_supported()(drivers/gpu/drm/apple/dcp.c:5845-5859) dropsof_machine_is_compatible("apple,j716c"),dcp->v27_j714s, and the"27.0.0"compat-string list, admitting anyapple,t6050-dcp/apple,t6050-dcpextwhose table satisfiesiomfb_v27_sleep_methods_complete(dcp->v27_methods). The newv27-tag-translationselftest enforces at compile time that noof_machine_is_compatible()call can creep back in. (Minor cosmetic: the PR title still saysJ716c, whereas commit 3 generalizes admission across T6050.) - §2 Hygiene & §3 Correctness: Pass.
- Arithmetic
+50inference is removed;iomfb_v27_tag()(drivers/gpu/drm/apple/iomfb_v27.c:311-332) fails closed (-EOPNOTSUPP) on aNULLtable or any unmapped ID in a renumbered table. - Cross-checked all direct-ID callers across
dcp-peer-*-v27.inc,dcp-v27-sleep.inc, andiomfb.cagainstdcp_methods_27_0anddcp_methods_27_2: all 58 entries match 1:1 with zero missing or duplicate tags, every caller refuses on error, anddcp_peer_probe_power()/dcp_peer_probe_modeset()pre-validatepeer->v27_methodsbefore pushing to the primary engine. - Confirmed probe initialization order in
dcp.c:dcp->v27_methodsis populated (:7145-7154) beforedcp_v27_sleep_transport_supported()runs (:7245), andiomfb_v27_sleep_methods[]covers all 8 methods used by firmware 27 sleep. - Non-blocking nits:
iomfb_v27.c:335-338:iomfb_v27_methods_renumbered()allowlistsdcp_methods_27_2 || dcp_methods_27_3by pointer; treating anything other than 27.0 (and the J714s copy) as renumbered would fail closed automatically if a futuredcp_methods_27_4table is added.iomfb.c:899-900: a failedA442tag lookup returns silently without logging; adev_warn_once()would make any future misconfiguration visible.
- Arithmetic
- §4 Attribution & clean-room: Pass. All 3 commits (
ba959978b738,86a98ff3ed71,7375b71bfadf) carry human author/committer andSigned-off-byonly (Developed with Claude Code.removed); PR body includesAssisted-by:. - §6 Naming: Pass.
- CI / Mergeability:
MERGEABLE/CLEANagainstintegration/aurora; CIhost-testsSUCCESS on7375b71bfadf. - Cross-PR coordination:
- Overlaps with open PR
aurora-silicon/linux#2070(currentlyCONFLICTING), which refuses T6050 firmware 27 deep sleep at.prepareunlessv27_sleep_known(J714s 27.0 only) is set;#2070will need rebasing onto#2187(keying oniomfb_v27_sleep_methods_complete()). aurora-silicon/linux#2201currently carries the earlier pre-refactor versions of these 3 commits plus thectype.hhost-test workaround and can drop them once#2187merges.
- Overlaps with open PR
Remaining items (§5 evidence on live head 7375b71bfadf)
- J716c (M5 Max) on firmware 27.2 and 27.0 at
7375b71bfadf: paired 4K240 external displays + 30 s RTC deep sleep & resume on the default command line (includingA492wake reply status from the 27.2 wake log), with 0 AVC / 0 failed units / 0 new kernel errors. - J714s on firmware 27.0: paired mode and deep sleep unchanged.
- J714c or J716s (newly admitted by removing the
apple,j716cgate): boot + deep sleep check, plus clean refusal of paired 4K240 on 27.3 without engine panic if a 27.3 stub is available.
Assisted-by: LLM (Gemini 4 Neon)
Problem
Firmware 27.2 renumbered the
IOMobileFramebufferAPmethods (A4xxandA500up by 50). The build-selected method tables already carry those IDs for table-driven calls, but three paths on T6050 display engines still assumed 27.0:dcp_peer_video_call_stream()andpeer_setup_test_store()) sent 27.0 IDs; the first call (A411) panicked both engines on 27.2.A413,A484,A408,A500, display stage calls, and out-of-band wakeA442); on 27.2 several collided with other methods, leaving the second engine of a paired 4K240 mode dark and sending 0xaa filler bytes that 27.2's wake call rejects.dcp_v27_sleep_transport_supported()) gated on the J716c board compatible and a"27.0.0"compat string, refusing deep sleep on 27.2 ("display 0: no provider").Change
dcp_methods_27_0anddcp_methods_27_2(the shifted IDs plus the unchanged paired/DSC hand-off callsA360..A373and sleepA115), keeping those entries optional for single-engine boot admission iniomfb_v27_missing_method().iomfb_v27_tag()translates through the engine's table with no arithmetic fallback: 27.0 (including the J714s copy) stays unchanged, while aNULLor renumbered table missing an entry returns-EOPNOTSUPP.dcp_peer_video_call_stream(),peer_setup_test_store(),dcp_peer_probe_power(),dcp_peer_probe_modeset(),dcp_peer_queue_background(),iomfb_v27_rpc(),iomfb_v27_call(), and the out-of-band wake call iniomfb_v27_sleep_start()) refuses the call instead of sending an unmapped tag. On renumbered builds,iomfb_v27_sleep_start()zeros the internal wakeA442filler bytes. The J714sA407swap path keeps its ID and refuses pairs with mismatched swap forms.dcp_v27_sleep_transport_supported()admits any T6050 DCP or DCPEXT whose build table names every sleep method (iomfb_v27_sleep_methods_complete()), removing the J716c board compatible and firmware version string list while refusing 27.3 until its table is complete.t6041-v27-admissionfor the extracted table helpers and addv27-tag-translationtotools/testing/selftests/drivers/gpu/apple-dcpcovering table translation, fail-closed refusal on unrecorded/27.3 IDs, and board-agnostic sleep transport admission.Testing
7375b71bfadf, rebased ontointegration/aurora606d37ec77a5):arm64W=1build ofdrivers/gpu/drm/apple/{dcp,iomfb,iomfb_v27}.opasses with bothCONFIG_APPLE_SOC_SLEEP=yandCONFIG_APPLE_SOC_SLEEP=n(0 warnings in touched files).7375b71bfadf):tools/testing/selftests/drivers/gpu/apple-dcp/run.py --group bootpasses 4/4 (oslog-events,syslog-policy,t6041-v27-admission,v27-tag-translation).auramain+ drm/apple: qualify external SDR color and monitor EDID on J700 #280/media: apple: avd: allow more than 32 capture buffers per context #281/drm: apple: answer the DPTX port's group 1 calls as macOS does #282, both 27.2 and 27.0 stubs drove the internal panel (3456x2234@120) and both paired 4K240 monitors without display processor crashes, and completed a 30 s RTC deep sleep and resume with all three displays, GPU, and ANE healthy.Still to run
7375b71bfadf.Assisted-by: LLM (Google:Gemini 4 Neon)