aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAlex Deucher2017-11-20 17:49:53 -0500
committerAlex Deucher2017-11-20 23:06:23 -0500
commit135f971181d779c96ff3725c1a350a721785cc66 (patch)
tree81a9073361c72ada9adabdc8ab82f7fc098c5511 /drivers
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')
-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,
struct amdgpu_device *adev = dev_get_drvdata(dev);
umode_t effective_mode = attr->mode;
+ /* no skipping for powerplay */
+ if (adev->powerplay.cgs_device)
+ return effective_mode;
+
/* Skip limit attributes if DPM is not enabled */
if (!adev->pm.dpm_enabled &&
(attr == &sensor_dev_attr_temp1_crit.dev_attr.attr ||