Repository navigation
drm/asahi: fix G16 main build breaks (SignalBundle::publish arg + CONFIG_DRM_ASAHI_G16 guard) - #3111
Conversation
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]>
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
There was a problem hiding this comment.
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]>
satchlj
left a comment
There was a problem hiding this comment.
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): passingcompute_only = falsematchesg17::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 onlySignalBundle::publishcall site underdrivers/gpu/drm/asahi/g16/.6830b3df58c1(drivers/gpu/drm/asahi/file.rs:1890-1899): guardinggpu.as_any().is::<crate::g16::Gpu>()with#[cfg(CONFIG_DRM_ASAHI_G16)]resolves theCONFIG_DRM_ASAHI_G16=nbuild failure cleanly, and there are no other unguardedcrate::g16::references infile.rs.- Both commits have proper
Fixes:andSigned-off-by:trailers.
Blocking Issue
asahi-m4host-test mock out of sync (Host testsfails548/549withrustc E0061):
tools/testing/selftests/drivers/gpu/asahi-m4/test-fence-signalling.py:359still defines the old 1-argument mock signature:Becausepub(crate) fn publish(&mut self, fence: &Fence) -> Result {
test-fence-signalling.pycompilesdrivers/gpu/drm/asahi/g16/fence.rsagainst this mock,asahi-m4(not ok 4 - test-fence-signalling.py) deterministically fails with:Please updateerror[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`SignalBundle::publishintools/testing/selftests/drivers/gpu/asahi-m4/test-fence-signalling.py:359to acceptcompute_only: bool(and asserting!compute_onlyor recording it inBundleLogwould also lock in the G16compute_only == falsecontract in host tests).
Happy to re-review and approve once test-fence-signalling.py is updated and Host tests passes at the new head.
…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]>
|
J773g (T8132, Apple M4, G16G B0) compile + runtime smoke: PASS.
|
satchlj
left a comment
There was a problem hiding this comment.
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-testsblocker resolved (f7a059d114df):tools/testing/selftests/drivers/gpu/asahi-m4/test-fence-signalling.py:359updates the mockSignalBundle::publish(&mut self, fence: &Fence, compute_only: bool)signature, recordslog.compute_only, and explicitly asserts!compute_onlyso G16 cannot accidentally trigger G17's compute-waiter effort accounting. - G16
SignalBundle::publish&CONFIG_DRM_ASAHI_G16guard (53fc42ef2ee4,6830b3df58c1): Passingcompute_only = falseatdrivers/gpu/drm/asahi/g16/fence.rs:592and guardinggpu.as_any().is::<crate::g16::Gpu>()with#[cfg(CONFIG_DRM_ASAHI_G16)]atdrivers/gpu/drm/asahi/file.rs:1890-1899fix bothmainbuild breaks cleanly (including unblockingSEP source checks / kunitunderCONFIG_DRM_ASAHI_G16=n). - All three commits carry valid
Signed-off-bytrailers.
Merge-Gate Note
- Note the exact-head
aurora.kocompile / J773g runtime check listed inNot yet(f7a059d1) before merge.
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]>
Summary
Fixes both
aurora.kocompile breaks onmain(a97744009d4d) after the concurrent G17/G16 merges:drivers/gpu/drm/asahi/g16/fence.rs:591: passfalseas the secondcompute_only: boolargument added byfae8191fafbatog17::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).drivers/gpu/drm/asahi/file.rs:1895: guardgpu.as_any().is::<crate::g16::Gpu>()with#[cfg(CONFIG_DRM_ASAHI_G16)]soCONFIG_DRM_ASAHI_G16=nconfigs (includingSEP source checks / kunit) compile cleanly.Risk
falsewhen G16 is disabled; trivially revertible).drivers/gpu/drm/asahi/g16/fence.rsanddrivers/gpu/drm/asahi/file.rs; all kernel builds compilingCONFIG_DRM_ASAHIwithCONFIG_DRM_ASAHI_G16=yor=n.Tested
g17::references insideg16/and allcrate::g16references outsideg16/at6830b3df58c1f4abc6f2da9605bca47c15cc5a8d.checkpatch.pl --strict, PRhost-tests/readiness/pr-textCI at6830b3df58c1f4abc6f2da9605bca47c15cc5a8d.aurora.kocompile + J773g smoke verification in progress at6830b3df58c1f4abc6f2da9605bca47c15cc5a8d.Not yet
aurora.kocompile + J773g runtime check at6830b3df58c1f4abc6f2da9605bca47c15cc5a8d(running now; results will be posted before merge).