diff options
Diffstat (limited to 'drivers/gpu/drm/radeon/r600.c')
-rw-r--r-- | drivers/gpu/drm/radeon/r600.c | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c index b44e0c607b1b..a0459b168d53 100644 --- a/drivers/gpu/drm/radeon/r600.c +++ b/drivers/gpu/drm/radeon/r600.c @@ -32,7 +32,6 @@ #include <linux/slab.h> #include <linux/seq_file.h> -#include <drm/drm_debugfs.h> #include <drm/drm_device.h> #include <drm/drm_vblank.h> #include <drm/radeon_drm.h> @@ -106,7 +105,7 @@ static const u32 crtc_offsets[2] = AVIVO_D2CRTC_H_TOTAL - AVIVO_D1CRTC_H_TOTAL }; -int r600_debugfs_mc_info_init(struct radeon_device *rdev); +static void r600_debugfs_mc_info_init(struct radeon_device *rdev); /* r600,rv610,rv630,rv620,rv635,rv670 */ int r600_mc_wait_for_idle(struct radeon_device *rdev); @@ -3251,9 +3250,7 @@ int r600_init(struct radeon_device *rdev) { int r; - if (r600_debugfs_mc_info_init(rdev)) { - DRM_ERROR("Failed to register debugfs file for mc !\n"); - } + r600_debugfs_mc_info_init(rdev); /* Read BIOS */ if (!radeon_get_bios(rdev)) { if (ASIC_IS_AVIVO(rdev)) @@ -4346,28 +4343,26 @@ restart_ih: */ #if defined(CONFIG_DEBUG_FS) -static int r600_debugfs_mc_info(struct seq_file *m, void *data) +static int r600_debugfs_mc_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; DREG32_SYS(m, rdev, R_000E50_SRBM_STATUS); DREG32_SYS(m, rdev, VM_L2_STATUS); return 0; } -static struct drm_info_list r600_mc_info_list[] = { - {"r600_mc_info", r600_debugfs_mc_info, 0, NULL}, -}; +DEFINE_SHOW_ATTRIBUTE(r600_debugfs_mc_info); #endif -int r600_debugfs_mc_info_init(struct radeon_device *rdev) +static void r600_debugfs_mc_info_init(struct radeon_device *rdev) { #if defined(CONFIG_DEBUG_FS) - return radeon_debugfs_add_files(rdev, r600_mc_info_list, ARRAY_SIZE(r600_mc_info_list)); -#else - return 0; + struct dentry *root = rdev->ddev->primary->debugfs_root; + + debugfs_create_file("r600_mc_info", 0444, root, rdev, + &r600_debugfs_mc_info_fops); + #endif } |