diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2019-09-04 08:47:37 +0300 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2019-09-10 09:53:08 +0300 |
commit | 9286766ba65be6ecc3779151191029fd9bbf5a3f (patch) | |
tree | 74dd514367cfbc30b816cea79903d5e6cfb53c11 /include/drm/drm_gem_vram_helper.h | |
parent | 527f6d91f8bbd2c03720c8efdccb8024999c25da (diff) | |
download | linux-9286766ba65be6ecc3779151191029fd9bbf5a3f.tar.xz |
drm/vram: add vram-mm debugfs file
Wire up drm_mm_print() for vram helpers, using a new
debugfs file, so one can see how vram is used:
# cat /sys/kernel/debug/dri/0/vram-mm
0x0000000000000000-0x0000000000000300: 768: used
0x0000000000000300-0x0000000000000600: 768: used
0x0000000000000600-0x0000000000000900: 768: used
0x0000000000000900-0x0000000000000c00: 768: used
0x0000000000000c00-0x0000000000004000: 13312: free
total: 16384, used 3072 free 13312
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: http://patchwork.freedesktop.org/patch/msgid/20190904054740.20817-5-kraxel@redhat.com
Diffstat (limited to 'include/drm/drm_gem_vram_helper.h')
-rw-r--r-- | include/drm/drm_gem_vram_helper.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/drm/drm_gem_vram_helper.h b/include/drm/drm_gem_vram_helper.h index b47c46516466..9d8b138b3881 100644 --- a/include/drm/drm_gem_vram_helper.h +++ b/include/drm/drm_gem_vram_helper.h @@ -140,6 +140,7 @@ int drm_gem_vram_driver_dumb_mmap_offset(struct drm_file *file, * &struct drm_driver with default functions. */ #define DRM_GEM_VRAM_DRIVER \ + .debugfs_init = drm_vram_mm_debugfs_init, \ .dumb_create = drm_gem_vram_driver_dumb_create, \ .dumb_map_offset = drm_gem_vram_driver_dumb_mmap_offset, \ .gem_prime_mmap = drm_gem_prime_mmap |