Skip to content

drm/asahi: G17 teardown review follow-ups (cookie order, kept reservations, kept-graph count) - #509

Merged
DjDeveloperr merged 3 commits into
integration/aurorafrom
fix/g17-teardown-review-20261027
Oct 27, 2026
Merged

DjDeveloperr merged 3 commits into
integration/aurorafrom
fix/g17-teardown-review-20261027

Conversation

@DjDeveloperr

Copy link
Copy Markdown
Contributor

Three follow-ups to #505 and #508, from maralcbr's review of the omacom mirror (omacom/linux-aurora#244). The same commits are on that PR.

  1. take a G17 render-only kill's cookie before its admission hold. If the cookie counter was exhausted, the render-only kill returned EOVERFLOW with its admission hold still installed. The cookie now comes first, as in a failed context's kill.
  2. keep a G17 kept object's list reservation with the object. When reserve_kept failed, keep was still set, so the drop decremented and could consume another kept object's reservation. reserve_kept now reports whether it reserved; an object kept without a reservation is leaked at drop, as documented.
  3. count kept G17 render graphs and fix two stale comments.

Testing

Neo (A18 Pro), Mesa agx3 rb6, module built from this branch (build 2c8d9952):

  • regression gate: PERFORMANCE-REGRESSION-PASS;
  • targeted CTS (5368 cases): 4687 pass, 681 not supported, 0 fail;
  • no asahi kernel errors. The capacity view shows the new line, with 0 kept and 0 leaked, and nothing pending.

The omacom mirror passes omacom KUnit with these commits.

…hold

A render-only kill took its admission hold on the context's render pairs
and only then its cookie. If the cookie counter was exhausted, the
EOVERFLOW returned with the hold still installed, so those pairs stayed
held for a kill that was never published. Take the cookie first, as a
failed context's kill already does.
retain_until_stop reserved a list entry for an object kept until firmware
stop, and its drop took that entry in keep_object. When the reservation
failed, keep was still set, so the drop decremented a reservation that
belonged to another kept object and could take its entry.

reserve_kept now reports whether it reserved, and the kept object carries
that. An object kept without a reservation is leaked at drop, as the
failed reservation already documented, and leaves the other objects'
reservations alone.
Render graphs of a detached context that still links work are kept until
the firmware stops, like firmware-linked work objects, but had no counter
beside firmware_linked_objects. The capacity view now reports them as
firmware_linked_render_graphs, with the number leaked because the list
could not grow.

Two comments described the code before recent changes: render
observation needs only the fragment queue's notification now, and a kill
hold on render pairs ends when the killed context's scheduler release is
consumed, not only when the processors stop.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant