aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2017-11-20 17:49:53 -0500
committerAlex Deucher <alexander.deucher@amd.com>2017-11-20 23:06:23 -0500
commit135f971181d779c96ff3725c1a350a721785cc66 (patch)
tree81a9073361c72ada9adabdc8ab82f7fc098c5511 /drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
parent8d8258bdab735d9f3c4b78e091ecfbb2b2b1f2ca (diff)
drm/amdgpu: don't skip attributes when powerplay is enabled
The function checks non-powerplay structures so regressed when the pp_enabled check was removed. This should ideally be implemented similarly for powerplay. Fixes: 6d07fe7bcae57 ("drm/amdgpu: delete pp_enable in adev") Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
index a59e04f3eeba..ce00f629dcce 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
@@ -946,6 +946,10 @@ static umode_t hwmon_attributes_visible(struct kobject *kobj,
946 struct amdgpu_device *adev = dev_get_drvdata(dev); 946 struct amdgpu_device *adev = dev_get_drvdata(dev);
947 umode_t effective_mode = attr->mode; 947 umode_t effective_mode = attr->mode;
948 948
949 /* no skipping for powerplay */
950 if (adev->powerplay.cgs_device)
951 return effective_mode;
952
949 /* Skip limit attributes if DPM is not enabled */ 953 /* Skip limit attributes if DPM is not enabled */
950 if (!adev->pm.dpm_enabled && 954 if (!adev->pm.dpm_enabled &&
951 (attr == &sensor_dev_attr_temp1_crit.dev_attr.attr || 955 (attr == &sensor_dev_attr_temp1_crit.dev_attr.attr ||