drm/amd/pm: Fix incorrect comment about Vangogh power cap support
Subsystems (3)
PATCH 1/1 drm/amd/pm: Fix incorrect comment about Vangogh power cap support
The comment mentions that power1 cap attributes are not supported on Vangogh, but the opposite is indeed valid: for APUs, only Vangogh is supported. While at it, also fixed the Renoir comment below (thanks Melissa for noticing that!).
---
Hi folks, this is a very trivial one, just to fix the comments - since I needed to re-read the code/comments to figure out, I'm trying to improve it here to avoid others to get confused as well heh
Lemme know in case I made some mistake (even after re-re-reading the code). Cheers,
Guilherme
drivers/gpu/drm/amd/pm/amdgpu_pm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/pm/amdgpu_pm.c +2 -2
@@ -3351,7 +3351,7 @@ static umode_t hwmon_attributes_visible(struct kobject *kobj, attr == &sensor_dev_attr_pwm1_enable.dev_attr.attr)) /* can't manage state */ effective_mode &= ~S_IWUSR ; -/* not implemented yet for GC 10.3.1 APUs */ +/* In the case of APUs, this is only implemented on Vangogh */ if (((adev->family == AMDGPU_FAMILY_SI) || ((adev->flags & AMD_IS_APU) && (gc_ver != IP_VERSION(10, 3, 1)))) && (attr == &sensor_dev_attr_power1_cap_max.dev_attr.attr ||
@@ -3360,7 +3360,7 @@ static umode_t hwmon_attributes_visible(struct kobject *kobj, attr == &sensor_dev_attr_power1_cap_default.dev_attr.attr))return 0 ; -/* not implemented yet for APUs having <= GC 9.3.0 */ +/* not implemented yet for APUs having < GC 9.3.0 (Renoir) */ if (((adev->family ==AMDGPU_FAMILY_SI ) || ((adev->flags &AMD_IS_APU ) && (gc_ver <IP_VERSION (9 ,3 ,0 )))) && (attr == &sensor_dev_attr_power1_average.dev_attr.attr))
Signature · 1 line
2.40.0
Alex Deucher
AppliedApplied. Thanks!
Quoted 51 lines · Guilherme G. Piccoli
The comment mentions that power1 cap attributes are not supported on Vangogh, but the opposite is indeed valid: for APUs, only Vangogh is supported. While at it, also fixed the Renoir comment below (thanks Melissa for noticing that!).
Cc Lijo Lazar <[email protected]>Cc Melissa Wen <[email protected]>Signed-off-by Guilherme G. Piccoli <[email protected]>---
Hi folks, this is a very trivial one, just to fix the comments - since I needed to re-read the code/comments to figure out, I'm trying to improve it here to avoid others to get confused as well heh
Lemme know in case I made some mistake (even after re-re-reading the code). Cheers,
Guilherme
drivers/gpu/drm/amd/pm/amdgpu_pm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/pm/amdgpu_pm.c +2
-3@@ -3351,7 +3351,7 @@ static umode_t hwmon_attributes_visible(struct kobject *kobj, attr == &sensor_dev_attr_pwm1_enable.dev_attr.attr)) /* can't manage state */ effective_mode &= ~S_IWUSR ; -/* not implemented yet for GC 10.3.1 APUs */ +/* In the case of APUs, this is only implemented on Vangogh */ if (((adev->family == AMDGPU_FAMILY_SI) || ((adev->flags & AMD_IS_APU) && (gc_ver != IP_VERSION(10, 3, 1)))) && (attr == &sensor_dev_attr_power1_cap_max.dev_attr.attr ||@@ -3360,7 +3360,7 @@ static umode_t hwmon_attributes_visible(struct kobject *kobj, attr == &sensor_dev_attr_power1_cap_default.dev_attr.attr))return 0 ; -/* not implemented yet for APUs having <= GC 9.3.0 */ +/* not implemented yet for APUs having < GC 9.3.0 (Renoir) */ if (((adev->family ==AMDGPU_FAMILY_SI ) || ((adev->flags &AMD_IS_APU ) && (gc_ver <IP_VERSION (9 ,3 ,0 )))) && (attr == &sensor_dev_attr_power1_average.dev_attr.attr)) --2.40.0