From: Sonny Jiang Date: Wed, 10 Jun 2015 17:46:36 +0000 (-0400) Subject: drm/amdgpu: fix a amdgpu_dpm=0 bug X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6d8db6ce239587c3d300d79fce3f5bb376232475;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm/amdgpu: fix a amdgpu_dpm=0 bug Signed-off-by: Sonny Jiang Reviewed-by: Alex Deucher --- 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; }