Skip to content
Unverified Commit 09a93cc4 authored by Maíra Canal's avatar Maíra Canal
Browse files

drm/v3d: Implement show_fdinfo() callback for GPU usage stats



This patch exposes the accumulated amount of active time per client
through the fdinfo infrastructure. The amount of active time is exposed
for each V3D queue: BIN, RENDER, CSD, TFU and CACHE_CLEAN.

In order to calculate the amount of active time per client, a CPU clock
is used through the function local_clock(). The point where the jobs has
started is marked and is finally compared with the time that the job had
finished.

Moreover, the number of jobs submitted to each queue is also exposed on
fdinfo through the identifier "v3d-jobs-<queue>".

Co-developed-by: default avatarJose Maria Casanova Crespo <jmcasanova@igalia.com>
Signed-off-by: default avatarJose Maria Casanova Crespo <jmcasanova@igalia.com>
Signed-off-by: default avatarMaíra Canal <mcanal@igalia.com>
Acked-by: default avatarJose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: default avatarMelissa Wen <mwen@igalia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230905213416.1290219-3-mcanal@igalia.com
parent 5faf6e18
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment