From 6d8db6ce239587c3d300d79fce3f5bb376232475 Mon Sep 17 00:00:00 2001 From: Sonny Jiang Date: Wed, 10 Jun 2015 13:46:36 -0400 Subject: [PATCH] drm/amdgpu: fix a amdgpu_dpm=0 bug Signed-off-by: Sonny Jiang Reviewed-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/cz_dpm.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/cz_dpm.c b/drivers/gpu/drm/amd/amdgpu/cz_dpm.c index 10a387424ff8..e4936a452bc6 100644 --- a/drivers/gpu/drm/amd/amdgpu/cz_dpm.c +++ b/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; } -- 2.20.1