[PATCH v2 0/3] Let userspace know about swapped out panthor GEM objects

From: Nicolas Frattaroli

Date: Tue Apr 21 2026 - 06:49:10 EST


Panthor has recently gained a GEM shrinker. It allows evicting memory
that backs unused GEM objects to swap.

In this series, both fdinfo and Panthor's gems debugfs are extended so
that information on evicted pages can be gathered by users through these
two methods.

---
Changes in v2:
- Change reclaimed_count to saturate at INT_MAX
- Add "evictions" column to panthor gems debugfs which prints
reclaimed_count
- Add a patch to reduce the padding of one panthor gems debugfs column a
bit
- Link to v1: https://patch.msgid.link/20260420-panthor-bo-reclaim-observability-v1-0-a4d1a36ee84f@xxxxxxxxxxxxx

To: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>
To: Maxime Ripard <mripard@xxxxxxxxxx>
To: Thomas Zimmermann <tzimmermann@xxxxxxx>
To: David Airlie <airlied@xxxxxxxxx>
To: Simona Vetter <simona@xxxxxxxx>
To: Boris Brezillon <boris.brezillon@xxxxxxxxxxxxx>
To: Steven Price <steven.price@xxxxxxx>
To: Liviu Dudau <liviu.dudau@xxxxxxx>
Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx
Cc: kernel@xxxxxxxxxxxxx
Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@xxxxxxxxxxxxx>

---
Nicolas Frattaroli (3):
drm/fdinfo: Add "evicted" memory accounting
drm/panthor: Implement evicted status for GEM objects
drm/panthor: Reduce padding in gems debugfs for refcount

drivers/gpu/drm/drm_file.c | 8 ++++++++
drivers/gpu/drm/panthor/panthor_gem.c | 18 ++++++++++++++----
drivers/gpu/drm/panthor/panthor_gem.h | 10 ++++++++++
include/drm/drm_file.h | 2 ++
include/drm/drm_gem.h | 2 ++
5 files changed, 36 insertions(+), 4 deletions(-)
---
base-commit: 3f9357c30a44734d45e3093c521d52b2aefb09f5
change-id: 20260420-panthor-bo-reclaim-observability-970679c9533c

Best regards,
--
Nicolas Frattaroli <nicolas.frattaroli@xxxxxxxxxxxxx>