Skip to content

drm/asahi: test G14 27.2 pool encoding across a failed publication - #3531

Merged
RyanTheTide merged 1 commit into
mainfrom
test/g14-pool-failed-publish-20261129
Nov 29, 2026
Merged

RyanTheTide merged 1 commit into
mainfrom
test/g14-pool-failed-publish-20261129

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

What: Adds the test Dj asked for on linux#3182: the G14 27.2 CommandPool encode_with() and mark_published() paths are exercised across a failed publication. After a failed in-flight reservation and repeated retries, the last published command and the other slots stay intact in both buffer parities. It also covers an encoder error and rotation after a successful publication. Test-only change.

Tested: Host tests: the new regressions pass 2/2 and the existing G14 ABI tests pass 24/24. Two negative controls (rotation moved to encode time, or publication rotation removed) compile and fail on the command-preservation assertions. The targeted host runner passes 4/4 jobs. Strict checkpatch is clean.

Risk: two-way · tools/asahi host tests only. No kernel code changes.

Not yet: nothing; no hardware row is needed for a host-only test.

Details

The test runs the production pool code with host-backed GPU arrays. This is Dj's area, so it waits for his look before merge.

Evidence

Source item: M2GPU-NEXT.md:591 (Dj review nit on #3182).

Exercise the production CommandPool encode_with() and mark_published()
bodies with host-backed GPU arrays. Fail the in-flight reservation after
encoding, retry repeatedly, and verify that the last published command
and other slots remain intact across both buffer parities.

Also cover an encoder error and rotation after successful publication.
Register both tests and negative controls that move rotation to encode
time or remove publication rotation; both compile and fail on command
preservation assertions.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide
RyanTheTide requested review from a team and DjDeveloperr as code owners November 28, 2026 13:11

@aurora-silicon-review aurora-silicon-review Bot 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.

Verdict: MERGE at 6316e007

Blockers: none (wait for the queued host-tests, pr-text, and readiness CI checks to finish green and coordinate with GPU maintainers before merge)

Checked: no Apple material, no AI attribution, human DCO Signed-off-by, host-test-only change (+178/-0 across tools/asahi/g14-v27-2-pool-tests.py and tools/asahi/run-host-tests.py, zero kernel runtime changes — no hardware row required), exercises production CommandPool::encode_with() and CommandPool::mark_published() from drivers/gpu/drm/asahi/gpu/v27_2.rs across failed publication, repeated retries, encoder errors, and buffer rotation with two negative mutations (flip-on-encode, no-publish-flip) wired into ASAHI_TESTS, author verified 2/2 new tests + 24/24 G14 ABI tests + 4/4 host runner jobs + checkpatch --strict clean, PR body has Tested: and Risk: two-way, branch is MERGEABLE against main.

Evidence
  • tools/asahi/g14-v27-2-pool-tests.py: extracts CommandPool, encode_with(), mark_published(), pool_command(), spare_buffer(), and Common directly from drivers/gpu/drm/asahi/{gpu/v27_2.rs,g14_v27_2_abi.rs,g14_v27_2_render.rs} and verifies across all POOL_SLOTS and both parities that:
    • Failed reservation after encode_with() reuses the spare buffer on retries, leaves the previously published command and all other slots byte-identical, and does not flip pool.published.
    • Encoder error (Err(EINVAL)) similarly preserves the published command and pool.published.
    • Successful mark_published() flips pool.published ^= 1 << slot and rotates the next encode_with() onto the prior buffer.
  • tools/asahi/run-host-tests.py: registers g14-v27-2-pool-tests.py with both flip-on-encode and no-publish-flip KILL mutations.
  • CI at 6316e007: host-tests, pr-text, and readiness currently QUEUED.

@github-actions github-actions Bot added area:gpu Area from CODEOWNERS (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) labels Nov 28, 2026
@github-actions

github-actions Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

Merge readiness at 6316e007: not ready yet

Check Detail
CI at head ok 2 checks passed
Review no needs one approving review from Core or Omarchy Mac (not the author)
Requested changes ok none
Hardware row at head no no line with the head SHA 6316e007, a Mac and a result in the PR body or a comment
Conflicts ok none
PR text ok Risk: two-way · tools/asahi host tests only. No kernel code changes.

Areas: area:gpu

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

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

code-owner ping <@422957901716652033> / @DjDeveloperr: merge train at 6316e007. App approved; test/CI/tools files only, so no hardware row applies. Merges 1 h from now under the 6-point rule once hosted CI is green, unless you object.

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Merging under the 6-point rule (Ryan 09:29, permanent), at 6316e007. (1) The review App approved at this head. (2) Full CI is green. (3/4) Rows: test/CI/tools-only. (5) There's no blocking review. (6) Dj was pinged here 61 min ago with no objection. Revert: git revert -m 1 <merge>.

@RyanTheTide
RyanTheTide merged commit eb95e61 into main Nov 29, 2026
4 checks passed
@RyanTheTide
RyanTheTide deleted the test/g14-pool-failed-publish-20261129 branch November 29, 2026 08:24
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) 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.

1 participant