Skip to content

drm/asahi: m3: define extended recovery layout constants locally - #3089

Merged
DjDeveloperr merged 1 commit into
mainfrom
fix/m3-recovery-layout-consts
Nov 24, 2026
Merged

DjDeveloperr merged 1 commit into
mainfrom
fix/m3-recovery-layout-consts

Conversation

@DjDeveloperr

Copy link
Copy Markdown
Contributor

What: Define the four 26.6.2 extended FirmwareData recovery layout constants (EXTENDED_SNAPSHOT, EXTENDED_SNAPSHOT_ENTRIES, EXTENDED_GENERATION, EXTENDED_PHASE) directly in drivers/gpu/drm/asahi/m3/m3_recovery.rs after #2676 moved G16's offsets per-ABI out of g16/recovery/logic.rs.
Tested: 5de20ebf39e5 (no runtime change; identical constant values 0x40b8, 448, 0x4fa0, 0x4fb0): tools/asahi/run-host-tests.py --only m3 PASS and tools/testing/selftests/drivers/gpu/asahi-m4/run-host-tests.py PASS.
Risk: two-way · M3 GPU recovery compile-time constant definitions only; fixes main M3 Rust build and host-tests E0425 regression from 0c4e19dfdde7.
Not yet: waiting on CI (host-tests and rust-build) to complete and merge.

PR #2676 moved the G16 recovery offsets per-ABI into FirmwareData and
removed the fixed SNAPSHOT, SNAPSHOT_ENTRIES, GENERATION and PHASE
constants from g16/recovery/logic.rs. m3_recovery.rs imports that shared
logic module via #[path] and used those four 26.6.2 extended baseline
constants to compute its shifted RecoveryOffsets, breaking the M3 Rust
build and m3-recovery-tests.py with E0425.

Define the four 26.6.2 extended baseline constants directly in
m3_recovery.rs so M3 no longer depends on G16 layout constants.

Fixes: 0c4e19d ("Merge pull request #2676 from aurora-silicon/djdev/g16-272")
Signed-off-by: Diljit Singh <[email protected]>
@DjDeveloperr
DjDeveloperr requested review from a team as code owners November 24, 2026 19:25
@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

Verdict at 5de20eb: no blocking findings.

What I checked:

  • The four new constants match the ones drm/asahi: g16: run the M4 GPU on the macOS 27.2 firmware (26B123) #2676 removed from g16/recovery/logic.rs (at 0c4e19dfdde7^1, lines 29-32) exactly: SNAPSHOT = 0x40b8, SNAPSHOT_ENTRIES = 448, GENERATION = 0x4fa0, PHASE = 0x4fb0. The existing unit test in m3_recovery.rs also checks the 26.6.2 base offsets against these values.
  • Nothing else breaks. The only change is in m3_recovery.rs, the new constants are private to that file, and RecoveryOffsets::extended() keeps its signature (its caller in m3_config.rs is unchanged). No file at the head still uses logic::SNAPSHOT, SNAPSHOT_ENTRIES, GENERATION or PHASE. Main has moved 5 commits since this branch's base, none touching m3/ or g16/recovery/.
  • I ran tools/asahi/m3-recovery-tests.py on the host. At the parent (0ed988ab) it fails with the four E0425 errors. At the head all 15 tests pass, and the --mutate control still makes quarantine_budget_bounds_cumulative_retention fail, so the test still catches that bug.
  • The values that get compiled in are the same as before, so "no runtime change" is accurate.
  • Commit metadata is clean. The only trailer is the author's Signed-off-by, the author and committer are the same person, and neither the commit nor the PR body has any AI attribution.

Not blocking: the Fixes: tag points at the merge commit 0c4e19dfdde7. The commit inside #2676 that removed the constants is b0b5e93eb066.

CI (host-tests, pr-text, readiness) was still running when I posted this. I did not merge.

@RyanTheTide RyanTheTide left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Independent source review at 5de20ebf39e5. I compared the four displaced definitions against the pre-#2676 source. Their Rust types and values match, and the patch keeps the existing M3 recovery call sites. The delta is confined to one M3 source file, and git diff --check passes.

This clears the source review for the build repair. Attach the current hosted host tests and fleet-config Rust compile, plus the ordinary J615 current-tip GPU smoke when the existing Air slot publishes it. That distinguishes this compile fix from the earlier frozen fleet89 source.

@github-actions github-actions Bot added area:gpu Area from CODEOWNERS (bot) blast:m3 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) ready-to-merge Meets the merge policy: merge it (bot) labels Nov 24, 2026
@github-actions

Copy link
Copy Markdown

Merge readiness at 5de20ebf: ready to merge

Check Detail
CI at head ok 2 checks passed
Review ok approved by RyanTheTide
Requested changes ok none
Hardware row at head ok not needed: no runtime change
Conflicts ok none
PR text ok Risk: two-way · M3 GPU recovery compile-time constant definitions only; fixes main M3 Rust build and host-tests E0425 regression from 0c4e19dfdde7.

Areas: area:gpu
Merge: gh pr merge 3089 --merge (Owners and Core through the bypass: add --admin).

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

@DjDeveloperr
DjDeveloperr merged commit 1ce6223 into main Nov 24, 2026
4 checks passed
sithglan added a commit to sithglan/aurora-linux that referenced this pull request Nov 24, 2026
Merge aurora/main (c6d73b1) to pick up aurora-silicon#1798, aurora-silicon#2309, aurora-silicon#2691 and aurora-silicon#3089.

Conflict in arch/arm64/boot/dts/apple/t8152-j873g.dts: keep both the
t8152-j873-thermal.dtsi include from aurora-silicon#1798 and t8152-j873-usb4.dtsi.

Signed-off-by: Thomas Glanzmann <[email protected]>
@RyanTheTide
RyanTheTide deleted the fix/m3-recovery-layout-consts branch November 27, 2026 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:gpu Area from CODEOWNERS (bot) blast:m3 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) ready-to-merge Meets the merge policy: merge it (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants