summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/msm/msm_drv.h
diff options
context:
space:
mode:
authorRob Clark <robdclark@chromium.org>2024-03-01 21:53:45 +0300
committerRob Clark <robdclark@chromium.org>2024-06-21 23:41:43 +0300
commit204226de27c3a6328b155005f132afe12eca3a5e (patch)
tree4a0ad091d556439dfd708680b937c65d4683ce42 /drivers/gpu/drm/msm/msm_drv.h
parent593f1dd4c81f6932042508a80186dbdea90312a5 (diff)
downloadlinux-204226de27c3a6328b155005f132afe12eca3a5e.tar.xz
drm/msm: Add GPU memory traces
Perfetto can use these traces to track global and per-process GPU memory usage. Signed-off-by: Rob Clark <robdclark@chromium.org> Patchwork: https://patchwork.freedesktop.org/patch/580854/
Diffstat (limited to 'drivers/gpu/drm/msm/msm_drv.h')
-rw-r--r--drivers/gpu/drm/msm/msm_drv.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/msm_drv.h b/drivers/gpu/drm/msm/msm_drv.h
index 912ebaa5df84..e256d72adddd 100644
--- a/drivers/gpu/drm/msm/msm_drv.h
+++ b/drivers/gpu/drm/msm/msm_drv.h
@@ -128,6 +128,11 @@ struct msm_drm_private {
struct msm_perf_state *perf;
/**
+ * total_mem: Total/global amount of memory backing GEM objects.
+ */
+ atomic64_t total_mem;
+
+ /**
* List of all GEM objects (mainly for debugfs, protected by obj_lock
* (acquire before per GEM object lock)
*/