summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTao Zhou <tao.zhou1@amd.com>2019-08-09 12:39:06 +0300
committerAlex Deucher <alexander.deucher@amd.com>2019-08-12 20:47:48 +0300
commit5212a3bdf03f24a5ed3eabf8fc4833aa3c5287a3 (patch)
tree48378911f8c020e89144344e34900533995b401c
parent9b4e63f4513bbd626b2490ce81435a38d7bc3902 (diff)
downloadlinux-5212a3bdf03f24a5ed3eabf8fc4833aa3c5287a3.tar.xz
drm/amdgpu: remove ras block's feature status info in sysfs
feature mask info is enough for rocm tool, "cat /sys/class/drm/card0/device/ras/features" will get the info like this: feature mask: 0x3ffb Signed-off-by: Tao Zhou <tao.zhou1@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
index fdcb132e832c..76d0021f5dd1 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
@@ -793,25 +793,8 @@ static ssize_t amdgpu_ras_sysfs_features_read(struct device *dev,
{
struct amdgpu_ras *con =
container_of(attr, struct amdgpu_ras, features_attr);
- struct drm_device *ddev = dev_get_drvdata(dev);
- struct amdgpu_device *adev = ddev->dev_private;
- struct ras_common_if head;
- int ras_block_count = AMDGPU_RAS_BLOCK_COUNT;
- int i, enabled;
- ssize_t s;
-
- s = scnprintf(buf, PAGE_SIZE, "feature mask: 0x%x\n", con->features);
-
- for (i = 0; i < ras_block_count; i++) {
- head.block = i;
- enabled = amdgpu_ras_is_feature_enabled(adev, &head);
-
- s += scnprintf(&buf[s], PAGE_SIZE - s,
- "%s ras feature mask: %s\n",
- ras_block_str(i), enabled?"on":"off");
- }
- return s;
+ return scnprintf(buf, PAGE_SIZE, "feature mask: 0x%x\n", con->features);
}
static int amdgpu_ras_sysfs_create_feature_node(struct amdgpu_device *adev)