From: Rex Zhu Date: Tue, 29 Mar 2016 06:34:51 +0000 (+0800) Subject: drm/amdgpu: check dpm state before pm system fs initialized. X-Git-Tag: v4.14-rc1~3429^2~1^2~20 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5349ece70600bd574d9a825801c00f900acda3d4;p=platform%2Fkernel%2Flinux-rpi.git 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 Reviewed- by: Alex Deucher Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c index 9430a7d..e9c6ae6 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) adev->powerplay.pp_handle); #ifdef CONFIG_DRM_AMD_POWERPLAY - if (adev->pp_enabled) { + if (adev->pp_enabled && adev->pm.dpm_enabled) { amdgpu_pm_sysfs_init(adev); amdgpu_dpm_dispatch_task(adev, AMD_PP_EVENT_COMPLETE_INIT, NULL, NULL); }