Commit 3b99e8e3 authored by Yang Wang's avatar Yang Wang Committed by Alex Deucher

drm/amd/pm: correct hwmon power label name

only vangogh has 2 types of hwmon power node: "fastPPT" and "slowPPT",
the other asic only has 1 type of hwmon power node: "PPT".
Signed-off-by: default avatarYang Wang <KevinYang.Wang@amd.com>
Reviewed-by: default avatarGuchun Chen <guchun.chen@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent db7b8154
......@@ -2842,10 +2842,14 @@ static ssize_t amdgpu_hwmon_show_power_label(struct device *dev,
struct device_attribute *attr,
char *buf)
{
int limit_type = to_sensor_dev_attr(attr)->index;
struct amdgpu_device *adev = dev_get_drvdata(dev);
return sysfs_emit(buf, "%s\n",
limit_type == PP_PWR_TYPE_FAST ? "fastPPT" : "slowPPT");
if (adev->asic_type == CHIP_VANGOGH)
return sysfs_emit(buf, "%s\n",
to_sensor_dev_attr(attr)->index == PP_PWR_TYPE_FAST ?
"fastPPT" : "slowPPT");
else
return sysfs_emit(buf, "PPT\n");
}
static ssize_t amdgpu_hwmon_set_power_cap(struct device *dev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment