[PATCH 0/2] drm/msm: Per-submission GPU time on A5xx
From: Fabricio Akio via B4 Relay
Date: Sat Oct 31 2026 - 22:33:15 EST
The GPU time and cycles msm records for each submission, reported in
the msm_gpu_submit_retired trace event and added to fdinfo, read zero
on A5xx, whose submit path never copies the counters they come from.
The second patch adds those copies, as a6xx has them.
The first fixes what is recorded for a submit killed by hangcheck, on
every generation that has these counters: its end stamps may never
have been written, and about three years of GPU time is then added to
the process's fdinfo. With the second patch alone, A5xx would start
reporting that.
Tested on a Motorola Moto X4 (SDM630, A508), whose board file is not
in mainline yet, on sdm660-mainline's 7.2 kernel with commit
b303e1d52811 ("drm/msm: Recover HW before retire hung submit"), which
the first patch needs. Its code is shared with a6xx and later, not
tested there.
---
Fabricio Akio (2):
drm/msm: Report no GPU time for a submit killed by hangcheck
drm/msm/a5xx: Record per-submission GPU time and cycles
drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 22 ++++++++++++++++++++++
drivers/gpu/drm/msm/msm_gpu.c | 15 ++++++++++++++-
2 files changed, 36 insertions(+), 1 deletion(-)
---
base-commit: a39c950806213f6861d00f90729acaaa21f2d95a
change-id: 20261031-a5xx-submit-stats-fc108684922a
Best regards,
--
Fabricio Akio <fabricioakio@xxxxxxxxx>