Skip to content

M3 Max (J516C): on-demand parameter buffer, panel EDID and 120 Hz, CDM walk fix (stacked on #177) - #182

Merged
chriskearney merged 11 commits into
omacom:integration/aurorafrom
malik-na:t6031/stack-on-177
Oct 23, 2026
Merged

chriskearney merged 11 commits into
omacom:integration/aurorafrom
malik-na:t6031/stack-on-177

Conversation

@malik-na

@malik-na malik-na commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Stacked on #177; merge after it. This adds the J516C (M3 Max, T6031) work from aurora-silicon/linux#363 that #177 does not carry, ported onto #177's code. It also fixes three problems found by booting #177 on a J516C.

Commits

Commit Change
d77c5566 drm/apple: give the J516C panel an EDID eDP-1 gets a 256-byte EDID: make, model, size, model year 2023, gamma 2.2, P3/D65. The base block's detailed timing is the panel's geometry at 60 Hz, because EDID's 16-bit pixel-clock field (at most 655.35 MHz) cannot hold the 120 Hz timing (3536 x 2456 x 120 = 1,042,129,920 Hz). A DisplayID 2.0 extension carries the real 3456x2234 120 Hz timing as its preferred timing. DRM modes still come from the DCP firmware, not from this EDID. edid-decode and libdisplay-info both report it conformant. J516C record only.
e3f69b77 drm/apple: stamp the J516C panel's 14.7 swaps Swap timestamps on 14.7 firmware: the panel runs at 120 fps instead of 60. J516C record only.
94148052 … 59aced96 (5 commits) On-demand parameter buffer, replacing #177's demand-backed PB. Details below.
ae93621a drm/asahi: g15: m3: bound the CDM stream walk by bytes, not by 8192 records #177's gate refused three multi_draw.mosaic.*max_draws*with_tess* dEQP cases. The walk is now bounded at 65 x 64 KiB of records, the 64-link limit is unchanged, and the last page found good (program or indirect arguments) is not checked again, with at most 16384 page checks per walk ("CDM page check budget"). Worst case on the J516C: about 149 ms per compute command (about 0.8 s without the cache and the bound).
c562b82d drm/asahi: g15: select the Rust firmware loader abstractions Restores the select. Without it, a config with APPLE_AOP and APPLE_SEP off fails to build (kernel::firmware unresolved).
aa142eed drm/asahi: g15: m3: run the PB reclaim check after the idle time without new work Lets the idle reclaim run when no new job arrives (via the existing poll work).
a089fd06 drm/asahi: g15: say when the boot loader left the GPU node disabled Logs one line when /chosen/asahi,t6031-gpu (or t6030) left the GPU node disabled. Before this, the driver logged nothing.

Parameter buffer

#177 this PR
Initial posting 1024 blocks (128 MiB) 64 blocks (8 MiB), g15_pb_blocks
Backing 4 MiB chunks, allocated inside the growth answer while the firmware waits 16 MiB chunks, allocated after the reply, with one chunk in reserve: the reply never waits on the allocator
Returned never idle reclaim after 1 s (g15_pb_reclaim, g15_pb_idle_ms, g15_pb_reclaim_blocks)
Back-to-back heavy clients heap runs to 4095, then fail-stop re-init at a client boundary (50 ms idle, more than half the maximum posted)

Kept from #177: the 4095 posted cap, mapping at publication with its one-VM check, and the checked backing helper.

  • A compute-only client right after a reclaim runs one flight at a time until the next render. While a reclaim's re-initialization is pending, publish() keeps one flight and no mixed prefix (engine.rs), so compute work submitted between the reclaim and the next render's InitBM is published one prefix at a time. No backing is allocated or posted for it (tested: compute_between_reclaim_and_initbm), and the first render re-initializes as usual. On the J516C, 8 compute dispatches in that window (between about 60 ms and 1.2 s after a level-2 free) all ran correctly with no fault.
  • With no render after a client boundary, the kept backing above the kept chunks is freed after g15_pb_idle_ms (level 2), and the poll is armed for that, not for the expired 50 ms.
  • Nothing is re-initialized when nothing grew since the initialization.

T6030 note: these PB changes are in shared G15 code, so they apply to the M3 Pro too. They are untested on a T6030. g15_pb_blocks=1024 restores the old start, and g15_pb_reclaim=0 turns the reclaim off.

Tested on a J516C (M3 Max, 14.7 firmware, native Mesa aurora-silicon/mesa#25)

Booted with #177's own J516C device tree. Results are #177 head vs this PR:

Test #177 this PR
Display EDID 0 B, 60 fps EDID 256 B, kmscube 120.03 fps; the first swaps of a boot complete in 2.9-8.1 ms
Full unfiltered dEQP, run 1 VK 703/2/3 Crash, GLES3 955, GLES31 796/1 VK 706/2/0, GLES3 955, GLES31 796/1
Full unfiltered dEQP, run 2 (same boot) fail-stop (PB at 4095, refused, hang) identical to run 1, 0 faults
Concurrency (desktop + GPU load + VK -j2) 3 Crash 0 Crash, 0 faults
host_write_index_buffer.1048576: 1 run + 4 after idle + 8 back to back fail-stop on run 2 13/13, 0 faults, 0 allocator waits
PB at idle 128 MiB, kept 32 MiB; kept backing freed about 1 s after the last job
glmark2 (one boot each) 476–481 529–536

Static checks:

  • each commit builds alone (asahi, apple at W=1);
  • tools/aurora-ci/check-commits.py passes;
  • checkpatch --strict gives 0 errors;
  • the asahi-g15 selftests, the PB growth harness (including its mutations) and the zero-words test pass at every commit.
  • Re-tested after the review fixes on Integrate reviewed G15, T6030 dock and platform fixes on the 7.2.11 update #177's head d60121ff: per-commit build, the G15/DCP host suites, KUnit (1541 pass, 0 splats), and J516C runs. See the per-item notes in the replies.

Needed outside the kernel (installer / distro)

  1. GPU enable. On the J516C, native G15 starts only if the installed m1n1 config sets chosen.asahi,t6031-gpu=1. Integrate reviewed G15, T6030 dock and platform fixes on the 7.2.11 update #177's installer writes 0 for the M3 Max. With 0, the GPU node stays disabled and this PR now logs: native G15 not started: the boot loader left the GPU node ... disabled.
  2. No-GPU desktop fallback. With no GPU bound, Hyprland finds no renderer and spins at about 100 % CPU, which makes the desktop unusable. Integrate reviewed G15, T6030 dock and platform fixes on the 7.2.11 update #177's software-rendering fallback covers T6030 and T8122 only. The J516C needs the same.

Not covered

  • Untested on the T6030 (see the note above) and on the 14" J514C, which gets no new display flags.
  • The panel comes up at 3456×2160 with the notch hidden. drm/asahi: enable J514C graphics on normal boots #363's path gave 3456×2234. This PR leaves that unchanged.
  • Suspend and resume were not re-tested on this branch.

@greptile-apps

greptile-apps Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge based on the code reviewed.

Summary

Adds J516C panel identification and faster swaps, changes G15 parameter-buffer backing and reclaim, and expands the CDM walk limit.

  • The J516C panel reports its display details and supports 120 Hz swaps.
  • G15 starts with a smaller parameter buffer and reclaims its backing after idle time.
  • The G15 CDM gate admits longer command streams with bounded page checks.
  • Rust firmware-loader support is selected for G15 builds.
  • G15 reports when the boot loader leaves its GPU node disabled.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Render work grows PB] --> B[GPU becomes idle]
  B --> C{Reclaim becomes due}
  C --> D[Mark re-initialization pending]
  D --> E{Long idle and reclaim level 2}
  E -->|Yes| F[Free backing above kept chunks]
  E -->|Not yet| G[Keep backing and schedule later check]
  G --> E
  D --> H[Compute work runs one flight at a time]
  F --> H
  H --> I[Next render rebuilds pools and posts initial blocks]
  I --> A
Loading

Reviews (3) · Last reviewed commit: "drm/asahi: g15: say when the boot loader..." · Reviewed by Greptile

Comment thread drivers/gpu/drm/asahi/g15/pools.rs Resolved

@maralcbr maralcbr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @malik-na, this is solid J516C work, and the before/after table makes the case well: no fail-stop on the second dEQP run, no crashes under concurrency, and the PB comes back down at idle. The EDID builder, the J516C-only swap stamps, the Kconfig select and the loader log all look right to me.

Before merge:

  • CI hasn't run on this branch. kernel-ci.yml:19-21 only triggers for pull requests to integration/aurora, so nothing ran here: no per-commit compile, no host suites, no KUnit for the new apple-dcp-panel-edid suite or the new v14-board cases. Once #177 lands and this targets integration/aurora, it needs a fresh push (retargeting alone doesn't start a run) and a ci:build run so KUnit and the package build happen too. Locally at 35e74f79: check-commits.py passes (11 commits signed off, two checkpatch warnings), and g15-pb-growth-tests.py --mutations, g15-zero-words-tests.py --mutations and the asahi-g15 selftest (70 ok, 2 ignored) pass. dcp14-panel-tests.py fails at your merge base on the J514C assertion, but a5a2f02 on the current base fixes that, and it passes on a trial merge, which is clean.

Should fix before merge:

  • Kept backing isn't freed if no render follows a client-boundary re-init. With more than 2047 blocks posted, the 50 ms path in reclaim_check() sets recovery.reinit and keeps the backing. From then on reclaim_check() and reclaim_delay_ns() both return early on the pending re-init (pools.rs:709, pools.rs:839), so the 1 s free never runs until the next render. A machine that goes idle right after a heavy client (screen locked, display off) keeps up to the whole 512 MiB heap. Please let the long-idle free run when the pending re-init came from a reclaim, and arm the poll for the remaining long-idle delay, not the expired 50 ms one. A growth-harness case with no render after the drain, checking that nothing wakes in a loop, would cover it.
  • Re-initializing under a live client is guarded only by time. ab98a72 says a re-init with no idle time, between two renders of one client, faulted at the heap base. drain_reinit_due() (growth.rs:178) and the 1 s reclaim don't know whose render comes next, so a single client whose renders are more than 50 ms apart, with over 2047 blocks posted, gets the same mid-client re-init, just later. Could you either explain what faulted and why the firmware is quiescent after 50 ms, or run one process through a heavy scene, idle 60 ms and then 1.1 s, render again, and post the fault count? If that shows a problem, keying the 50 ms path on the next render prefix coming from a different VM than the last published one is one way out.
  • The EDID says gamma 1.00. The block is zeroed (dcp-panel-edid.c:89) and byte 0x17 is never set, and 0 there encodes gamma 1.00, not "unknown". 0xFF doesn't fit either, because in EDID 1.4 it points at an extension block this EDID doesn't have. Please set a value you can justify for this panel (0x78 if a nominal 2.2 is right) and assert it in the KUnit test.

Smaller things:

  • reclaim_due() and drain_reinit_due() (growth.rs:162, :178) also fire when nothing grew: a g15_pb_reclaim_blocks below g15_pb_blocks, or a g15_pb_blocks above 2047, re-initializes after every qualifying idle. Requiring posted > initial in both, mirrored in reclaim_delay() (growth.rs:197), fixes both cases.
  • While a reclaim's re-init is pending, publish() keeps one flight and no mixed prefix until the next render (engine.rs:559-565, :723-725), so a compute-only client right after a reclaim runs one flight at a time. Fine as it is, but worth a line in the PR body.
  • 33922ce's message says 120 fps was measured on an earlier present path, "not yet on this one", while the PR body now has kmscube at 120 fps on this branch. Worth updating the message so the history carries the result.
  • The installer writing chosen.asahi,t6031-gpu=0 and the missing J516C software-rendering fallback should be tracked as issues in their own repos, so they don't get lost behind this PR.

Not a code issue: the PB changes also change the T6030 defaults (64 blocks at start, reclaim on), and they're untested there. Whether the M3 Pro gets them now or keeps #177's defaults until there's a T6030 run is a maintainer call, and I'll settle it before merge.

For release (not the source merge): suspend and resume on the J516C with this branch, cold-boot evidence, and a T6030 run if the new defaults apply there.

Comment thread drivers/gpu/drm/asahi/g15/pools.rs Outdated
if level == 0
|| !self.engine.flights.is_empty()
|| !self.engine.pending.is_empty()
|| self.recovery.reinit

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

After the 50 ms drain sets recovery.reinit with the backing kept, this return (and the one at :839) stops the 1 s free until the next render, so an idle machine keeps the heavy client's backing.

/// ms) never reach `g15_pb_idle_ms`, and posted blocks never come back while a PB lives, so
/// without this they run the heap to the maximum. A re-initialization with no idle time,
/// between two renders of one client, faulted at the heap base.
pub(crate) const fn drain_reinit_due(&self, idle_ns: u64) -> bool {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is time-only: a single client with renders more than 50 ms apart and over 2047 blocks posted gets the mid-client re-init that faulted at 0 ms. Requiring posted > initial here and in reclaim_due() also stops re-inits when nothing grew.

manufacturer = manufacturer << 5 | (id->vendor[i] - '@');
}

memset(block, 0, sizeof(*block));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Byte 0x17 stays 0 after this, which encodes gamma 1.00. Please set a value you can justify and assert it in the test.

@maralcbr maralcbr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Follow-up on my earlier review, still at 35e74f79. Everything from that review is still open. These points are new.

Should fix before merge

  • Recovery can strand a growth request. refill_backing() returns early whenever recovery.reinit is set (g15/pools.rs:637). A fragment kill sets reinit while later same-VM flights are only marked doomed and may still be running (g15/recovery.rs:222-224). Once their reserve is used up, accept() returns Wait (pools/growth.rs:235) and nothing refills it. That flight then holds the engine: publish() admits no other VM, and no new same-VM prefix while reinit is pending (engine.rs:559-567). That lasts until its deadline arms another kill, and a failed recovery there fail-stops every VM (recovery.rs:373-381). Before this PR, back_pb() allocated regardless of reinit. Skipping the refill only when reinit is pending and no flights are live would keep the reclaim case and close this one.
  • Freeing posted blocks before the re-init. A level-2 reclaim frees and unmaps every chunk above keep_chunks() while the firmware still has up to posted blocks published. Nothing touches them until the next render's InitBM, so this is safe only if an idle engine never reaches those blocks: no compute-only client after a reclaim, no firmware background PB work. Since a no-idle re-init faulted at the heap base, please say what makes the idle case safe, or add a test that runs compute right after a level-2 reclaim and reports faults.
  • Rebase onto #177's current head and run CI there. #177 has moved to 03c3afe7, and its follow-ups touched g15/mod.rs, g15/boot.rs (Session::uat() no longer returns Result) and the dcp.c bind paths. GitHub says it merges cleanly, but the combined tree hasn't been built or tested.

Smaller

  • stats.freed is counted before vms.open() can fail (pools.rs:732-735). On that failure the VM mappings keep the pages, so the stat overstates what was freed.
  • dcp_panel_edid_update() always writes the DT panel size into display_info, while dcp_update_connector_dimensions() prefers the firmware's dcp->width_mm/height_mm (dcp.c:585-598). Calling the existing helper after the update keeps one source of truth. The new dcp_get_modes() branch also skips the firmware-derived path without clearing drm_edid_firmware_derived.
  • Beyond the gamma byte: the block has manufacture year 0 (1990) and no detailed timing in the first descriptor, which EDID 1.4 requires. libdisplay-info based compositors will flag it as non-conformant. A real year (or the model-year flag) is cheap to add.
  • The CDM byte budget lets one submission walk up to 1,064,960 barrier words (4.06 MiB, gate.rs:33, :140), about 130 times the old 8192-record cap. Reads are cached in 256-byte spans, so it's probably fine, but it's worth checking how long a worst-case walk holds its lock.

Maintainer decision: whether the M3 Pro gets the new PB defaults (64-block start, reclaim on) before a T6030 run. I'll settle that before merge, as I said.

@chriskearney chriskearney left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks, Naeem. I reviewed 35e74f79 and reran the G15 selftest (70 passed, 2 ignored), PB growth harness (24 passed, all 22 mutants caught), and zero-word checks (15 passed, 2 ignored).

I can reproduce Marcelo's live-flight refill finding with the actual bodies extracted by your PB harness:

let mut f = Firmware::new(); // one live render
f.pools.ledger.posted = f.pools.ledger.backed;
f.recovery.reinit = true;
f.queue();
for _ in 0..4 { f.pass(); }
assert!(f.events.grow.is_empty());

That assertion fails: posted=256 backed=256 waits=4 refills=0. Limiting the refill skip to reinit && flights.is_empty() makes this case pass. This is a host reproducer of the stalled request, not a hardware fault claim. Please keep separate tests for pending re-init with no flights and pending re-init with a still-running render; the existing pending_reinit_backs_nothing case currently has a live flight and requires the behavior that causes the stall.

One additional test gap around the reclaim review: the harness's Pools::drop_chunks() calls ledger.reinit() immediately, but production reclaim_check() frees the chunks and defers that reset until the next render. So freed_chunks_are_mapped_again exercises a cleaner state than production: it resets the posted count before the intervening compute-only/idle interval. Also, the growth harness extracts neither reclaim_check() nor reclaim_delay_ns(), so its passing mutation checks don't cover the pending-reinit timer problem. Could those tests run the actual reclaim/free and scheduling bodies, keeping the old posted count until InitBM, with a same-client render after 60 ms / 1.1 s and a compute-only submission between reclaim and InitBM?

I agree with holding the reclaim changes for those fixes and the lifetime check Marcelo requested. I'm also building the clean combination with the current #177 head for a bounded M3 Pro lab boot; I'll report that separately and won't treat a successful boot as proof of the reclaim edge cases.

@chriskearney

Copy link
Copy Markdown

I also ran a bounded M3 Pro/J516S hardware check with this head (35e74f79) merged onto the current #177 head (d60121ff), combined commit 205f5e8b.

It booted with all 12 CPUs. OpenGL and Vulkan hardware readback passed, as did five renders per context at 100k, 1m and 4m triangle instances. Each context stayed open across 60 ms and 1.1 s pauses; the longer pauses also had a compute dispatch and checked readback before the next render. No GPU recovery, hang kill or host fault was recorded.

The PB counters showed real growth and deferred backing allocation:

initial: posted 64, backed 256 blocks (2 chunks)
final:   posted 324, backed 512 blocks (4 chunks)
requests 26, grown 260, waits 0, refills 2, reclaims 0, freed 0

This does not cover the recovery/refill issue above or establish reclaim safety: the run never crossed the 1024-block reclaim floor or the short-idle threshold, and the four backed chunks were still needed for the posting plus reserve. It also doesn't test the J516C panel changes.

The separate Omarchy test runner could not execute (exit 126, its existing directory permissions), so I'm not counting that suite as passed. An initial attempt also stopped on my own test's incorrect assumption that Rust module parameters had sysfs files; that was corrected before the completed run. The original kernel, boot files and package inventory are restored and checked.

So there is a useful T6030 boot/render data point now, but I'd still address the recovery/refill and test-model issues before merging.

The DCP gives no EDID for a built-in panel, so on the 14.7 panel role
eDP-1 has an empty edid property and compositors see no make, model or
physical size.

Add a builder for a two-block EDID from the panel's device-tree node
and a table of the known panel models:
- the base block (EDID 1.4) names the panel by the PNP ID of the
  vendor prefix and the model of its most specific compatible
  ("apple,panel-j516" gives APP and the monitor name J516), gives its
  size, the model year (2023 for the J516), a nominal gamma of 2.2 and
  P3 primaries with a D65 white point (the panel is a P3 wide-colour
  panel, and the sRGB transfer function of Display P3 approximates a
  2.2 gamma);
- its first descriptor is a detailed timing, as EDID 1.4 requires,
  with the panel's geometry at 60 Hz: the same totals and horizontal
  porches as the panel's mode, the vertical front porch at 63 lines.
  The panel's own timing, 3456x2234 at 120 Hz, does not fit: the
  detailed timing's pixel clock field is 16 bits in 10 kHz units (at
  most 655.35 MHz) and the panel needs 3536 x 2456 x 120 =
  1,042,129,920 Hz; its 6-bit vertical front porch cannot hold the
  panel's 118 lines either;
- a DisplayID 2.0 extension carries the real 120 Hz timing as its
  preferred Type VII timing (1042130 kHz, the DCP mode line with the
  notch rows shown: 3456 3464 3496 3536 / 2234 2352 2360 2456), with
  the display parameters (size, native pixels, colour, gamma).
Neither block is a mode source: DRM modes still come from the DCP
firmware, and the update adds no mode. There is no product code,
serial number, luminance or range descriptor. edid-decode and
libdisplay-info both report the EDID conformant.

dcp_panel_edid_update() publishes the EDID on a connector. Add a
base_edid flag to the 14.x board records, set only in the J516C
record. On that board, read the make and product from the panel node's
first compatible at bind, and when a probe has modes and no other EDID,
publish the panel's EDID sized as the connector is
(dcp_update_connector_dimensions(): the firmware's size, else the
node's), then give the connector back its size in millimetres, which
the EDID update replaces with whole centimetres, and clear the
firmware-derived EDID flag. Displays with a firmware EDID, the J514C
(whose record carries J514S panel values) and the T6030 panels (J514S,
J516S) leave the flag clear and are unchanged. On the J516C the
connector keeps its one firmware mode, 3456x2160 at 120 Hz.

KUnit (apple-dcp-panel-edid): the EDID is valid to drm_edid_valid(),
drm_edid_get_product_id() and drm_edid_get_monitor_name() give APP, no
product code or serial and J516; the base block holds 35x22 cm, gamma
2.2, model year 2023, the P3/D65 chromaticity, the 60 Hz detailed
timing field by field and one extension; the DisplayID block holds its
header, display parameters and every Type VII field of the 120 Hz
timing, and both checksums; an update publishes 256 bytes and adds no
mode. The fixture's connector uses the atomic state helpers.
apple-dcp-v14-board checks that only the J516C record sets the flag
(J514C, T6030 and J613 do not).

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Naeem Malik <malik2015naeem@gmail.com>
On the J516C the 120 Hz panel presented at 60 fps: the 14.7 swap record
is sent with its timestamps zeroed, and the firmware then completes at
most one swap per 16.7 ms. Counter values (1 GHz on T6031) in the
timestamp slots make the firmware time out on the first swap. Write the
constant 120 in timestamp slots 0, 1 and 6 instead, a time that is never
in the future, after the swap record is encoded.

Add a swap_timestamps flag to the 14.x board records, set only in the
J516C record, and stamp a swap only for the internal panel of such a
record. The J514C (untested), the T6030 (J514S, J516S) and T8122 panels
and the external processors, which have no board record, send zero
timestamps, byte for byte as before. The counter timestamps of the
IOMFB template path (VRR modes on a main display) are not used by the
native 14.7 path and are unchanged.

Measured on the J516C on this branch: kmscube (atomic) presents at
120 fps (120.03 on two boots) on the panel's 120 Hz mode, 3456x2160
with the 74 notch rows hidden, and the first swaps of a boot complete
in 2.9 to 8.1 ms instead of 16.7 ms.

KUnit (apple-dcp-v14-board): the J516C record stamps its internal
panel's swaps; the external role, the J514C, T6030 and J613 records and
no record do not; a stamped swap holds 120 in slots 0, 1 and 6 and
is otherwise the encoded record, with and without a surface.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Naeem Malik <malik2015naeem@gmail.com>
…rowth ledger

The PB ledger only knows the posted count. For backing that is
allocated after a reply instead of before it, the ledger also has to
know how many blocks are backed, grant a request only from those, and
start over at a re-initialization without forgetting the backing.

Add `backed` to the ledger. `accept()` now returns an answer:
- a grant, clipped to the backed blocks above the posted count;
- a refusal at the maximum (the refusal bound is unchanged);
- a wait when no backed block is left: the request keeps its
  counter and can be accepted again once more is backed.

`reinit()` returns the posted count to the initial size and keeps the
backing; Pools::init() uses it instead of a new ledger.

The growth chunks that back_pb() allocates before an answer are now
128 blocks (16 MiB) instead of 32. answer_request() copies the backed
count into the ledger after back_pb(), so no request waits yet.

Host tests (pools/growth.rs, run by the asahi-g15 selftest): the
clamps and the producer bound over the constructor's boundary values
with the heap backed, growth to the maximum and re-initialization, and
grants clipped to the backing, with waits that keep the counter.

The ledger is shared by the T6030 and the T6031; this is untested on
the T6030. The
growth harness follows the chunk size and the ledger reset.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Naeem Malik <malik2015naeem@gmail.com>
…h a reserve

back_pb() allocates and maps the backing of a growth request before
the answer, while the firmware waits for it. The allocation has no
time bound (shmem pages with __GFP_RETRY_MAYFAIL), and a failure
leaves the request unanswered until the host deadline.

Keep one chunk of backed blocks in reserve above the posted count and
back the next chunk after the replies of a poll pass:
- the heap is backed in chunks of 128 blocks (16 MiB), each a
  gpu_backing() object at its fixed client GVA (chunk_gva());
- when the GPU starts, the chunks of the initial posting and one
  reserve chunk are backed (9 with the initial 1024 blocks);
- answer_request() grants only from backed blocks; while fewer than
  128 remain above the posted count, refill_backing() backs chunks at
  the end of answer_growth(), after every reply of the pass;
- with the reserve dry (an allocation failed), a request waits: it
  goes back to the head of the queue with its counter and is answered
  by a later pass once a chunk is backed;
- a pending re-initialization backs nothing while no render is
  published; a render published before it (the flights behind a
  fragment kill) is still backed, or its requests would wait until
  the deadline. A compute-only flight gets none: it cannot ask for
  growth.

Mapping stays per VM and before the VM can reach a block. A VM maps
every chunk it lacks at the start of its prefix's publication
(map_pb(), with its one-VM check), and a chunk backed by a refill is
mapped into the VM of the flights before the ledger counts it. If
that mapping fails, the chunk is dropped again and the next pass
retries. The aliases are held in the VM's own heap list
(VmState::map_heap()), which keeps the object of each alias. A chunk
whose object changed is unmapped and mapped again, and aliases past
the backing are dropped. back_pb(), running_vm() and the per-VM count
are removed: no grant can name a block that the running VM has not
mapped.

This applies to the T6030 and the T6031, which share this code; it is
untested on the T6030. The debugfs pb: line appends waits and refills.

The growth harness now runs answer_growth(), answer_request(),
map_pb(), refill_backing() and the VM heap-mapping bodies. Its new
cases:
- the start backing;
- allocation only after the pass's replies;
- a dry reserve that makes a request wait and keeps its order;
- a failed refill map that drops the chunk;
- a pending re-initialization with no flight, with a compute-only
  flight, and with a render published before it;
- catch-up at publication, including a partial one.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Naeem Malik <malik2015naeem@gmail.com>
The initial posting is 1024 blocks (128 MiB), with 9 chunks (144 MiB)
backed when the GPU starts. On the J516C, an idle desktop with a
64-block start stayed at 64 posted blocks (8 MiB), and growth is a
round trip of 1-2 ms per ten blocks.

Post 64 blocks at (re)initialization by default, settable with
g15_pb_blocks (64..4095, read-only after boot). The PB then needs two
chunks (32 MiB) when the GPU starts: the posting and the reserve.
tuning::PB_BLOCKS is removed. g15_pb_max_blocks, the firmware's growth
maximum, is still raised to at least the initial posting; its help
text no longer says that the 512 MiB heap is allocated in any case.

This applies to the T6030 and the T6031, which share this code; it is
untested on the T6030, and g15_pb_blocks=1024 restores the old start.
The zero-words harness pins hw.rs whole; its hash is refreshed, and its
T6030 configuration module stays pinned to the original bytes.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Naeem Malik <malik2015naeem@gmail.com>
Posted blocks never come back while a PB lives. The firmware recycles
pages inside its own pool and the records give the host no view of
it, so the posted count only grows until a recovery re-initializes
the PB. On the J516C one dEQP case takes about 1200 blocks past the
firmware's maximum each time it runs. The second run of one dEQP list
exhausted the 512 MiB heap, and the GPU fail-stopped after the
refusals.

Re-initialize the PB when the engine has had nothing published and
nothing pending for g15_pb_idle_ms (1000), with more than
g15_pb_reclaim_blocks (1024) posted:
- the next render prefix takes the re-initialization path of a
  recovered abort (fresh lists and manager, InitBM of the initial
  blocks), with no halt;
- with g15_pb_reclaim 2 (the default), the chunks above those of the
  initial posting and the reserve are freed at once and unmapped from
  every VM of the registry; a VM that publishes later drops its stale
  aliases first (VmState::map_heap()); a chunk counts as freed only
  once every VM's alias of it is unmapped;
- g15_pb_reclaim 1 re-initializes only, 0 never;
- nothing is re-initialized when nothing grew since the
  initialization (posted == initial), whatever g15_pb_reclaim_blocks
  is.

The idle clock is noted at the end of every poll pass and publication
and when a job arrives. The check runs in idle poll passes and when a
job arrives at an idle engine, before its publication, because an idle
poll is not re-armed.

This applies to the T6030 and the T6031, which share this code; it is
untested on the T6030 (g15_pb_reclaim=0 turns it off, and
g15_pb_blocks=1024 restores the old start).

The debugfs pb: line appends reclaims and freed chunks. Host tests:
the idle clock, the reclaim test of the ledger, a heavy scene freed
and refilled, and (growth harness) a VM that maps chunks freed and
backed again from their new objects.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Naeem Malik <malik2015naeem@gmail.com>
…undary

The idle reclaim needs g15_pb_idle_ms without work. Heavy scenes
started back to back, each by a new client a few hundred ms after the
last, never reach it. On the J516C three such scenes of about 1420
blocks each ran the heap to its maximum, and the fourth hung the GPU
into fail-stop.

Re-initialize also after 50 ms idle with more than half the maximum
posted and grown since the initialization (an initial posting above half
the maximum is not drained). 50 ms is longer than the gaps between one
client's renders. On the J516C a re-initialization with no idle time
faulted at the heap base, at a client switch, the second time in a row
with no recovery between; with 50 ms of idle none faulted, also between
two renders of one client 60 ms apart. This path keeps the backing, so
the next scene does not allocate it again.

The idle reclaim now also runs when more chunks are backed than the
posted blocks need (free_due()), so backing kept this way is freed even
if the next client posts below g15_pb_reclaim_blocks. With no render
after the client boundary, the re-initialization stays pending, and
with g15_pb_reclaim 2 the check frees the backing above the kept
chunks once the engine has been idle for g15_pb_idle_ms (a recovery's
pending re-initialization still stops the check). This applies to
the T6030 and the T6031, which share this code; it is untested on the
T6030 (g15_pb_reclaim=0 turns it off, and g15_pb_blocks=1024 restores
the old start).

Host tests: back-to-back heavy scenes never reach the maximum and keep
their backing, and kept backing is freed at the next long idle. The
growth harness also runs reclaim_check(), free_backing() and
note_idle() over a clock: a heavy client that exits with nothing
rendered after it is re-initialized after 50 ms and its kept backing
freed after the long idle, its posted count kept until the InitBM; at
level 1 the backing stays; a recovery's pending re-initialization
frees nothing; nothing grown, nothing is re-initialized. The reclaim
keeps the posted count until the next render's InitBM, as the driver
does: the same client rendering again after 60 ms grows again from the
kept backing with nothing allocated, after 1.1 s over freshly backed
chunks mapped before they are posted, and a compute-only submission
between the reclaim and the InitBM maps, backs and posts nothing.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Naeem Malik <malik2015naeem@gmail.com>
…ecords

The CDM gate walks a compute stream from its base through its links
and refuses it after 8192 records. A legitimate stream can be longer.
On the J516C, the three dEQP-VK multi_draw.mosaic cases with
max_draws and tessellation (1024 tessellated draws, several launches
and barriers each) were refused: "rejecting CDM record budget record",
then EINVAL from the submit.

The gate is shared by the T6030 and the T6031. It already admits at
most 64 links, and Mesa's encoder links to a new 64 KiB block when one
fills, so a stream that fits the link budget is at most 65 blocks.
Bound the walk by the bytes of its records instead: at most
(64 + 1) * 64 KiB (4160 KiB) of stream, whatever the mix of 4-byte
barriers and 24- to 40-byte launches. A stream without TERMINATE still
ends at that bound or at the link budget, so the walk stays bounded: at
most 1064960 record reads of 4 bytes.

A walk does not check again the last page it found good, for a
program or for an indirect launch's 12 argument bytes, and it makes at
most 16384 page checks; one more is refused as "CDM page check
budget". The walk holds no device lock: the queue's mutex covers the
SUBMIT, and the VM's lock is taken per check (about 4 us on the J516C)
and per 256-byte read (about 5 us). Without the cache and the bound, a
stream of 24-byte indirect launches with distinct argument pages made
one check per launch: about 0.8 s per compute command and about 51 s
per 64-command SUBMIT. Now it is at most about 149 ms per command and
about 9.5 s per SUBMIT. Mesa's indirect arguments move to a new page
every few dispatches: 40000 dispatches made 41410 checks in 224 ms
before and 6848 in 94 ms after, and the largest stream the link
budget admits (47000 dispatches) makes 8047. The 608 dEQP-VK
multi_draw.mosaic max_draws with_tess cases pass.

Host tests (asahi-g15 selftest): 10240 barriers and a terminator are
admitted; a terminator in the last word of the budget is admitted and
one past it refused; a stream of the budget without a terminator is
refused; 64 links are admitted and 65 refused; 1000 launches in one
argument page make 2 page checks; a program and 16383 argument pages
are admitted and one more page is refused without its check; 170000
launches over 16 argument pages are admitted with 17 checks.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Naeem Malik <malik2015naeem@gmail.com>
The G15 backend loads the T6031 board images with kernel::firmware
(g15/board/blob.rs), which exists only with
CONFIG_RUST_FW_LOADER_ABSTRACTIONS. DRM_ASAHI_G15 does not select it:
the symbol comes only from APPLE_AOP, APPLE_SEP or nova-core, so a
configuration without them fails to build the driver.

Select RUST_FW_LOADER_ABSTRACTIONS from DRM_ASAHI_G15. It depends only
on RUST, which DRM_ASAHI already requires, and selects FW_LOADER.

Built with APPLE_AOP and APPLE_SEP off: the option resolves to y and
drivers/gpu/drm/asahi builds.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Naeem Malik <malik2015naeem@gmail.com>
…out new work

The reclaim check runs in poll passes and when a job arrives, but an
idle engine runs no poll pass: the pass that retires the last flight
is not re-armed. On the J516C, a client-boundary re-initialization
kept 23 chunks (368 MiB) for a client that then posted 264 blocks.
With no new job they were still held 15 s later, and only the next
job's arrival freed 21 of them.

When a poll pass ends with the engine idle, compute how much longer the
engine must stay idle before the reclaim check would act
(Ledger::reclaim_delay(): the idle reclaim at g15_pb_idle_ms, the free
of kept backing at level 2, or the client-boundary re-initialization).
Then queue the poll work for that delay. The pass it runs takes the
device lock and runs the idle path: note_idle(), then reclaim_check().
Nothing is armed while busy, while a recovery or its re-initialization
is pending, or when nothing can become due. While a reclaim's
re-initialization is pending (a client-boundary one keeps the backing),
the poll is armed for the rest of g15_pb_idle_ms at level 2
(Ledger::pending_free_delay()), not for the expired 50 ms, so the check
frees the kept backing of a heavy client that exits with no render after
it. A job's arrival re-arms the poll work for its publication, which
replaces the expiry. The delay mirrors the checks, also in requiring
growth since the initialization.

This applies to the T6030 and the T6031, which share this code; it is
untested on the T6030 (g15_pb_reclaim=0 turns the reclaim off, and
g15_pb_blocks=1024 restores the old start).

Host test (pools/growth.rs): over levels, floors, idle times, posted
counts and backing, the delay is the first idle time at which
reclaim_due(), free_due() or drain_reinit_due() holds. None of them
holds one nanosecond before it, and none ever holds when there is no
delay. The J516C case gives g15_pb_idle_ms at level 2 and nothing at
levels 0 and 1.

The growth harness also runs reclaim_delay_ns() and drives the idle
poll work as poll.rs arms it: a heavy client that exits with nothing
rendered after it wakes the poll at 54 ms (the re-initialization) and
at 1004 ms (the free), and nothing is armed after; an idle reclaim
arms nothing once its re-initialization is pending; nothing is armed
at level 1, for a recovery's re-initialization, or when nothing grew.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Naeem Malik <malik2015naeem@gmail.com>
The boot loader enables the T6030/T6031 GPU node only when its
chosen.asahi,t603x-gpu setting is on. With the setting off, as the
installed m1n1 configuration of a J516C can have it
(chosen.asahi,t6031-gpu=0), the node stays disabled. The adapter then
never probes, and the kernel log gives no reason why there is no
native G15 GPU.

At module activation, log one line when /chosen carries
asahi,t6031-gpu or asahi,t6030-gpu and the matching GPU node is
disabled. The line names the node and the property's value. Nothing
else changes; machines without the property log nothing.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Naeem Malik <malik2015naeem@gmail.com>
@malik-na

Copy link
Copy Markdown
Member Author

@maralcbr (review of 2026-10-22)

CI hasn't run on this branch. Agreed, that needs the retarget to integration/aurora
and a fresh push with ci:build. Until then I ran CI's own pieces on an M3 Max. A per-commit
build of all 11 commits gives 0 W=1 warnings in drivers/gpu/drm/apple. host-tests.py
covered every G15/DCP suite. KUnit ran through tools/aurora-ci/run-kunit.py's steps
(kunit.py --arch=arm64, aurora.kunitconfig, in QEMU/KVM): 110 suites, 1544 cases, 1541
pass, 3 expected skips, 0 kernel splats, no differences from kunit-expected.json.
check-commits.py: 11 commits signed off, the two checkpatch warnings you saw (MAINTAINERS
for the new EDID files, and the loader commit), 0 errors. On the rebase see your second review.

Kept backing isn't freed if no render follows a client-boundary re-init. Fixed. With a
reclaim's re-initialization pending, reclaim_check() now frees the backing above the kept
chunks once the engine has been idle for g15_pb_idle_ms (level 2). reclaim_delay_ns()
arms the poll for the rest of that idle, not the expired 50 ms. A recovery's pending
re-initialization still stops both (59aced96, aa142eed). The growth harness now runs the
real reclaim_check()/reclaim_delay_ns() and drives the idle poll as poll.rs arms it. A
heavy client (2100 posted, 18 chunks) that exits with nothing rendered wakes the poll at 54 ms
(re-init) and at 1004 ms (free to 2 chunks), and nothing is armed after. Before the fix it
woke once and held 18 chunks. A mutant reverting only one of the two guards shows the wake
loop it would cause. On the J516C, the free with the re-init pending happened at 1027-1058 ms
in every sequence that reached it.

Re-initializing under a live client is guarded only by time. I ran your sequence on the
J516C with a one-process Vulkan tool (one device, one VM). A scene of about 2550 blocks, idle
60 ms, render, idle 1.1 s, render, plus longer mixes and six back-to-back 60 ms re-inits in
one client: 15 client-boundary re-inits at 51 ms and 0 GPU faults, recoveries or hangs, and
every readback correct. What faulted before, from the r2c log: every no-idle re-init there was
at a client switch (a new VM each dEQP run), never between two renders of one client. The
fault came on the second no-idle re-init in a row, about 0.4 ms after the InitBM: two units
wrote to block 0 at the heap base, which was backed and mapped in that VM. A long idle or a
recovery in between avoided it. So keying the 50 ms path on "a different VM renders next"
would not have prevented those faults. The cause is inside the firmware and not known. The
50 ms is an empirical margin, not a proven quiescence point. Our commit text said "between
two renders of one client", which was wrong, and it is corrected (59aced96). Data:
work/t6031-kit-refusals/results/20261023-r182-item6-pb-idle/ on the agent-docs branch of
malik-na/linux-aurora (the other results named below are in the same directory).

The EDID says gamma 1.00. Fixed: 0x78, a nominal 2.2. These are P3 wide-colour panels,
and Display P3 uses the sRGB transfer function, which 2.2 approximates. KUnit asserts it.

reclaim_due()/drain_reinit_due() fire when nothing grew. Fixed. Both require
posted > initial, mirrored in reclaim_delay(). The tests were written first and failed on
the old code: initial 3000 re-initialized at the drain, and floor 32 with 64 initial
re-initialized at the idle (54941feb, 59aced96, aa142eed). A level-2 free with
posted == initial still sets a (harmless) re-initialization. That could be a follow-up.

Compute-only client after a reclaim runs one flight at a time. Added to the PR body as
you suggested.

33922ce's message. Updated: it now gives the result on this branch, kmscube at 120.03 fps
on two boots, and the first swaps of a boot completing in 2.9-8.1 ms (e3f69b77).

Installer t6031-gpu=0 and the software fallback. Drafted as two issues for
omacom/linux-aurora (tools/aurora-sep), since the installer and the session hook live there.
I'll file them when you're fine with the text.

T6030 defaults. Yours to settle, as you said; nothing changed here.

@malik-na

Copy link
Copy Markdown
Member Author

@maralcbr (follow-up of 2026-10-23)

Recovery can strand a growth request. Fixed in 7eae5b05. The refill is skipped only
when a re-initialization is pending and no render flight is live. That is narrower than
"no flights": a compute-only flight cannot ask for growth, and refilling for one right after a
level-2 reclaim would back again everything the reclaim just freed. The harness case
compute_between_reclaim_and_initbm shows that trace when the rule is flights.is_empty(). A
render cannot be published while reinit is pending without clearing it, so a live render with
reinit pending is always one published before the kill. Chris's reproducer is a harness case
now: it failed on the old guard with his numbers (posted=256 backed=256 waits=4 refills=0).

Freeing posted blocks before the re-init. On the J516C I ran compute right after a
level-2 free and before the next render's InitBM: 8 dispatches, between about 60 ms and 1.2 s
after the free, all correct, 0 faults. A compute-only prefix has no TA/3D work and does not tile
into the PB, and the harness shows it maps, backs and posts nothing in that window. Firmware
background PB work in that window rests on the same measurements, not on an interface
guarantee.

Rebase onto #177's current head. Rebased onto d60121ff (past 03c3afe7) with no
conflicts; our commits don't call Session::uat(). The combined tree broke two of #177's
harnesses through our commits. publication-hpd extracts dcp_get_modes() and lacked the
panel stubs, and g15-probe-init-tests.py lacked the new loader-log glue call. Both are fixed
in the commits that caused them. Every commit builds. apple-dcp/run.sh fails the same six
cases on d60121ff alone as on this series (service-rebind, cpuidle-s2idle,
probe-mux-pm-dispatch, dwc3-teardown, same-handle-srcu-index, mux-release-stages). All six are
in files this series does not touch, and five of them are the build host's clang 23
-Wunused-but-set-global. Everything else passes.

stats.freed counted before vms.open() can fail. Fixed (54941feb): it is counted
only when the unmap ran. A failed walk counts nothing, and each VM's next publication drops
its stale aliases (tested).

dcp_panel_edid_update() and drm_edid_firmware_derived. Fixed (d77c5566). The
update no longer touches display_info. dcp_get_modes() calls
dcp_update_connector_dimensions() before (the EDID's size) and after (the millimetres back),
so the firmware's width and height stay the single source, and it clears
drm_edid_firmware_derived in that branch.

Manufacture year 0, no detailed timing first. Fixed. The EDID has model year 2023 and P3
primaries with a D65 white point. Its first descriptor is a detailed timing: the panel's
geometry at 60 Hz, because the field cannot hold the real timing. The DTD pixel clock is
16 bits in 10 kHz units (at most 655.35 MHz), the panel needs 3536 x 2456 x 120 =
1,042,129,920 Hz at 120 Hz, and the 6-bit vertical front porch cannot hold its 118 lines
either. A DisplayID 2.0 extension carries the real 3456x2234 120 Hz timing (1042130 kHz,
preferred Type VII), with display parameters. DisplayID 1.3 failed libdisplay-info, and 2.0
without a Display Parameters block failed edid-decode. DRM modes still come from the DCP
firmware, not from this EDID
: the connector keeps its one 3456x2160 120 Hz mode, and KUnit
checks the update adds none. edid-decode and libdisplay-info both report the EDID conformant,
and the live sysfs EDID matches the KUnit-tested bytes.

The CDM byte budget. You were right to ask. Measured on the J516C, the walk holds no device
lock: the queue's mutex covers the SUBMIT, and the VM's GPUVM lock is taken per check or read.
But each check costs about 4 us and each 256-byte read about 5 us (kprobes on
Prepared::validate(), covers_range and read_user). Every indirect launch made an uncached
check of its arguments. A stream of distinct argument pages could therefore take about 0.8 s
per compute command, about 51 s per 64-command SUBMIT. Now (ae93621a) the last page found
good, for a program or for indirect arguments, is not checked again, and a walk makes at most
16384 page checks. One more is refused with "CDM page check budget" in the reject log.
Worst case now about 149 ms per command and about 9.5 s per SUBMIT. Mesa's indirect arguments
move to a new page every few dispatches: 40000 dispatches took 224 ms with 41410 checks
before, 94 ms with 6848 after. The largest stream the link budget admits (47000 dispatches)
makes 8047 checks, hence 16384 rather than 8192. All 608 multi_draw.mosaic ... max_draws ... with_tess variants pass. Data: results/20261023-r182-item10-cdm-walk/.

@malik-na

Copy link
Copy Markdown
Member Author

@iconidentify Thanks for the reproducer. It is now pending_reinit_with_a_live_render_refills in the growth
harness. It failed on the old guard with exactly your numbers and passes with the fix
(7eae5b05): the refill is skipped only when a re-init is pending and no render flight is
live. That is narrower than flights.is_empty(). A compute-only flight can't ask for growth,
and with flights.is_empty() a compute flight right after a level-2 reclaim re-backs every
freed chunk. compute_between_reclaim_and_initbm shows that trace (the
refill-for-any-flight mutant). The old pending_reinit_backs_nothing is split into "no
flights", "compute only" and "a live render".

On the test model: Pools::drop_chunks() is gone. The harness runs the real reclaim_check(),
free_backing(), reclaim_delay_ns() and note_idle() over a clock. A publish() helper
models engine.rs (catch-up first, then the InitBM only for a render prefix with reinit
pending), so the old posted count stays until the InitBM. New cases: the same client renders
after 60 ms (it grows again from the kept backing, nothing allocated), after 1.1 s (for both the
idle reclaim and the client-boundary path: fresh chunks, each mapped before it is posted), and
a compute-only submission between the reclaim and the InitBM (it maps, backs and posts nothing,
and its growth request is left unanswered). A driver mutant that resets the posted count at the
reclaim instead of the InitBM survived the old harness and now fails three cases. Harness:
37 passed, 37/37 mutants caught.

@malik-na

Copy link
Copy Markdown
Member Author

@iconidentify Thanks for the T6030 data point and for being clear about what it doesn't cover. The reclaim
and refill paths are now covered by the harness cases above. On the J516C I ran the
reclaim-edge sequences (60 ms / 1.1 s same-client renders, compute after a level-2 free,
consecutive client-boundary re-inits) with 0 faults. The T6030 defaults are still Marcelo's
call.

@chriskearney
chriskearney changed the base branch from review/siliconforest-kernel-20261022 to integration/aurora October 23, 2026 14:58
@chriskearney chriskearney added the ci:build Build, test and boot the kernel for this PR now label Oct 23, 2026

@chriskearney chriskearney left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thanks, Naeem. Rechecked a089fd06488aa5edb09674a8d3ca71b56db07087; my blocking findings are addressed.

The refill now distinguishes a live render from compute-only/no-flight re-initialization. The harness runs the actual reclaim/free/timer bodies, keeps the posted count until InitBM, and covers the stranded-request reproducer, 60 ms/1.1 s same-client renders, intervening compute, and idle with no further render. The connector fixture also supplies the atomic state helpers that were missing. A focused ARM64 QEMU run with lockdep and KASAN now passes all six panel-EDID cases with no guest warnings.

I reran the PB harness: 37 cases pass and all 37 mutants fail on their intended assertions. The tested-body hash matches the exact PR tree. The G15 host selftest passes 74 Rust tests with two expected ignores. A local #177+#182+#187 combination also builds Image, modules and DTBs with LLVM 22.1.8/Rust 1.93.1 and both native GPU options enabled.

Hardware follow-up on a089fd06: our local #177+#182+#187 combination completed a one-shot test and a normal default boot on the M3 Pro/J516S. All 12 CPUs, hardware GL/Vulkan readback, Wi-Fi and dock Ethernet passed. The compositor reports both externals at 4K60 (Samsung 59.997), with the Dell rotated 270 degrees; no host warnings or GPU recoveries/hang kills. A local module-retention mistake was repaired before the completed normal boot. This is bounded boot/render coverage, not a hardware test of the reclaim edges or J516C panel.

Approving the fixes. I retargeted this to integration/aurora now that #177 is merged and requested full CI with ci:build; that run should finish before merge.

@chriskearney
chriskearney marked this pull request as draft October 23, 2026 15:04
@chriskearney
chriskearney marked this pull request as ready for review October 23, 2026 15:04
@malik-na
malik-na requested a review from maralcbr October 23, 2026 16:56
@scottjones
scottjones enabled auto-merge October 23, 2026 17:11
@scottjones
scottjones added this pull request to the merge queue Oct 23, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 23, 2026
@joshuaswarren

Copy link
Copy Markdown

Lab laptop qualification of this PR at head a089fd0.

What was built: a hand-built linux-aurora package (no pacman signature; sha256 checked before install), release 7.2.11-pr182-ARCH+, built from the rebased head of this PR (stacked on #177). It was installed as a one-shot Limine entry on each laptop, and each laptop returned to its stock kernel afterwards. Boot ids below are the stock boot, the candidate boot and the stock return boot.

Laptop (model) | boots (stock -> candidate -> stock) | result
13-inch M1 MacBook Pro | bf356a6a (7.1.12-2-20261013.18-sep-ARCH) -> d053b91d (7.2.11-pr182-ARCH+) -> 0555013d | PASS. Smoke 7 PASS, 2 FAIL, 1 SKIP; both FAILs (the seat-less audio session and the Vulkan/renderD script check) fail identically on its own stock baseline; Honeykrisp compute max_abs_err 0.000595 identical on both boots
16-inch M1 Max MacBook Pro | 22ccf6cc (7.1.12-2-12.6-sep-ARCH) -> 7d3498e (7.2.11-pr182-ARCH+) -> dc9df324 | PASS. Smoke 8 PASS, 1 FAIL (the same Vulkan/renderD script check as its stock baseline), 1 SKIP; Vulkan device Apple M1 Max (G13C C0) on both boots; audio tone exits 0; ANE loaded
14-inch M2 Max MacBook Pro | 0ca263f7 (7.1.12-2-20261013.18-sep-ARCH) -> 6cd802d9 (7.2.11-pr182-ARCH+) -> 07a71e45 | PASS. Smoke 8 PASS, 1 FAIL (the same Vulkan/renderD script check as its stock baseline), 1 SKIP; Vulkan device Apple M2 Max (G14C B1) on both boots; audio tone exits 0; ANE loaded. The stock baseline was taken right after returning this laptop from an unrelated eGPU soak boot to the stock default entry

CI on this head: 20 checks pass, 4 skip (ci/KUnit, ci/boot, ci/package, attest are skipped, not failing), plus the Greptile review pass.

Regressions: none found. Notes:

  • On the 16-inch M1 Max, glmark2-wayland (5 s build, single run, not a speed claim) scored 4229 on the candidate against 2233 on its own stock baseline; the Vulkan device name is identical on both boots and there are no GPU timeout/halt/fence lines on either.
  • The dmesg error classes on every candidate are the same set as that laptop's own stock baseline (on the 13-inch and the 14-inch the candidate set is a strict subset of the baseline set). The tas2764 "Failed to parse devicetree" probe deferrals and the apple-dcp dp-xbar -517 deferrals appear on the stock baselines too; the counts move with probe timing.
  • The stock boot of the 13-inch M1 showed the known spi-hid-apple-of/magicmouse -110 flakes; the candidate boot of the same laptop did not. Timing flakes, not regressions.
  • On all three laptops the one-shot entry cleared itself, the stock kernel came back, and the protected boot artifacts (boot.bin and the stock UKIs) matched their recorded hashes.

What this does not test:

  • This PR is the M3 Max (J516C) GPU port. None of these laptops has an M3 Max, so the M3 GPU path itself, the on-demand parameter buffer, the panel EDID and 120 Hz work and the CDM walk fix are not exercised here. What the runs prove is that the kernel builds, boots one-shot, and leaves the GPU, audio, input, display, network and ANE paths on these SoCs in the same state as the stock kernel.
  • These laptops load apple_sep through apple-sep.service, so the module alias autoload path is UNKNOWN here.
  • No laptop in this fleet runs without the loader units, so the loader-unit-free path is not covered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:build Build, test and boot the kernel for this PR now

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants