drm/amdgpu: remove ras block's feature status info in sysfs
Subsystems (2)
PATCH 1/1 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
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +1 -18
@@ -791,25 +791,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)
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): [email protected]
Zhang, Hawking
Reviewed-by Hawking ZhangRegards,
Hawking
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Tao Zhou
Sent: 2019年8月9日 17:51
To: [email protected]; Koenig, Christian <[email protected]>; Zhang, Hawking <[email protected]>; Freehill, Chris <[email protected]>; Russell, Kent <[email protected]>
Cc: Zhou1, Tao <[email protected]>
Subject: [PATCH] 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
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +2 -19
@@ -791,25 +791,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) --
2.17.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): MWHPR12MB1424FCE0F9D5E8C7835EEE8AFCD60-Gy0DoCVfaSWlS75/[email protected]
Koenig, Christian
Reviewed-by Christian KönigAm 09.08.19 um 12:28 schrieb Zhang, Hawking:
Quoted 55 lines
Reviewed-by Hawking Zhang <[email protected]>Regards,
Hawking-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Tao Zhou
Sent: 2019年8月9日 17:51
To: [email protected]; Koenig, Christian <[email protected]>; Zhang, Hawking <[email protected]>; Freehill, Chris <[email protected]>; Russell, Kent <[email protected]>
Cc: Zhou1, Tao <[email protected]>
Subject: [PATCH] drm/amdgpu: remove ras block's feature status info in sysfsfeature mask info is enough for rocm tool, "cat
/sys/class/drm/card0/device/ras/features" will get the info like this:feature mask:
0x3ffbSigned-off-by Tao Zhou <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +2
-19@@ -791,25 +791,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) --2.17.1
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx