drm/amdgpu: Add missing power attribute to APU check

Submitted by Alex Deucher on Jan. 10, 2019, 3:23 a.m.

Details

Message ID 20190110032347.18890-1-alexander.deucher@amd.com
State New
Series "drm/amdgpu: Add missing power attribute to APU check"
Headers show

Commit Message

Alex Deucher Jan. 10, 2019, 3:23 a.m.
Add missing power_average to visible check for power
attributesi for APUs.  Was missed before.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
index 51eb2cf42b81..979d96278413 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
@@ -1799,7 +1799,8 @@  static umode_t hwmon_attributes_visible(struct kobject *kobj,
 		effective_mode &= ~S_IWUSR;
 
 	if ((adev->flags & AMD_IS_APU) &&
-	    (attr == &sensor_dev_attr_power1_cap_max.dev_attr.attr ||
+	    (attr == &sensor_dev_attr_power1_average.dev_attr.attr ||
+	     attr == &sensor_dev_attr_power1_cap_max.dev_attr.attr ||
 	     attr == &sensor_dev_attr_power1_cap_min.dev_attr.attr||
 	     attr == &sensor_dev_attr_power1_cap.dev_attr.attr))
 		return 0;

Comments

Alex Deucher Jan. 15, 2019, 4:32 p.m.
Ping?

On Wed, Jan 9, 2019 at 10:23 PM Alex Deucher <alexdeucher@gmail.com> wrote:
>
> Add missing power_average to visible check for power
> attributesi for APUs.  Was missed before.
>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
> index 51eb2cf42b81..979d96278413 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
> @@ -1799,7 +1799,8 @@ static umode_t hwmon_attributes_visible(struct kobject *kobj,
>                 effective_mode &= ~S_IWUSR;
>
>         if ((adev->flags & AMD_IS_APU) &&
> -           (attr == &sensor_dev_attr_power1_cap_max.dev_attr.attr ||
> +           (attr == &sensor_dev_attr_power1_average.dev_attr.attr ||
> +            attr == &sensor_dev_attr_power1_cap_max.dev_attr.attr ||
>              attr == &sensor_dev_attr_power1_cap_min.dev_attr.attr||
>              attr == &sensor_dev_attr_power1_cap.dev_attr.attr))
>                 return 0;
> --
> 2.20.1
>