diff options
author | Rex Zhu <Rex.Zhu@amd.com> | 2016-03-29 02:34:51 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-04-01 10:08:30 -0400 |
commit | 5349ece70600bd574d9a825801c00f900acda3d4 (patch) | |
tree | 7339717cd2ee669715421e5d0438c1e69e1257ef /drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | |
parent | 4cd05a74cc604ef1cc6ac37a25629e185bcd2cc5 (diff) |
drm/amdgpu: check dpm state before pm system fs initialized.
Make sure powerplay initialized properly before enabling
debugfs pm files.
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Reviewed- by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c index 9430a7d0d0d7..e9c6ae6ed2f7 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | |||
@@ -143,7 +143,7 @@ static int amdgpu_pp_late_init(void *handle) | |||
143 | adev->powerplay.pp_handle); | 143 | adev->powerplay.pp_handle); |
144 | 144 | ||
145 | #ifdef CONFIG_DRM_AMD_POWERPLAY | 145 | #ifdef CONFIG_DRM_AMD_POWERPLAY |
146 | if (adev->pp_enabled) { | 146 | if (adev->pp_enabled && adev->pm.dpm_enabled) { |
147 | amdgpu_pm_sysfs_init(adev); | 147 | amdgpu_pm_sysfs_init(adev); |
148 | amdgpu_dpm_dispatch_task(adev, AMD_PP_EVENT_COMPLETE_INIT, NULL, NULL); | 148 | amdgpu_dpm_dispatch_task(adev, AMD_PP_EVENT_COMPLETE_INIT, NULL, NULL); |
149 | } | 149 | } |