diff options
author | Nirmoy Das <nirmoy.das@amd.com> | 2021-02-18 02:34:30 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2021-02-19 00:43:10 +0300 |
commit | 5b54d6797994fe93432970145c93b9747a3c8d6c (patch) | |
tree | 95e7942a8069c62813f9c3d4d9cbdb8e022ec57e /drivers/gpu/drm/radeon/radeon_ib.c | |
parent | e7fa81bbc33e6e5bc9f94ca16add07db85fe08f4 (diff) | |
download | linux-5b54d6797994fe93432970145c93b9747a3c8d6c.tar.xz |
drm/radeon: do not use drm middle layer for debugfs (v2)
Use debugfs API directly instead of drm middle layer.
v2: squash in build fix (Alex)
Signed-off-by: Nirmoy Das <nirmoy.das@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_ib.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_ib.c | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_ib.c b/drivers/gpu/drm/radeon/radeon_ib.c index c1fca2ba443c..62b116727b4f 100644 --- a/drivers/gpu/drm/radeon/radeon_ib.c +++ b/drivers/gpu/drm/radeon/radeon_ib.c @@ -27,7 +27,6 @@ * Christian König */ -#include <drm/drm_debugfs.h> #include <drm/drm_file.h> #include "radeon.h" @@ -41,7 +40,7 @@ * produce command buffers which are send to the kernel and * put in IBs for execution by the requested ring. */ -static int radeon_debugfs_sa_init(struct radeon_device *rdev); +static void radeon_debugfs_sa_init(struct radeon_device *rdev); /** * radeon_ib_get - request an IB (Indirect Buffer) @@ -225,9 +224,7 @@ int radeon_ib_pool_init(struct radeon_device *rdev) } rdev->ib_pool_ready = true; - if (radeon_debugfs_sa_init(rdev)) { - dev_err(rdev->dev, "failed to register debugfs file for SA\n"); - } + radeon_debugfs_sa_init(rdev); return 0; } @@ -295,11 +292,9 @@ int radeon_ib_ring_tests(struct radeon_device *rdev) */ #if defined(CONFIG_DEBUG_FS) -static int radeon_debugfs_sa_info(struct seq_file *m, void *data) +static int radeon_debugfs_sa_info_show(struct seq_file *m, void *unused) { - struct drm_info_node *node = (struct drm_info_node *) m->private; - struct drm_device *dev = node->minor->dev; - struct radeon_device *rdev = dev->dev_private; + struct radeon_device *rdev = (struct radeon_device *)m->private; radeon_sa_bo_dump_debug_info(&rdev->ring_tmp_bo, m); @@ -307,17 +302,16 @@ static int radeon_debugfs_sa_info(struct seq_file *m, void *data) } -static struct drm_info_list radeon_debugfs_sa_list[] = { - {"radeon_sa_info", &radeon_debugfs_sa_info, 0, NULL}, -}; +DEFINE_SHOW_ATTRIBUTE(radeon_debugfs_sa_info); #endif -static int radeon_debugfs_sa_init(struct radeon_device *rdev) +static void radeon_debugfs_sa_init(struct radeon_device *rdev) { #if defined(CONFIG_DEBUG_FS) - return radeon_debugfs_add_files(rdev, radeon_debugfs_sa_list, 1); -#else - return 0; + struct dentry *root = rdev->ddev->primary->debugfs_root; + + debugfs_create_file("radeon_sa_info", 0444, root, rdev, + &radeon_debugfs_sa_info_fops); #endif } |