]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/amdgpu: fix a amdgpu_dpm=0 bug
authorSonny Jiang <sonny.jiang@amd.com>
Wed, 10 Jun 2015 17:46:36 +0000 (13:46 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 10 Jun 2015 19:05:33 +0000 (15:05 -0400)
Signed-off-by: Sonny Jiang <sonny.jiang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/cz_dpm.c

index 10a387424ff8c0bfefbbb7eeb3c8b94bb460da3e..e4936a452bc6981e91dfc4bfa1c8dc4202992a13 100644 (file)
@@ -557,9 +557,11 @@ static int cz_dpm_late_init(void *handle)
 {
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
-       /* powerdown unused blocks for now */
-       cz_dpm_powergate_uvd(adev, true);
-       cz_dpm_powergate_vce(adev, true);
+       if (amdgpu_dpm) {
+               /* powerdown unused blocks for now */
+               cz_dpm_powergate_uvd(adev, true);
+               cz_dpm_powergate_vce(adev, true);
+       }
 
        return 0;
 }