[PATCH v5 0/2] accel/rocket: Report NPU usage through fdinfo
From: Sidong Yang
Date: Thu Nov 12 2026 - 12:16:08 EST
Report how much of the NPU each client uses through fdinfo. Patch 1
exports the runtime the scheduler already accounts per entity, and patch
2 uses it for rocket's drm-engine-npu key.
v5: Use the entity runtime from the new drm_sched_entity_get_runtime()
instead of a counter in rocket (Tvrtko Ursulin). Reviewed-by tags
are not carried as the accounting changed. Based on drm-misc-next.
v4: Single drm-engine-npu key with drm-engine-capacity-npu, and
documentation (Tomeu Vizoso).
v3: Add a rocket_engine_usage_create() helper (Gyeyoung Baek).
v2: Size the per-core counters by rdev->max_cores.
Link to v4: https://lore.kernel.org/all/20261103155338.1949294-1-sidong.yang@xxxxxxxxxx/
Link to v3: https://lore.kernel.org/all/20261103104804.1887489-1-sidong.yang@xxxxxxxxxx/
Link to v2: https://lore.kernel.org/all/20261101152723.1430312-1-sidong.yang@xxxxxxxxxx/
Link to v1: https://lore.kernel.org/all/20261031083642.1076356-1-sidong.yang@xxxxxxxxxx/
Sidong Yang (2):
drm/sched: Add drm_sched_entity_get_runtime()
accel/rocket: Report NPU usage through fdinfo
Documentation/accel/rocket/index.rst | 28 ++++++++++++++++++++++++
Documentation/gpu/drm-usage-stats.rst | 1 +
drivers/accel/rocket/rocket_drv.c | 21 +++++++++++++++++-
drivers/gpu/drm/scheduler/sched_entity.c | 25 +++++++++++++++++++++
include/drm/gpu_scheduler.h | 1 +
5 files changed, 75 insertions(+), 1 deletion(-)
base-commit: 7678b7f2d38b5575981b1a7c09139a4660b66826
--
2.53.0