From: Alex Deucher Date: Mon, 20 Nov 2017 22:49:53 +0000 (-0500) Subject: drm/amdgpu: don't skip attributes when powerplay is enabled X-Git-Tag: v4.15-rc1~19^2~5^2~2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=135f971181d779c96ff3725c1a350a721785cc66;p=users%2Fdwmw2%2Flinux.git 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 Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c index a59e04f3eeba7..ce00f629dccec 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 ||