[RFC 5/6] drm/msm: Add basic memory stats
Tvrtko Ursulin
tvrtko.ursulin at linux.intel.com
Mon Apr 17 15:56:12 UTC 2023
From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
Use DRM helpers for implementing basic memory stats.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
Cc: Rob Clark <robdclark at chromium.org>
---
drivers/gpu/drm/msm/msm_drv.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
index 060c7689a739..7662103b5999 100644
--- a/drivers/gpu/drm/msm/msm_drv.c
+++ b/drivers/gpu/drm/msm/msm_drv.c
@@ -1090,6 +1090,10 @@ static const struct drm_driver msm_driver = {
.prime_fd_to_handle = drm_gem_prime_fd_to_handle,
.gem_prime_import_sg_table = msm_gem_prime_import_sg_table,
.gem_prime_mmap = msm_gem_prime_mmap,
+#ifdef CONFIG_PROC_FS
+ .query_fdinfo_memory_regions = drm_query_fdinfo_system_region,
+ .query_fdinfo_memory_stats = drm_query_fdinfo_system_memory,
+#endif
#ifdef CONFIG_DEBUG_FS
.debugfs_init = msm_debugfs_init,
#endif
--
2.37.2
More information about the dri-devel
mailing list