[PATCH v2 0/4] Panthor BO tagging and GEMS debug display

From: Adrián Larumbe
Date: Wed Mar 19 2025 - 11:23:04 EST


This patch series is aimed at providing UM with detailed memory profiling
information in debug builds. It is achieved through a device-wide list of
DRM GEM objects, and also implementing the ability to label BO's from UM
through a new IOCTL.

The new debugfs file shows a list of driver DRM GEM objects in tabular mode.
To visualise it, cat sudo cat /sys/kernel/debug/dri/*.gpu/gems.

Previous discussion mail archive:
https://lore.kernel.org/dri-devel/20250316215139.3940623-1-adrian.larumbe@xxxxxxxxxxxxx/

Changelog:
v2:
- Consolidated some debugfs and labelling struct members into nested structs
- Added helpers for handling the debugfs gems linked list
- Fixed ioctl naming scheme in the uapi header file
- Added label length limit and param consistency checks in BO labelling ioctl

Adrián Larumbe (4):
drm/panthor: Introduce BO labeling
drm/panthor: Add driver IOCTL for setting BO labels
drm/panthor: show device-wide list of DRM GEM objects over DebugFS
drm/panthor: Display heap chunk entries in DebugFS GEMS file

drivers/gpu/drm/panthor/panthor_device.c | 5 +
drivers/gpu/drm/panthor/panthor_device.h | 11 ++
drivers/gpu/drm/panthor/panthor_drv.c | 63 ++++++++++
drivers/gpu/drm/panthor/panthor_gem.c | 154 +++++++++++++++++++++++
drivers/gpu/drm/panthor/panthor_gem.h | 48 +++++++
drivers/gpu/drm/panthor/panthor_heap.c | 3 +
include/uapi/drm/panthor_drm.h | 19 +++
7 files changed, 303 insertions(+)

--
2.48.1