summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/radeon/radeon_dp_mst.c
diff options
context:
space:
mode:
authorNirmoy Das <nirmoy.das@amd.com>2021-02-18 02:34:30 +0300
committerAlex Deucher <alexander.deucher@amd.com>2021-02-19 00:43:10 +0300
commit5b54d6797994fe93432970145c93b9747a3c8d6c (patch)
tree95e7942a8069c62813f9c3d4d9cbdb8e022ec57e /drivers/gpu/drm/radeon/radeon_dp_mst.c
parente7fa81bbc33e6e5bc9f94ca16add07db85fe08f4 (diff)
downloadlinux-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_dp_mst.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_dp_mst.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_dp_mst.c b/drivers/gpu/drm/radeon/radeon_dp_mst.c
index 2c32186c4acd..66a0e736cc4d 100644
--- a/drivers/gpu/drm/radeon/radeon_dp_mst.c
+++ b/drivers/gpu/drm/radeon/radeon_dp_mst.c
@@ -1,6 +1,5 @@
// SPDX-License-Identifier: MIT
-#include <drm/drm_debugfs.h>
#include <drm/drm_dp_mst_helper.h>
#include <drm/drm_fb_helper.h>
#include <drm/drm_file.h>
@@ -723,10 +722,10 @@ go_again:
#if defined(CONFIG_DEBUG_FS)
-static int radeon_debugfs_mst_info(struct seq_file *m, void *data)
+static int radeon_debugfs_mst_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 = (struct radeon_device *)m->private;
+ struct drm_device *dev = rdev->ddev;
struct drm_connector *connector;
struct radeon_connector *radeon_connector;
struct radeon_connector_atom_dig *dig_connector;
@@ -754,15 +753,16 @@ static int radeon_debugfs_mst_info(struct seq_file *m, void *data)
return 0;
}
-static struct drm_info_list radeon_debugfs_mst_list[] = {
- {"radeon_mst_info", &radeon_debugfs_mst_info, 0, NULL},
-};
+DEFINE_SHOW_ATTRIBUTE(radeon_debugfs_mst_info);
#endif
-int radeon_mst_debugfs_init(struct radeon_device *rdev)
+void radeon_mst_debugfs_init(struct radeon_device *rdev)
{
#if defined(CONFIG_DEBUG_FS)
- return radeon_debugfs_add_files(rdev, radeon_debugfs_mst_list, 1);
+ struct dentry *root = rdev->ddev->primary->debugfs_root;
+
+ debugfs_create_file("radeon_mst_info", 0444, root, rdev,
+ &radeon_debugfs_mst_info_fops);
+
#endif
- return 0;
}