From: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
Boris Brezillon <boris.brezillon@collabora.com>,
Steven Price <steven.price@arm.com>,
Liviu Dudau <liviu.dudau@arm.com>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
kernel@collabora.com,
Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
Subject: [PATCH v2 3/3] drm/panthor: Reduce padding in gems debugfs for refcount
Date: Tue, 21 Apr 2026 12:45:15 +0200 [thread overview]
Message-ID: <20260421-panthor-bo-reclaim-observability-v2-3-c9135eedfb6f@collabora.com> (raw)
In-Reply-To: <20260421-panthor-bo-reclaim-observability-v2-0-c9135eedfb6f@collabora.com>
The "gems" debugfs file is getting a little too wide for comfort. While
a lot of this is unavoidable due to the theoretical upper limits of
numbers here (e.g. size needs to be 16 chars because 2**48-1 in decimal
is 15 digits, plus one space for separation), the refcount column has a
decent 5 characters to be saved, as it can only ever contain a 10-digit
decimal number.
Reduce the refcount column's width to 11, which fulfils this requirement
with an additional space for separation.
Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
---
drivers/gpu/drm/panthor/panthor_gem.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/panthor/panthor_gem.c b/drivers/gpu/drm/panthor/panthor_gem.c
index b6fe20b7e6d0..462a9d2ce319 100644
--- a/drivers/gpu/drm/panthor/panthor_gem.c
+++ b/drivers/gpu/drm/panthor/panthor_gem.c
@@ -1644,7 +1644,7 @@ static void panthor_gem_debugfs_bo_print(struct panthor_gem_object *bo,
snprintf(creator_info, sizeof(creator_info),
"%s/%d", bo->debugfs.creator.process_name, bo->debugfs.creator.tgid);
- seq_printf(m, "%-32s%-16d%-16d%-11d%-16zd%-16zd0x%-16lx",
+ seq_printf(m, "%-32s%-16d%-11d%-11d%-16zd%-16zd0x%-16lx",
creator_info,
bo->base.name,
refcount,
@@ -1681,8 +1681,8 @@ static void panthor_gem_debugfs_print_bos(struct panthor_device *ptdev,
panthor_gem_debugfs_print_flag_names(m);
- seq_puts(m, "created-by global-name refcount evictions size resident-size file-offset state usage label\n");
- seq_puts(m, "---------------------------------------------------------------------------------------------------------------------------------------------------------\n");
+ seq_puts(m, "created-by global-name refcount evictions size resident-size file-offset state usage label\n");
+ seq_puts(m, "----------------------------------------------------------------------------------------------------------------------------------------------------\n");
scoped_guard(mutex, &ptdev->gems.lock) {
list_for_each_entry(bo, &ptdev->gems.node, debugfs.node) {
@@ -1690,7 +1690,7 @@ static void panthor_gem_debugfs_print_bos(struct panthor_device *ptdev,
}
}
- seq_puts(m, "=========================================================================================================================================================\n");
+ seq_puts(m, "====================================================================================================================================================\n");
seq_printf(m, "Total size: %zd, Total resident: %zd, Total reclaimable: %zd\n",
totals.size, totals.resident, totals.reclaimable);
}
--
2.53.0
next prev parent reply other threads:[~2026-04-21 10:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-21 10:45 [PATCH v2 0/3] Let userspace know about swapped out panthor GEM objects Nicolas Frattaroli
2026-04-21 10:45 ` [PATCH v2 1/3] drm/fdinfo: Add "evicted" memory accounting Nicolas Frattaroli
2026-04-22 10:59 ` Steven Price
2026-04-22 22:36 ` Claude review: " Claude Code Review Bot
2026-04-21 10:45 ` [PATCH v2 2/3] drm/panthor: Implement evicted status for GEM objects Nicolas Frattaroli
2026-04-22 22:36 ` Claude review: " Claude Code Review Bot
2026-04-21 10:45 ` Nicolas Frattaroli [this message]
2026-04-22 22:36 ` Claude review: drm/panthor: Reduce padding in gems debugfs for refcount Claude Code Review Bot
2026-04-22 22:36 ` Claude review: Let userspace know about swapped out panthor GEM objects Claude Code Review Bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260421-panthor-bo-reclaim-observability-v2-3-c9135eedfb6f@collabora.com \
--to=nicolas.frattaroli@collabora.com \
--cc=airlied@gmail.com \
--cc=boris.brezillon@collabora.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel@collabora.com \
--cc=linux-kernel@vger.kernel.org \
--cc=liviu.dudau@arm.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
--cc=steven.price@arm.com \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox