diff options
| author | Sujaritha Sundaresan <sujaritha.sundaresan@intel.com> | 2026-09-29 10:33:42 +0530 |
|---|---|---|
| committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2026-10-01 08:46:20 -0400 |
| commit | 367130639b69bb122435cc5dbcaa38ccf52c2f7b (patch) | |
| tree | 09a3adcf7f24301f01e9bbf046e1430175c314c6 /tools/perf/scripts/python/task-analyzer.py | |
| parent | 34d088dfb88560f68ece67f3fb4a24e2ceee049f (diff) | |
| download | linux-367130639b69bb122435cc5dbcaa38ccf52c2f7b.tar.gz linux-367130639b69bb122435cc5dbcaa38ccf52c2f7b.zip | |
drm/xe/guc: Let xe_guc_ct_send_locked() callers reserve G2H credit
Commit d4a7e1611716 ("drm/xe: batch CT pagefault acks with periodic
flush") added a defer_flush argument to xe_guc_ct_send_locked(). At the
same time it dropped the g2h_len and num_g2h arguments, which had no
in-tree users, and hardcoded a zero G2H reservation.
That leaves no way to send an H2G that expects a G2H reply while
already holding ct->lock. The G2H receive path (parse_g2h_event() and
g2h_fast_path()) releases credit unconditionally for replies such as
DEREGISTER_CONTEXT_DONE, SCHED_CONTEXT_MODE_DONE and
TLB_INVALIDATION_DONE. If the credit was never reserved,
__g2h_release_space() reports an "Invalid G2H release" and marks the CT
dead with CT_DEAD_G2H_RELEASE.
Replacing two u32 arguments with a bool also means a caller written
against the old signature can silently change meaning when the two
reservation arguments get merged into one: the call still compiles,
still sends the H2G, and loses only the reservation.
Add g2h_len and num_g2h back, ahead of defer_flush, so that the
function matches xe_guc_ct_send() and forwards both values to
guc_ct_send_locked(). The kernel-doc now says when a reservation is
required and that a non-zero reservation must not be made from a G2H
handler, because waiting for credit can dequeue G2H inline.
The only existing caller, the pagefault ack path, does not expect a
reply. It passes 0, 0 and behaves exactly as before.
Cc: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Sujaritha Sundaresan <sujaritha.sundaresan@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patch.msgid.link/20260929050342.221789-1-sujaritha.sundaresan@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions
