drm/amdgpu: Add missing power attribute to APU check
authorAlex Deucher <alexander.deucher@amd.com>
Thu, 10 Jan 2019 03:19:28 +0000 (22:19 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 29 Jan 2019 15:57:02 +0000 (10:57 -0500)
Add missing power_average to visible check for power
attributes for APUs.  Was missed before.

Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c

index 6896dec97fc73c97b0a4a296aa6291c84f675d5b..0ed41a9d2d77161ccf5bad0498484e76cafbd03f 100644 (file)
@@ -1686,7 +1686,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;