diff options
| author | Maíra Canal <mcanal@igalia.com> | 2023-09-05 18:06:34 -0300 |
|---|---|---|
| committer | Maíra Canal <mcanal@igalia.com> | 2023-11-06 10:09:23 -0300 |
| commit | 09a93cc4f7d1893777f6b788bffe60d64e4d5df7 (patch) | |
| tree | da3b555b3007c5c2d05b87a161c502b6729c3ed9 /drivers/gpu/drm/v3d/v3d_gem.c | |
| parent | drm: Do not round to megabytes for greater than 1MiB sizes in fdinfo stats (diff) | |
| download | linux-09a93cc4f7d1893777f6b788bffe60d64e4d5df7.tar.gz linux-09a93cc4f7d1893777f6b788bffe60d64e4d5df7.zip | |
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: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Signed-off-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Signed-off-by: Maíra Canal <mcanal@igalia.com>
Acked-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Melissa Wen <mwen@igalia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230905213416.1290219-3-mcanal@igalia.com
Diffstat (limited to 'drivers/gpu/drm/v3d/v3d_gem.c')
| -rw-r--r-- | drivers/gpu/drm/v3d/v3d_gem.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/v3d/v3d_gem.c b/drivers/gpu/drm/v3d/v3d_gem.c index 5688d46d30e6..a33e90f29bd5 100644 --- a/drivers/gpu/drm/v3d/v3d_gem.c +++ b/drivers/gpu/drm/v3d/v3d_gem.c @@ -415,6 +415,7 @@ v3d_job_init(struct v3d_dev *v3d, struct drm_file *file_priv, job = *container; job->v3d = v3d; job->free = free; + job->file = file_priv; ret = drm_sched_job_init(&job->base, &v3d_priv->sched_entity[queue], v3d_priv); |
