Repository navigation
drm/asahi: default J516C display on and defer GPU until ready - #246
Conversation
T6031 was kept out of the G15 autoload table until it had an admission gate ordering its first firmware start after the native display, as T6030 has through its display and PMP links. Give drm/apple one ready/defer helper with a publication slot per SoC display subsystem, published after DRM registration and client setup and withdrawn before unbind, and export apple_drm_t6031_link_device() beside the T6030 one. T6031 admission calls it after the J516C machine check and before anything else: it defers until that display is published, so a boot that leaves the display disabled keeps the GPU waiting (logged once) rather than starting it. T6030 is unchanged and T6031 gains no PMP vote. Then add apple,agx-t6031 to the alias table. A manual load on J516C now waits for the native display as well. The GPU still needs the m1n1 GPU handoff, the opt-in native display (apple_t6031_display.enable=1) and the pinned board file; this change provides none of them. tools/asahi/g15-display-order-tests.py runs the actual bodies on host models with mutants and is registered in tools/aurora-ci/host-tests.json. Generated-by: LLM Signed-off-by: Chris Kearney <303316+chriskearney@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… slots The T6030 display publisher and link now go through the shared G15 display slots and link helper (8ea9a72). This suite's anchors and C fixture still named the removed apple_t6030_display_publish/withdraw and their lock, so it failed at its first source-order check. Extract the slot, publish and withdraw functions, the shared link helper and the T6030 wrapper, and give the fixture the shared lock and the T6031 slot. The unrelated-display control now uses a non-G15 display subsystem. A new case checks that a published T6031 display takes its own slot and never satisfies T6030 admission. The seven mutants are carried over to the shared code; wrong-gpu keeps the helper's parameter used so that it still builds. One more mutant maps the T6031 slot onto the T6030 one. Every mutant builds and is killed. Production code is unchanged. Generated-by: LLM Signed-off-by: Chris Kearney <303316+chriskearney@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…516C The T6031 native display gate ran only with apple_t6031_display.enable=1 on the kernel command line, so a J516C whose boot loader hands the display over still stayed on the boot framebuffer, and with it the G15 GPU, which waits for that display before its first firmware start. Make the T6031 switch tri-state: unset, the native display is requested on the J516C (root compatible apple,j516c) and not on the other T6031 boards. An explicit apple_t6031_display.enable=0 or =1 wins on every T6031 board, and a value kstrtobool() rejects preserves the previous explicit choice, or the board default when unset. The request is resolved once in gate_run(), before the existing checks. The handoff marker, the boot loader's PMP values, the PMP image, the power layout and every refusal after them are unchanged, so a J516C without a complete handoff keeps the framebuffer and the GPU keeps waiting. T6030, T8122, J514C and T6034 behaviour is unchanged. Update the help, the device tree comment and the G15 wait message, which said that =1 is always needed. The KUnit suite saves and restores the switch and the default board, checks the switch values and their resolution, and runs the default-board path through gate_run() with the test tree's own root: on by default, off with =0, and untouched without the handoff marker. Generated-by: LLM Signed-off-by: Chris Kearney <303316+chriskearney@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pin omacom/m1n1 5d17a0348745e755299f2c6455f6f1c31236d66b, the reviewed head of omacom/m1n1#19. On the 16-inch M3 Max with the 40-core GPU (J516C), m1n1 now requests its existing display handoff by default as well as its GPU handoff, each subject to the existing checks. An owner's chosen.asahi,t6031-dcp=0 or chosen.asahi,t6031-gpu=0 keeps that one off; an existing gpu=0 still gets the display default. The version stays 1.6.1.aurora22-1: that version was never built or published from this branch. The qualification record stays build-only: hardware_tested is false. Native J516C graphics also need the kernel's automatic J516C display request and display-before-GPU gate (omacom/linux-aurora#246) and the kernel's J516C board data, outside this package. An installer image needs its boot.bin rebuilt from this package before its first boot carries the defaults. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
scottjones
left a comment
There was a problem hiding this comment.
We checked this at 41aa66d, alone and merged with #249, clean both ways.
What "ready" means here: apple_drm_init() publishes the T6031 display only after drm_dev_register() and drm_client_setup_with_fourcc() (drivers/gpu/drm/apple/apple_drv.c). Until then, asahi_g15_display_prepare() (drivers/gpu/drm/asahi/g15/glue.c:150) returns -EPROBE_DEFER, and admit() (g15/boot.rs:489) stops before it reads the ADT or touches firmware.
If the display never comes up, the GPU stays in deferred probe for the rest of the boot. It doesn't hang, and it doesn't touch the GPU. The only message is the dev_info_once at glue.c:162, which fires only when the display node is disabled. If the node is enabled but the DCP fails to bind, the G15 driver logs nothing.
Before this PR the T6031 GPU did not wait for the display (boot.rs:482-485 on integration/aurora). Now any display failure also keeps the GPU off. For example, the DCP refuses any image other than F493F03E (iomfb_v14_7.c:56). Please check that the 14.8.3 stub the installer uses carries that DCP UUID, and log a line when the GPU is still waiting on a bound but unpublished display.
Notes:
apple_t6031_display.enable=0now also keeps the GPU off, because the GPU waits for the native display. Please say so in the Kconfig help and in the t6030-display-gate.c comment, so nobody uses it as a display-only switch.- This doesn't address #189. That hang risk is in m1n1's powered identity read, before Linux starts, so a kernel deferral can't reach it.
- Installs that already have
chosen.asahi,t6031-dcp=1(the aurora-sep Max variant) move to the native display on this kernel with no m1n1 change. We want that for the release, but it needs to be in the release notes. Installs from the aurora-sep script also havet6031-gpu=0, so they get the native display but still no GPU. - None of the new code (the J516C default, the deferral, the autoload) has run on a Max. Naeem's J516C boot set
apple_t6031_display.enable=1and a modules-load file by hand. The cold boot above covers that.
What we ran: g15-display-order-tests.py passes (7 C mutants and 2 admit() mutants caught), and t6030-display-admission-tests.py --mutations passes, on this PR alone and merged with #249. A mutant that returns 0 from asahi_g15_display_prepare() on -EPROBE_DEFER fails the display-order controls. We didn't build the KUnit cases.
|
Boot regression results for the combined changes: all three candidate runs passed and returned to their captured packages, boot files and configuration. Both final restoration audits were clean on each Mac; all leases were released. Tested source: this PR at
OMT's retained failures/skips are historical and unscored for this comparison, not an all-tests-pass claim. The native graphics checks used the already-installed userspace unchanged. They are short job-mode compatibility checks, not performance, CTS, thermal soak or ordinary-login desktop qualification. The M3 Pro retained its explicit display/GPU owner settings, so this tests its existing enabled path, not a new default/no-config Pro path. M1/Air do not execute the G15 backend. The M3 log retained the previously observed PMP workqueue and DCP lane-count warnings; M1 retained its previously observed SPI-NOR dummy-regulator warning. Exact earlier matches were checked. Air had no new error lines. No new combination regression was identified; these warnings were not suppressed. On each Mac the guard restored the original Stage2 during the candidate boot's orderly shutdown: one candidate-Stage2 boot, followed by verified original Stage2 No J516C Max was tested here. In particular this does not validate the new Max defaults, #249's Max hardware record on our machines, a fresh installer, or release-wide hardware qualification. #249's later For fresh J516C delivery the pieces are m1n1#19, this display/autoload/readiness change, #249's replacement of the missing board-file dependency, and package #1707, followed by package and installer-image integration. #249 retains a documented one-machine reference-value limit. No firmware pins were widened and nothing was merged or published by this test. |
A T6031 GPU starts its firmware only after the native display is published, so apple_t6031_display.enable=0, or a display that never comes up, also keeps the GPU off for that boot. The Kconfig help and the display gate's comments described the switch as display-only. Say that it also keeps the GPU off. The only G15 line while the GPU waited was the one for a display node this boot did not enable. An enabled display that is not published yet, because its DCP refused or failed to bind or it has not registered, left the GPU deferred with nothing from G15. Say once that the GPU is waiting for the display to come up. Return values and the wait itself are unchanged. The display-order host controls now expect that line, once, for an enabled but unpublished display, and a new mutant that drops it is caught. Generated-by: LLM Signed-off-by: Chris Kearney <303316+chriskearney@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks Scott. Addressed the wording and missing diagnostic in For the installer stub, the existing public evidence supports the expected UUID: Naeem's J516C report identifies OS firmware 14.8.3 / stub 23J220 (reported as 14.7 by m1n1) carrying DCP #189 now has the Recovery answer. Existing aurora-sep |
maralcbr
left a comment
There was a problem hiding this comment.
Checked the 41aa66da...ca6c77a0 delta. The new dev_info_once keeps the -EPROBE_DEFER return and the node put, and admission is unchanged. The Kconfig help and gate comments now say the display-off switch also keeps the GPU off. No blockers from me.
I'm holding the merge until the J516C cold boot Scott asked for (#246 + #249 kernel, m1n1#19 stage 2, empty m1n1.conf). For the release notes: on the next kernel bump, existing aurora-sep Max installs (dcp=1,gpu=0) get the native display with no m1n1 change, and the GPU stays off.
|
Concrete inputs for the requested J516C cold boot are now prepared and independently checked. This is test preparation, not a Max boot result or release publication. Source cohort: this PR at One native aarch64 build completed with the same RC configuration as our preceding test build. The recipe changes are only the test pkgrel and the two source patches/checksums. Private test artifacts:
These packages are held privately, not in a published repository. An owner-built equivalent of the same source heads is also useful; identify its source and binaries rather than expecting an independently built package to have the same hash. Our package inspection confirms the T6031 GPU/display autoload aliases, the new diagnostics, and the unchanged configuration. The four focused combined-source suites pass, including their mutations; private hardware-fixture skips remain explicit. For the owner test:
Please put the first cold-boot result and boot log here. This covers the combined default path on one J516C; it does not establish a new installer installation or wider Max/reference-word qualification. Our M3 Pro/M1 runs and these host/build checks do not replace it. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
J516C (M3 Max 16") cold boot with this PR at Setup: Boot: full shutdown, power on, default Limine entry
Desktop: SDDM greeter, then the normal Hyprland desktop on the internal panel.
No manual workaround and no skipped step. This covers one default-path cold boot on one J516C. Boot log excerpt (display, PMP, DCP, apple-drm, G15) |
|
One clarification on the ADT side note: |
|
@maralcbr @scottjones The requested combined defaults-only J516C cold boot is reported here at unchanged kernel head |
maralcbr
left a comment
There was a problem hiding this comment.
Approving at ca6c77a0. Naeem's cold boot covers exactly the combination we asked for: this head, #249 79f78916 and m1n1#19 5d17a034, hash-checked packages, an empty m1n1.conf and no enable, modules-load or /opt Mesa workaround. Autoload, the native eDP display, the GPU at READY and the SDDM greeter and Hyprland desktop on packaged Mesa all came up. The board-data digest matches Naeem's earlier machine. CI is green, and my earlier comment on the ca6c77a0 delta stands.
Not blockers:
- This is one owner-run J516C with a local Stage 1 (
v1.6.1-dirty, USB proxy window). It doesn't qualify stock Stage 1 or a fresh installer. CONFIG_MTD_PHRAM=nis fine, since G15 reads theadtreserved-memory node directly. The deprecated-workqueue warning fromapple_pmp_start_workis worth a small follow-up.- Release notes: existing aurora-sep Max installs (
dcp=1,gpu=0) get the native display with the GPU still off, and the #189 recovery steps should be linked.
The next kernel pin will also carry #253, which this boot didn't include. Please boot that exact candidate on the J516C and an M3 Pro before or right after it reaches edge.
) * m1n1-aurora: 1.6.1.aurora22-1, the J516C GPU default Pin omacom/m1n1 286529075cb5e56b574e9c8f9ebbe407e0b8de9e (omacom/m1n1#19, on #18's merge): on the 16-inch M3 Max with the 40-core GPU (J516C), m1n1 requests its existing GPU handoff by default, subject to the existing checks. Nothing else changes in the source or the recipe. The qualification record stays build-only: hardware_tested is false. A native J516C GPU also needs the kernel's J516C board data, T6031 module loading and the native display enables, outside this package. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * m1n1-aurora: pin the J516C display and GPU defaults Pin omacom/m1n1 5d17a0348745e755299f2c6455f6f1c31236d66b, the reviewed head of omacom/m1n1#19. On the 16-inch M3 Max with the 40-core GPU (J516C), m1n1 now requests its existing display handoff by default as well as its GPU handoff, each subject to the existing checks. An owner's chosen.asahi,t6031-dcp=0 or chosen.asahi,t6031-gpu=0 keeps that one off; an existing gpu=0 still gets the display default. The version stays 1.6.1.aurora22-1: that version was never built or published from this branch. The qualification record stays build-only: hardware_tested is false. Native J516C graphics also need the kernel's automatic J516C display request and display-before-GPU gate (omacom/linux-aurora#246) and the kernel's J516C board data, outside this package. An installer image needs its boot.bin rebuilt from this package before its first boot carries the defaults. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * m1n1-aurora: pin the merged J516C defaults and display dependency fix Pin integration merge bc79acc4 after m1n1#19 landed, including the separately reviewed and boot-tested T6030 dependency fix in #17. Update the qualification checksum and describe the combined pin without claiming a new native build or hardware run. Keep the package build-only and retain the normal maintainer approval and coordinated kernel delivery requirements. Generated-by: OpenAI Codex --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
On J516C/T6031, native graphics still needed a manual display option and the GPU had no OF autoload alias. This change requests the native display automatically on exact
apple,j516c, adds T6031 GPU autoload, and defers GPU preparation until the native display has completed DRM/client setup and published readiness.An explicit
apple_t6031_display.enable=0keeps the framebuffer path and the GPU deferred for that boot. Other T6031 boards retain their existing explicit-=1display path; J514C GPU admission and T6034 support are unchanged. The boot-loader handoff, PMP image/values/topology and firmware checks remain mandatory. Missing, disabled or unpublished native display returnsEPROBE_DEFERto the GPU; it is never treated as successful display preparation. No global boot refusal is added.The shared display code keeps separate T6030/T6031 publication slots, takes references under the publication lock, and withdraws publication before unbind. The existing T6030 PMP startup path is preserved; this does not add a T6031 PMP vote or claim active-GPU forced-unbind safety.
Dependencies and delivery:
boot.bin. The first boot loading the new Stage2 applies its defaults; a blanket two-reboot workaround is not required.Validation at
41aa66da56ba28868732848bc88544bf0c445df4:Native aarch64 builds of
41aa66dacombined with #249 at23a7bd13and m1n1#19 at5d17a034passed boot, GUI smoke and short native GL/VK regression checks on M3 Pro J516S, M1 J293 and M1 Air J313. All three were restored and both final audits were clean. Exact source cohort, results and limitations. No J516C Max or fresh installer was tested. #249's subsequent79f78916log-only delta is a separate source/CI review, not the binary booted in those runs.Follow-up at
ca6c77a09ff0cd5a0b29bab93c736ada827dc865addresses Scott's review:ca6c77a0: self-test, plan, commits, device trees, compile, both host suites, full kernel package, KUnit, emulated boot/module loading and result. Attestation is normally skipped for a PR. The owned-Mac boot results above belong to41aa66da; the successor binary has not been booted by us. The combined J516C cold-boot report is now linked below for maintainer review.Owner validation: Naeem reports the combined J516C cold boot passed using the exact private
246249.2kernel/headers andaurora22-1loader packages, with their hashes checked. He reports an empty m1n1.conf, no kernel enable override or modules-load workaround, standalone disk cold boot, Stage25d17a034-dirty, both chosen defaults set, native display, GPU autoload/READY and the normal SDDM/Hyprland desktop on packaged Mesa7c86130d. This is one owner-operated J516C using his existing unchanged local Stage1; it is not a second reference machine, a fresh installer/image test or an independent root-operated Max run. Maintainer review, coordinated kernel/loader pins and package/image delivery remain separate.