summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirmoy Das <nirmoy.das@amd.com>2021-02-10 18:19:20 +0300
committerAlex Deucher <alexander.deucher@amd.com>2021-02-19 00:43:09 +0300
commitba3d9406a093c00f8bb274fe38dd10475a17181f (patch)
treece57b0aab171cf9b193ed8e94b1a177faedd5e3e
parent88293c03c87e4db28890dd4e4ccb3640eadb4a08 (diff)
downloadlinux-ba3d9406a093c00f8bb274fe38dd10475a17181f.tar.xz
drm/radeon: cleanup debugfs
Remove unnecessary debugfs dentries and also radeon_ttm_debugfs_fini() as drm_debugfs_cleanup() will recursively remove debugfs files. Signed-off-by: Nirmoy Das <nirmoy.das@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/radeon/radeon.h5
-rw-r--r--drivers/gpu/drm/radeon/radeon_ttm.c24
2 files changed, 5 insertions, 24 deletions
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h
index f09989bdce98..fddd61dd61ed 100644
--- a/drivers/gpu/drm/radeon/radeon.h
+++ b/drivers/gpu/drm/radeon/radeon.h
@@ -453,11 +453,6 @@ struct radeon_surface_reg {
struct radeon_mman {
struct ttm_bo_device bdev;
bool initialized;
-
-#if defined(CONFIG_DEBUG_FS)
- struct dentry *vram;
- struct dentry *gtt;
-#endif
};
struct radeon_bo_list {
diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
index e8c66d10478f..aab3e5f9273c 100644
--- a/drivers/gpu/drm/radeon/radeon_ttm.c
+++ b/drivers/gpu/drm/radeon/radeon_ttm.c
@@ -53,7 +53,6 @@
#include "radeon_ttm.h"
static int radeon_ttm_debugfs_init(struct radeon_device *rdev);
-static void radeon_ttm_debugfs_fini(struct radeon_device *rdev);
static int radeon_ttm_tt_bind(struct ttm_bo_device *bdev,
struct ttm_tt *ttm,
@@ -777,7 +776,7 @@ void radeon_ttm_fini(struct radeon_device *rdev)
if (!rdev->mman.initialized)
return;
- radeon_ttm_debugfs_fini(rdev);
+
if (rdev->stolen_vga_memory) {
r = radeon_bo_reserve(rdev->stolen_vga_memory, false);
if (r == 0) {
@@ -1010,12 +1009,11 @@ static int radeon_ttm_debugfs_init(struct radeon_device *rdev)
struct drm_minor *minor = rdev->ddev->primary;
struct dentry *root = minor->debugfs_root;
- rdev->mman.vram = debugfs_create_file("radeon_vram", S_IFREG | S_IRUGO,
- root, rdev,
- &radeon_ttm_vram_fops);
+ debugfs_create_file("radeon_vram", S_IFREG | S_IRUGO, root, rdev,
+ &radeon_ttm_vram_fops);
- rdev->mman.gtt = debugfs_create_file("radeon_gtt", S_IFREG | S_IRUGO,
- root, rdev, &radeon_ttm_gtt_fops);
+ debugfs_create_file("radeon_gtt", S_IFREG | S_IRUGO, root, rdev,
+ &radeon_ttm_gtt_fops);
count = ARRAY_SIZE(radeon_ttm_debugfs_list);
@@ -1025,15 +1023,3 @@ static int radeon_ttm_debugfs_init(struct radeon_device *rdev)
return 0;
#endif
}
-
-static void radeon_ttm_debugfs_fini(struct radeon_device *rdev)
-{
-#if defined(CONFIG_DEBUG_FS)
-
- debugfs_remove(rdev->mman.vram);
- rdev->mman.vram = NULL;
-
- debugfs_remove(rdev->mman.gtt);
- rdev->mman.gtt = NULL;
-#endif
-}