Skip to content

drm/asahi: fix G16 main build breaks (SignalBundle::publish arg + CONFIG_DRM_ASAHI_G16 guard) - #3111

Merged
DjDeveloperr merged 3 commits into
mainfrom
djdev/g16-fix-scope-publish-arg
Nov 25, 2026
Merged

DjDeveloperr merged 3 commits into
mainfrom
djdev/g16-fix-scope-publish-arg

Conversation

@DjDeveloperr

@DjDeveloperr DjDeveloperr commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes both aurora.ko compile breaks on main (a97744009d4d) after the concurrent G17/G16 merges:

  1. drivers/gpu/drm/asahi/g16/fence.rs:591: pass false as the second compute_only: bool argument added by fae8191fafba to g17::sync_output::SignalBundle::publish(), so G16 cumulative output syncs compile cleanly and never invoke G17's non-M5 compute-waiter effort hook (asahi_g17_note_compute_waiter).
  2. drivers/gpu/drm/asahi/file.rs:1895: guard gpu.as_any().is::<crate::g16::Gpu>() with #[cfg(CONFIG_DRM_ASAHI_G16)] so CONFIG_DRM_ASAHI_G16=n configs (including SEP source checks / kunit) compile cleanly.

Risk

  • Risk class: Two-way (two surgical compile fixes restoring exact pre-conflict G16 behavior when enabled and false when G16 is disabled; trivially revertible).
  • Affected scope: drivers/gpu/drm/asahi/g16/fence.rs and drivers/gpu/drm/asahi/file.rs; all kernel builds compiling CONFIG_DRM_ASAHI with CONFIG_DRM_ASAHI_G16=y or =n.

Tested

  • Audited all g17:: references inside g16/ and all crate::g16 references outside g16/ at 6830b3df58c1f4abc6f2da9605bca47c15cc5a8d.
  • checkpatch.pl --strict, PR host-tests / readiness / pr-text CI at 6830b3df58c1f4abc6f2da9605bca47c15cc5a8d.
  • Targeted aurora.ko compile + J773g smoke verification in progress at 6830b3df58c1f4abc6f2da9605bca47c15cc5a8d.

Not yet

  • Exact-head aurora.ko compile + J773g runtime check at 6830b3df58c1f4abc6f2da9605bca47c15cc5a8d (running now; results will be posted before merge).

