[PATCH] drm/panfrost: Print RSS for tiler heap BO's in debugfs GEMS file

Adrián Larumbe adrian.larumbe at collabora.com
Thu Jul 31 17:35:31 UTC 2025


Otherwise it would display the virtual allocation size, which is often
much bigger than the RSS.

Signed-off-by: Adrián Larumbe <adrian.larumbe at collabora.com>
Fixes: e48ade5e23ba ("drm/panfrost: show device-wide list of DRM GEM objects over DebugFS")
---
 drivers/gpu/drm/panfrost/panfrost_gem.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/panfrost/panfrost_gem.c b/drivers/gpu/drm/panfrost/panfrost_gem.c
index bb73f2a68a12..da7613801ac0 100644
--- a/drivers/gpu/drm/panfrost/panfrost_gem.c
+++ b/drivers/gpu/drm/panfrost/panfrost_gem.c
@@ -432,7 +432,8 @@ static void panfrost_gem_debugfs_bo_print(struct panfrost_gem_object *bo,
 	if (!refcount)
 		return;
 
-	resident_size = bo->base.pages ? bo->base.base.size : 0;
+	resident_size = bo->base.pages ?
+		(bo->is_heap ? bo->heap_rss_size : bo->base.base.size) : 0;
 
 	snprintf(creator_info, sizeof(creator_info),
 		 "%s/%d", bo->debugfs.creator.process_name, bo->debugfs.creator.tgid);

base-commit: 934452cbb16e1e3609ba52acb48c503b9aaf3154
-- 
2.50.0



More information about the dri-devel mailing list