]> www.infradead.org Git - users/dwmw2/linux.git/commit
drm/panfrost: Add fdinfo support for memory stats
authorAdrián Larumbe <adrian.larumbe@collabora.com>
Fri, 29 Sep 2023 18:14:29 +0000 (19:14 +0100)
committerBoris Brezillon <boris.brezillon@collabora.com>
Wed, 4 Oct 2023 11:04:15 +0000 (13:04 +0200)
commit9ccdac7aa822f0468893e161c1a311674667da1b
treefa92c179cec06b908867aaedab8eaa7a92a45d8c
parentf11b0417eec21ade937da866363433cc0b8b396c
drm/panfrost: Add fdinfo support for memory stats

A new DRM GEM object function is added so that drm_show_memory_stats can
provide more accurate memory usage numbers.

Ideally, in panfrost_gem_status, the BO's purgeable flag would be checked
after locking the driver's shrinker mutex, but drm_show_memory_stats takes
over the drm file's object handle database spinlock, so there's potential
for a race condition here.

Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230929181616.2769345-4-adrian.larumbe@collabora.com
drivers/gpu/drm/panfrost/panfrost_drv.c
drivers/gpu/drm/panfrost/panfrost_gem.c