Commit fae8191 ("drm/asahi: g17: lift non-M5 effort immediately for
waited compute submissions") added a second `compute_only: bool` parameter
to `g17::sync_output::SignalBundle::publish()`, while the concurrently
merged G16 stack (#3043) added a call site in `drivers/gpu/drm/asahi/g16/fence.rs`
passing the previous one-argument signature, breaking `aurora.ko` builds on
`main` with `rustc E0061`.

Pass `false` from `g16::fence::Syncs::publish()`: the flag controls G17's
non-M5 compute-waiter effort lifting hook (`asahi_g17_note_compute_waiter`),
which G16 does not participate in because it manages power/DVFS in its own
driver path.

Fixes: fae8191 ("drm/asahi: g17: lift non-M5 effort immediately for waited compute submissions")
Fixes: 175375a ("Merge pull request #3043 from aurora-silicon/djdev/g16-perf-wave15")
Signed-off-by: Diljit Singh <[email protected]>
@DjDeveloperr
DjDeveloperr requested a review from a team as a code owner November 25, 2026 02:04
@github-actions github-actions Bot added area:gpu Area from CODEOWNERS (bot) blast:all Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Nov 25, 2026
@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Merge readiness at f7a059d1: not ready yet

Check Detail
CI at head ok 2 checks passed
Review no approved by satchlj, but GitHub does not count it yet (code owner from Core or Omarchy Mac needed, or approval went stale)
Requested changes ok none
Hardware row at head no no line with the head SHA f7a059d1, a Mac and a result in the PR body or a comment
Conflicts ok none
PR text ok Risk: two-way · Risk class: (two surgical compile fixes restoring exact pre-conflict G16 behavior when enabled and false when G16 is disabled; trivially revertible). - Affected scope: drivers/gpu/drm/asahi/g16/fence.rs and drivers/gpu/drm/asahi/file.rs; all kernel builds compiling CONFIG_DRM_ASAHI with CONFIG_DRM_ASAHI_G16=y or =n.

Areas: area:gpu

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

@DjDeveloperr DjDeveloperr left a comment •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Verdict at 6830b3df58c1

No blocking code findings. The fence fix is identical to the prior review. In file.rs:1890, the new compile-time guard matches the G16 module declaration. With G16 enabled, both G16 and G17 still use cumulative syncs. With G16 disabled, only G17 uses them, and the G16 type reference is compiled out.

I compiled the exact predicate in a small Rust harness with each cfg setting and verified both results. Before merging, verify the full driver builds with G16 enabled and disabled and the J773g smoke test passes.

Commit 703cbfb (part of #3043) added `gpu.as_any().is::<crate::g16::Gpu>()`
in `drivers/gpu/drm/asahi/file.rs:1895` without a `#[cfg(CONFIG_DRM_ASAHI_G16)]`
guard, breaking builds where `CONFIG_DRM_ASAHI_G16=n` (such as KUnit configs).

Guard the `crate::g16::Gpu` type check with `#[cfg(CONFIG_DRM_ASAHI_G16)]`
(evaluating to `false` when disabled), matching all other `crate::g16`
references in `asahi_core.rs`, `driver.rs`, and `fwid.rs`.

Fixes: 703cbfb ("drm/asahi: g16: use cumulative output scopes on G16")
Signed-off-by: Diljit Singh <[email protected]>
@DjDeveloperr DjDeveloperr changed the title drm/asahi: g16: pass compute_only=false to SignalBundle::publish drm/asahi: fix G16 main build breaks (SignalBundle::publish arg + CONFIG_DRM_ASAHI_G16 guard) Nov 25, 2026
@github-actions github-actions Bot added the ci-failing A check failed at the PR head (bot) label Nov 25, 2026

@satchlj satchlj 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.

Gemini 4 Neon on @satchlj's behalf:

Verdict: REQUEST_CHANGES at 6830b3df58c1

Summary

Both kernel fixes in this PR look sound:

  • 53fc42ef2ee4 (drivers/gpu/drm/asahi/g16/fence.rs:592): passing compute_only = false matches g17::sync_output::SignalBundle::publish(&mut self, current: &Fence, compute_only: bool) (drivers/gpu/drm/asahi/g17/sync_output.rs:51), keeps G16 out of G17's non-M5 compute-waiter path, and is the only SignalBundle::publish call site under drivers/gpu/drm/asahi/g16/.
  • 6830b3df58c1 (drivers/gpu/drm/asahi/file.rs:1890-1899): guarding gpu.as_any().is::<crate::g16::Gpu>() with #[cfg(CONFIG_DRM_ASAHI_G16)] resolves the CONFIG_DRM_ASAHI_G16=n build failure cleanly, and there are no other unguarded crate::g16:: references in file.rs.
  • Both commits have proper Fixes: and Signed-off-by: trailers.

Blocking Issue

  1. asahi-m4 host-test mock out of sync (Host tests fails 548/549 with rustc E0061):
    tools/testing/selftests/drivers/gpu/asahi-m4/test-fence-signalling.py:359 still defines the old 1-argument mock signature:
    pub(crate) fn publish(&mut self, fence: &Fence) -> Result {
    Because test-fence-signalling.py compiles drivers/gpu/drm/asahi/g16/fence.rs against this mock, asahi-m4 (not ok 4 - test-fence-signalling.py) deterministically fails with:
    error[E0061]: this method takes 1 argument but 2 arguments were supplied
       --> .../timeline.rs:417:20
        |
    417 |             bundle.publish(fence, false)?;
        |                    ^^^^^^^        ----- unexpected argument #2 of type `bool`
    
    Please update SignalBundle::publish in tools/testing/selftests/drivers/gpu/asahi-m4/test-fence-signalling.py:359 to accept compute_only: bool (and asserting !compute_only or recording it in BundleLog would also lock in the G16 compute_only == false contract in host tests).

Happy to re-review and approve once test-fence-signalling.py is updated and Host tests passes at the new head.

@github-actions github-actions Bot added the changes-requested A reviewer requested changes (bot) label Nov 25, 2026
…ly arg

Update the SignalBundle::publish mock in test-fence-signalling.py to match
the two-argument signature (fence, compute_only: bool), record compute_only
in BundleLog, and assert !compute_only so G16 never invokes G17
compute-waiter effort accounting.

Signed-off-by: Diljit Singh <[email protected]>
@github-actions github-actions Bot added needs-hw-row No hardware row at the PR head (bot) and removed ci-failing A check failed at the PR head (bot) labels Nov 25, 2026
@DjDeveloperr

Copy link
Copy Markdown
Contributor Author

J773g (T8132, Apple M4, G16G B0) compile + runtime smoke: PASS.

  • Built & booted commit: 6830b3df58c1f4abc6f2da9605bca47c15cc5a8d (7.3.0-ARCH-m4pr3111, live aurora.ko Build ID 34d81953265a7c9b9698b461d732a922ea3884c3, 0 Rust errors, compiled native t8132-j773g.dtb). Current head f7a059d114dfb71bb6c67ba067fadbb73a3e0065 has zero kernel diff vs 6830b3df58c1 (touches only tools/testing/selftests/drivers/gpu/asahi-m4/test-fence-signalling.py, which passed locally 7/7 + C coalescing with checkpatch --strict 0/0/0).
  • Boot & feature verification: Booted cleanly over Wi-Fi (wld0=up, /lib -> usr/lib, display-manager=active, 0 failed units); G16G rev=0x10 chip=0x8132, CUMULATIVE_SIGNALS (bit 29) advertised.
  • GPU & cumulative-signal smoke: dEQP-VK.api.smoke.* 8/8 PASS, render.light PASS, compute.light PASS, sync.signal PASS (22,989 GPU jobs, health: failed 0 errno 0 degraded 0, 0 GPU faults, 0 recoveries, 0 hang kills, 0 failed units).
  • Cleanup: Restored 7.3.0-ARCH-m4prod25d + aura-383-r3-stage2.bin, removed candidate modules, verified display-manager=active and 0 failed units.

@satchlj satchlj 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.

Gemini 4 Neon on @satchlj's behalf — re-reviewed f7a059d114df (MERGEABLE, CI host-tests / readiness / pr-text all SUCCESS).

Verdict

APPROVE at f7a059d114df — prior blocker in test-fence-signalling.py is resolved and all CI checks are green.

Audit Highlights

  • Prior host-tests blocker resolved (f7a059d114df): tools/testing/selftests/drivers/gpu/asahi-m4/test-fence-signalling.py:359 updates the mock SignalBundle::publish(&mut self, fence: &Fence, compute_only: bool) signature, records log.compute_only, and explicitly asserts !compute_only so G16 cannot accidentally trigger G17's compute-waiter effort accounting.
  • G16 SignalBundle::publish & CONFIG_DRM_ASAHI_G16 guard (53fc42ef2ee4, 6830b3df58c1): Passing compute_only = false at drivers/gpu/drm/asahi/g16/fence.rs:592 and guarding gpu.as_any().is::<crate::g16::Gpu>() with #[cfg(CONFIG_DRM_ASAHI_G16)] at drivers/gpu/drm/asahi/file.rs:1890-1899 fix both main build breaks cleanly (including unblocking SEP source checks / kunit under CONFIG_DRM_ASAHI_G16=n).
  • All three commits carry valid Signed-off-by trailers.

Merge-Gate Note

  • Note the exact-head aurora.ko compile / J773g runtime check listed in Not yet (f7a059d1) before merge.

@github-actions github-actions Bot removed the changes-requested A reviewer requested changes (bot) label Nov 25, 2026
@DjDeveloperr
DjDeveloperr merged commit d6f0b71 into main Nov 25, 2026
4 checks passed
RyanTheTide added a commit that referenced this pull request Nov 25, 2026
Picks up #3111, which main's asahi driver needs to build on the fleet
config and in the KUnit job.

Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide
RyanTheTide deleted the djdev/g16-fix-scope-publish-arg 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:all Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants