Repository navigation
kboot: T6050: 27.3 beta 1 display handoff, and external engines beside a kernel-adopted panel (carries #439) - #568
Conversation
…e a kernel-adopted panel - t6050_images: the J714c's 27.3 beta 1 DCP image (58CB3FFC-B2BA-352E- B20B-71A91B15FA9F, OS firmware V27_3B), external engines included. Its DCP nodes get apple,firmware-version/-compat 27.3.0, the kernel's 27.3 method table, instead of the beta's OS firmware numbers (27.2.98.1). - When the device tree already enables dcp and disp0 (a kernel that adopts the internal DCP itself), the internal handoff is refused as before and the external engines are still handed off. t6050_adopted() checks that both nodes exist, are the T6050 DCP and display subsystem, are enabled, and that the dcp sits on an identity-mapped 2/2-cell bus. It then publishes the PMC metadata node their apple,bw-scratch points into beside the dcp, or reuses a matching node, beside the dcp or on another identity-mapped bus, in a scratch copy of the device tree committed only when complete. Anything else leaves the device tree unchanged. - Host tests: tests/t6050_display_host.c covers the 27.3 version mapping and the adopted path (new node, reused node, reused node on another bus, mismatching node, no status, dcp-only, reserved, wrong compatible, dangling alias, mapped bus). The host firmware.h stand-in gains V27_3B. Signed-off-by: Eduard Moldovan <himself@eduardmoldovan.com>
…cenario rows Current main's display code links the ADT child-walk helpers (Type-C routes), which the T6050 fixture does not model: add aborting stubs so a call would fail loudly. The scenario regex now also accepts a row whose expected-result string is wrapped onto the next line. Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com>
There was a problem hiding this comment.
Verdict: MERGE at 1079080 after current CI and hardware
The successor excludes the unrelated instruction-file changes. The adopted path validates both nodes and its bus and commits the PMC metadata via the scratch tree. The 27.3 host fixture builds against the current route helpers. Keep hosted format, pytest and Stage 1 size checks and the current-main T6050 Stage 2 boot receipt.
Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com>
|
Merge readiness at
Areas: none matched in CODEOWNERS Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
erikwb
left a comment
There was a problem hiding this comment.
Verdict: FINISH, then merge at c2ae5d27
Blockers:
src/kboot_display_handoff.c:4152and:4183only check the immediate bus. An emptyrangeson that bus is identity into its parent's address space. If an ancestor translates that address, a matching PMC node can be reused, or a new one published, at the wrong CPU address. Linux resolves the whole path when it mapsapple,bw-scratch. Validate the complete mapping against the ADT PMC window before publishing or reusing a node. Add a nested-bus case to the fixture.src/kboot_display_handoff.c:4248changes direct Stage 1 Linux boot too. A Stage 1 build with a direct Linux payload reaches this same path throughsrc/payload.c:660. It can now enable external DCPs beside an adopted panel. The new image row also applies in Stage 1 throught6050_pick_image(). Keep both new paths in ESP Stage 2 or get approval from the affected machine owners and qualify the direct Stage 1 path.src/kboot_display_handoff.c:3497and:3595require the OS firmware enum even for the new row that supplies its own DCP ABI. The nub's ADT UUID already identifies that image and distinguishes it from other images sharing a boot version. Select the new ABI by that UUID or show which handoff prerequisite independently requires the OS firmware check.
Checked: The new Aura code adds DT edits and no direct register writes. The existing external path checks the running image and reads the power and DART state before enabling an engine. The hardware row is from #439 and predates this head. GitHub reports no conflicts. Stage 1 and ESP Stage 2 size checks pass. The host matrix is red.
Evidence
- The earlier #439 fixes for missing aliases, disabled display nodes and partial PMC edits are present. The new fixture covers immediate bus translation, but its other-bus reuse case places the bus directly below the root. An identity child bus below a translating bus also passes the new checks. The resulting external DCP phandle resolves through the translating ancestor in Linux. Linux bandwidth scratch lookup
- The J714c on 27.3 beta 1 drove its panel and a USB-C display in #439. Repeat that run at the final head. For the J716c, compare 27.0 and 27.2 against main. A known 27.0 image still takes the existing disabled-node path and can now also take the adopted-panel path. An unlisted 27.2 image is still refused before either path, preserving the framebuffer on the disabled-panel DTB. The 27.2 J716c control in #282 used the framebuffer. A J775D 27.2 headless boot would check the shared image-selection and external-engine path. Earlier J714c row · J716c control
- The macOS 26 host job fails to link the DT replay test because it lacks
adt_gpio_by_phandle. Three sibling jobs were cancelled. The test-harness fix is tracked in #570. Rerun the matrix with that fix. Failed job · Host test fix
Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com>
There was a problem hiding this comment.
Verdict: FINISH at 22dfea8.
Checked: Recreated the clean #570 merge. It does not alter the display handoff concerns in review 6101992555. Please validate the full PMC ancestor address translation, keep the new adopted-panel and image paths in ESP Stage 2 unless the direct Stage 1 behavior is authorized and tested, and select the new DCP ABI by image UUID or document the independent OS firmware prerequisite.
|
@edimoldovan here is the full list for this PR (it carries your
If nothing has landed here by 2026-11-30 19:30 AEDT, I'll push 1-3 to this branch myself, keeping your commit, and ask you only for the J714c row. |
Conflicts in src/kboot_display_handoff.c against #282 (prewired T6050 tree, t6050_ext_version): the state keeps both dcp_fw and prewired, the internal publish and both external paths write t6050.dcp_fw, and the adopted-panel helpers sit beside t6050_ext_index(). tests/t6050_display_host.c: the t6041 harness now walks ADT children (adt_tree.h), so the fixture's aborting traversal stubs are dropped. Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com>
The adopted-panel path reused or published the PMC metadata node after checking only its immediate bus. An empty ranges there is identity into the parent's space, so a matching node on an identity bus below a translating one was reused, and the external engines' apple,bw-scratch then resolved, as Linux walks the whole path, to the wrong CPU address. Match a node, reused or newly published, only when its window reaches the CPU at the ADT's PMC address through every ancestor (t6050_identity_reg(), as the prewired path already does), and check the dcp the same way. Use t6050_available() for the status test, as Linux reads status. Host fixture: t6050-adopted-pmc-nested-bus puts a matching node on an identity bus below a translating one; it must not be reused (fails before this change, passes after). Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com>
A Stage 1 with a direct Linux payload (payload.c) runs the same display handoff. With #439 it would also have picked the 27.3 beta 1 image row and, beside a panel the device tree enables itself, enabled external DCPs: neither path has been qualified for a direct Stage 1 boot. Build the 27.3 beta row, its DCP ABI and t6050_adopted() into the ESP Stage 2 only. A Stage 1 keeps what it did before: on that image the internal handoff is refused and the boot framebuffer keeps the panel. Host fixture: tests/t6050_display_host.c is built twice, as the ESP Stage 2 (every scenario takes its path) and as Stage 1 (every scenario is refused with the device tree unchanged); the Stage 1 build fails before this change (6 scenarios) and passes after. Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com>
The 27.3 beta 1 row names its DCP ABI (27.3.0), yet t6050_pick_image() still required the running OS firmware enum to match it. The nub's ADT uuid identifies the image exactly, and nothing else in the handoff reads the OS firmware for such a row, so select it by that uuid alone. Rows whose DCP nodes take the OS firmware's version keep pinning it (27.0 and 27.0.1 share an iBoot version). t6050_ext_version(), which since #282 rewrites the version of the external engines a tree enables itself, now writes the same ABI as the internal dcp and t6050_ext_one(): the picked row's, or the OS firmware's when no row was picked. Before, a prewired tree on that image would have given its internal dcp 27.3.0 and its external engines 27.2.98.1. Tests: t6050-27.3-any-os (the image on an unknown OS firmware is still handed off with 27.3.0) and two ext-version cases (beta and unknown OS firmware, engines get the row's ABI); both fail before this change and pass after. Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com>
|
@edimoldovan the 11-30 19:30 deadline passed with no update, so I've pushed fixes for points 1-3 to this branch. Your commit Merge 1. PMC address translation through parent buses ( 2. Keep the new paths in ESP Stage 2 only ( 3. Select the 27.3b1 DCP ABI by image UUID (
Both fail before this change and pass after. Tested: no hardware row at
Risk: Two-way. T6050 only: J714c on 27.3 beta 1, plus every T6050 ESP Stage 2 boot through image selection and the external-engine version. Rows still needed at
@DjDeveloperr this is ready for your review. App re-review requested at |
There was a problem hiding this comment.
HOLD at 8df57f4 for hosted checks and hardware disposition. The three source findings are addressed: PMC reuse checks the full ranges chain, the adopted path and new ABI row are ESP Stage 2 only, and the UUID-selected ABI reaches both the internal and external nodes while external UUID checks remain in place. Recreated and inspected the display-source merge against both parents. Independently ran 98 focused offline tests, including the Stage 1 fixtures and nested PMC case. The Stage 1 behavior check is source and host-fixture coverage. Please retain hosted size checks, the K114s 27.2 regression row, and the J714c row or maintainer disposition of that gap.
|
Tested: K114s (MacBook Pro M5 Pro 14", T6050, macOS 27.2 firmware), ESP Stage 2 one-shot of Setup:
This covers image selection by UUID and Afterwards the K114s is back on its saved default: Stage 2 |
|
Maintainer disposition (closeout, at |
There was a problem hiding this comment.
HOLD at 8df57f4. The K114s 27.2 regression and maintainer disposition of the J714c gap are recorded. The trial receipt says the installed configuration omits the ESP_STAGE2 compile flag. It exercises the common 27.2 handoff and ABI writes. Coverage of the new ESP_STAGE2 paths comes from the host fixtures and the accepted J714c gap. The exact-head build, vital size, format and Linux pytest jobs are still queued, and the earlier erikwb change request remains active.
There was a problem hiding this comment.
Approved at 8df57f4. The three source findings were resolved, all 98 focused offline tests passed on review, and exact-head hosted checks are green. The K114s regression covers the shared 27.2 path, and the maintainer recorded the J714c ESP_STAGE2 hardware gap. GitHub still shows the earlier human change request. The merge owner should reconcile that review before landing.
|
Merging at |
|
Known-gap issue: #618 |
|
Thanks @edimoldovan, merged: this carries your #439 work, with the App's three findings fixed. Please post the J714c 27.3 beta 1 row on the known-gap issue linked above. |
Carries @edimoldovan's signed commit
e96f3c69from #439 unchanged (authorship kept) onto currentmain. The fork branch has the policy bot'sgfyacommits on top, and one of them deletesAGENTS.md,CLAUDE.md,GEMINI.mdand.github/copilot-instructions.md. Those can't be removed without a force push, so this branch leaves them out. One test-only commit is added: the T6050 host fixture now stubs the ADT child-walk helpers that main's Type-C route code links, and the scenario regex accepts wrapped rows.Tested:
tests/python/test_t6041_display_handoff.pyandtest_t6041_headless_display_handoff.py: 83 passed.clang-formatis clean on the changed files. The author's J714c 27.3 beta 1 default-boot row in #439 was taken on the samee96f3c69code.Risk: two-way door. T6050 display handoff on 27.3 beta 1 firmware, and the adopted-panel path.
Not yet: a J714c/J716c Stage 2 row of this head on current main, and hosted stage1-size, which is red on main until #551 lands.
Revert:
git revert -m 1 <merge commit>Supersedes #439.
Original description:
t6050_images: the J714c's 27.3 beta 1 DCP image (58CB3FFC-B2BA-352E-B20B-71A91B15FA9F, OS firmwareV27_3B), external engines included. Its DCP nodes getapple,firmware-version/-compat27.3.0, which the kernel maps to its 27.3 method table, instead of the beta's OS firmware numbers (27.2.98.1).dcpanddisp0(a kernel that adopts the internal DCP itself), the internal handoff is refused as before and the external engines are still handed off.t6050_adopted()checks that both nodes exist, are the T6050 DCP and display subsystem, are enabled, and that the dcp is on an identity-mapped 2/2-cell bus. It publishes the PMC metadata node theirapple,bw-scratchpoints into beside the dcp, or reuses a matching node (beside the dcp or on another identity-mapped bus), in a scratch copy committed only when complete. Anything else leaves the device tree unchanged.Tests
Host:
tests/t6050_display_host.c, 11 scenarios: the 27.3 version mapping, and the adopted path (new node, reused node, reused node on another bus, mismatching node, no status, dcp-only, reserved, wrong compatible, dangling alias, mapped bus). 10 of them fail against the previous head.t6041_display_host52/52,t6041_27_display_host28/28 and the T8122 handoff test pass.Hardware, default boot path: J714c (M5 Max, macOS 27.3 beta 1 firmware). This PR's aura (
make CHAINLOADING=1 ESP_STAGE2=1) installed asaurora/stage2.binon the ESP, started by the enrolled Stage 1 with no proxy,boot=selecting the kernel as indocs/t6050-linux.md. Kernel 7.3.0-j714c-hdmi73+ (a DT that enablesdcpanddisp0), the machine's normal command line./chosen/asahi,t6050-dcp-handoff=refused; the kernel drives the panel (eDP-1 3024x1964@120).apple,firmware-version<27 3 0>, theirapple,bw-scratchon the published PMC metadata node beside the dcp (the DT's own copy is on a bus with a translatingranges, so it is not reused).idle=nop, appended by main's T6050 support, not by this change.