Re: [PATCH v4] accel/rocket: Report NPU usage through fdinfo

From: Tvrtko Ursulin

Date: Thu Nov 12 2026 - 08:47:14 EST



On 06/11/2026 15:44, Sidong Yang wrote:
On Thu, Nov 05, 2026 at 11:04:29AM +0000, Tvrtko Ursulin wrote:
It would just be adding u64 drm_sched_entity_get_runtime(entity).
Nothing else would need to be exported and the implementation simply
locks entity->stats and returns the runtime. As long as the caller knows
they haven't destroyed the entity it is safe since entity holds a
reference to the stats object.

Thanks for the suggestion. If Philipp and Danilo are fine with it, may I
add drm_sched_entity_get_runtime() and switch rocket to it in v5?

I am neither Philipp nor Danilo but I would say go for it.

Regards,

Tvrtko