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>
This commit is contained in:
@@ -28,7 +28,6 @@
|
||||
|
||||
#include <linux/pci.h>
|
||||
|
||||
#include <drm/drm_debugfs.h>
|
||||
#include <drm/drm_device.h>
|
||||
#include <drm/drm_file.h>
|
||||
#include <drm/drm_gem_ttm_helper.h>
|
||||
@@ -801,11 +800,9 @@ int radeon_mode_dumb_create(struct drm_file *file_priv,
|
||||
}
|
||||
|
||||
#if defined(CONFIG_DEBUG_FS)
|
||||
static int radeon_debugfs_gem_info(struct seq_file *m, void *data)
|
||||
static int radeon_debugfs_gem_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;
|
||||
struct radeon_bo *rbo;
|
||||
unsigned i = 0;
|
||||
|
||||
@@ -836,15 +833,16 @@ static int radeon_debugfs_gem_info(struct seq_file *m, void *data)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct drm_info_list radeon_debugfs_gem_list[] = {
|
||||
{"radeon_gem_info", &radeon_debugfs_gem_info, 0, NULL},
|
||||
};
|
||||
DEFINE_SHOW_ATTRIBUTE(radeon_debugfs_gem_info);
|
||||
#endif
|
||||
|
||||
int radeon_gem_debugfs_init(struct radeon_device *rdev)
|
||||
void radeon_gem_debugfs_init(struct radeon_device *rdev)
|
||||
{
|
||||
#if defined(CONFIG_DEBUG_FS)
|
||||
return radeon_debugfs_add_files(rdev, radeon_debugfs_gem_list, 1);
|
||||
struct dentry *root = rdev->ddev->primary->debugfs_root;
|
||||
|
||||
debugfs_create_file("radeon_gem_info", 0444, root, rdev,
|
||||
&radeon_debugfs_gem_info_fops);
|
||||
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user