Browse Source

drm/amdgpu: fix a amdgpu_dpm=0 bug

Signed-off-by: Sonny Jiang <sonny.jiang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Sonny Jiang 10 years ago
parent
commit
6d8db6ce23
1 changed files with 5 additions and 3 deletions
  1. 5 3
      drivers/gpu/drm/amd/amdgpu/cz_dpm.c

+ 5 - 3
drivers/gpu/drm/amd/amdgpu/cz_dpm.c

@@ -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;
 }