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/[email protected]/
Link to v3: 
https://lore.kernel.org/all/[email protected]/
Link to v2: 
https://lore.kernel.org/all/[email protected]/
Link to v1: 
https://lore.kernel.org/all/[email protected]/

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

Reply via email to