From 1ea6c1e8e40c5cccc3572d1221c0770fc0c437f3 Mon Sep 17 00:00:00 2001 From: Rex Zhu Date: Mon, 23 Nov 2015 14:50:10 +0800 Subject: [PATCH] drm/amd/powerplay: check whether enable dpm in powerplay. Change-Id: I0a2dbf8ef7d4a3e9788fe211fc5964dd2487c519 Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c index 6cbbae7367f7..b8b4a4781f4d 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c @@ -145,8 +145,11 @@ static int amdgpu_pp_sw_init(void *handle) #ifdef CONFIG_DRM_AMD_POWERPLAY if (adev->pp_enabled) { - adev->pm.dpm_enabled = true; amdgpu_pm_sysfs_init(adev); + if (amdgpu_dpm == 0) + adev->pm.dpm_enabled = false; + else + adev->pm.dpm_enabled = true; } #endif -- 2.20.1