]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
drm/amd/powerplay: check whether enable dpm in powerplay.
authorRex Zhu <Rex.Zhu@amd.com>
Mon, 23 Nov 2015 06:50:10 +0000 (14:50 +0800)
committerTim Gardner <tim.gardner@canonical.com>
Wed, 6 Apr 2016 09:25:22 +0000 (10:25 +0100)
BugLink: http://bugs.launchpad.net/bugs/1546572
Change-Id: I0a2dbf8ef7d4a3e9788fe211fc5964dd2487c519
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
(cherry picked from commit 1ea6c1e8e40c5cccc3572d1221c0770fc0c437f3)
Signed-off-by: Alberto Milone <alberto.milone@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c

index 50af515a1ca3984469221f7bb90371fba04848cc..049e4a70ec9c122044d1a6fcdddfc7eaf8a8fe7a 100644 (file)
@@ -144,8 +144,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