mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-25 00:52:45 -04:00
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:
@@ -29,7 +29,6 @@
|
||||
#include <linux/seq_file.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
#include <drm/drm_debugfs.h>
|
||||
#include <drm/drm_device.h>
|
||||
#include <drm/drm_file.h>
|
||||
|
||||
@@ -38,7 +37,7 @@
|
||||
#include "rs400d.h"
|
||||
|
||||
/* This files gather functions specifics to : rs400,rs480 */
|
||||
static int rs400_debugfs_pcie_gart_info_init(struct radeon_device *rdev);
|
||||
static void rs400_debugfs_pcie_gart_info_init(struct radeon_device *rdev);
|
||||
|
||||
void rs400_gart_adjust_size(struct radeon_device *rdev)
|
||||
{
|
||||
@@ -103,8 +102,7 @@ int rs400_gart_init(struct radeon_device *rdev)
|
||||
r = radeon_gart_init(rdev);
|
||||
if (r)
|
||||
return r;
|
||||
if (rs400_debugfs_pcie_gart_info_init(rdev))
|
||||
DRM_ERROR("Failed to register debugfs file for RS400 GART !\n");
|
||||
rs400_debugfs_pcie_gart_info_init(rdev);
|
||||
rdev->gart.table_size = rdev->gart.num_gpu_pages * 4;
|
||||
return radeon_gart_table_ram_alloc(rdev);
|
||||
}
|
||||
@@ -307,11 +305,9 @@ void rs400_mc_wreg(struct radeon_device *rdev, uint32_t reg, uint32_t v)
|
||||
}
|
||||
|
||||
#if defined(CONFIG_DEBUG_FS)
|
||||
static int rs400_debugfs_gart_info(struct seq_file *m, void *data)
|
||||
static int rs400_debugfs_gart_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;
|
||||
uint32_t tmp;
|
||||
|
||||
tmp = RREG32(RADEON_HOST_PATH_CNTL);
|
||||
@@ -376,17 +372,16 @@ static int rs400_debugfs_gart_info(struct seq_file *m, void *data)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct drm_info_list rs400_gart_info_list[] = {
|
||||
{"rs400_gart_info", rs400_debugfs_gart_info, 0, NULL},
|
||||
};
|
||||
DEFINE_SHOW_ATTRIBUTE(rs400_debugfs_gart_info);
|
||||
#endif
|
||||
|
||||
static int rs400_debugfs_pcie_gart_info_init(struct radeon_device *rdev)
|
||||
static void rs400_debugfs_pcie_gart_info_init(struct radeon_device *rdev)
|
||||
{
|
||||
#if defined(CONFIG_DEBUG_FS)
|
||||
return radeon_debugfs_add_files(rdev, rs400_gart_info_list, 1);
|
||||
#else
|
||||
return 0;
|
||||
struct dentry *root = rdev->ddev->primary->debugfs_root;
|
||||
|
||||
debugfs_create_file("rs400_gart_info", 0444, root, rdev,
|
||||
&rs400_debugfs_gart_info_fops);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user