diff options
author | Christian König <christian.koenig@amd.com> | 2020-11-17 15:48:08 +0100 |
---|---|---|
committer | Christian König <christian.koenig@amd.com> | 2021-01-20 12:56:45 +0100 |
commit | 3763d635deaa755c7849074d144c74086565591e (patch) | |
tree | f64b55a10b44912267538a1ffdb7d85293edb3ce /drivers/gpu/drm/ttm/ttm_module.c | |
parent | e1827807e8d9d5b67c21aa565697211df3f23d25 (diff) |
drm/ttm: add debugfs directory v2
As far as I can tell the buffer_count was never used by an
userspace application.
The number of BOs in the system is far better suited in
debugfs than sysfs and we now should be able to add other
information here as well.
v2: add that additionally to sysfs
Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/414954/
Diffstat (limited to 'drivers/gpu/drm/ttm/ttm_module.c')
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_module.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_module.c b/drivers/gpu/drm/ttm/ttm_module.c index c0906437cb1c..f6566603a60f 100644 --- a/drivers/gpu/drm/ttm/ttm_module.c +++ b/drivers/gpu/drm/ttm/ttm_module.c @@ -32,12 +32,14 @@ #include <linux/module.h> #include <linux/device.h> #include <linux/sched.h> +#include <linux/debugfs.h> #include <drm/drm_sysfs.h> #include "ttm_module.h" static DECLARE_WAIT_QUEUE_HEAD(exit_q); static atomic_t device_released; +struct dentry *ttm_debugfs_root; static struct device_type ttm_drm_class_type = { .name = "ttm", @@ -77,6 +79,7 @@ static int __init ttm_init(void) if (unlikely(ret != 0)) goto out_no_dev_reg; + ttm_debugfs_root = debugfs_create_dir("ttm", NULL); return 0; out_no_dev_reg: atomic_set(&device_released, 1); @@ -94,6 +97,7 @@ static void __exit ttm_exit(void) */ wait_event(exit_q, atomic_read(&device_released) == 1); + debugfs_remove(ttm_debugfs_root); } module_init(ttm_init); |