Re: [PATCH v2] drm/amd/pm: fix hwmon node of power1_label create issue

2022-02-08 Thread Alex Deucher
Reviewed-by: Alex Deucher 

On Tue, Feb 8, 2022 at 2:09 AM Yang Wang  wrote:
>
> it will cause hwmon node of power1_label is not created.
>
> v2:
> the hwmon node of "power1_lable" is always needed for all ASICs.
> and the patch will remove ASIC type check for "power1_label".
>
> Fixes: ae07970a06 ("drm/amd/pm: add support for hwmon control of slow and 
> fast PPT limit on vangogh")
>
> Signed-off-by: Yang Wang 
> ---
>  drivers/gpu/drm/amd/pm/amdgpu_pm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c 
> b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
> index d68e7132da2c..d6c01c59f32e 100644
> --- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c
> +++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
> @@ -3288,7 +3288,7 @@ static umode_t hwmon_attributes_visible(struct kobject 
> *kobj,
>  attr == _dev_attr_power2_cap.dev_attr.attr ||
>  attr == _dev_attr_power2_cap_default.dev_attr.attr ||
>  attr == _dev_attr_power2_label.dev_attr.attr ||
> -attr == _dev_attr_power1_label.dev_attr.attr))
> +attr == _dev_attr_power2_label.dev_attr.attr))
> return 0;
>
> return effective_mode;
> --
> 2.25.1
>


[PATCH v2] drm/amd/pm: fix hwmon node of power1_label create issue

2022-02-07 Thread Yang Wang
it will cause hwmon node of power1_label is not created.

v2:
the hwmon node of "power1_lable" is always needed for all ASICs.
and the patch will remove ASIC type check for "power1_label".

Fixes: ae07970a06 ("drm/amd/pm: add support for hwmon control of slow and fast 
PPT limit on vangogh")

Signed-off-by: Yang Wang 
---
 drivers/gpu/drm/amd/pm/amdgpu_pm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c 
b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
index d68e7132da2c..d6c01c59f32e 100644
--- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
@@ -3288,7 +3288,7 @@ static umode_t hwmon_attributes_visible(struct kobject 
*kobj,
 attr == _dev_attr_power2_cap.dev_attr.attr ||
 attr == _dev_attr_power2_cap_default.dev_attr.attr ||
 attr == _dev_attr_power2_label.dev_attr.attr ||
-attr == _dev_attr_power1_label.dev_attr.attr))
+attr == _dev_attr_power2_label.dev_attr.attr))
return 0;
 
return effective_mode;
-- 
2.25.1