summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c
diff options
context:
space:
mode:
authorMonk Liu <Monk.Liu@amd.com>2017-01-25 10:55:30 +0300
committerAlex Deucher <alexander.deucher@amd.com>2017-03-30 06:52:37 +0300
commit8fdf26925897974b71283014eb09c57e7e0d2ed8 (patch)
tree091a719807c0c833f7f3ac63b2941fa1f9e2c45f /drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c
parent1d7b17b09fc87b0c30ca002a62cabcecc36d0704 (diff)
downloadlinux-8fdf26925897974b71283014eb09c57e7e0d2ed8.tar.xz
drm/amdgpu:fix powerplay logic
1,like pp_hw_init, we shouldn't report error if PP disabled 2,disable pp_en if sriov Signed-off-by: Monk Liu <Monk.Liu@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c
index 8856eccc37fa..d56d200a3646 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c
@@ -43,7 +43,7 @@ static int amdgpu_create_pp_handle(struct amdgpu_device *adev)
amd_pp = &(adev->powerplay);
pp_init.chip_family = adev->family;
pp_init.chip_id = adev->asic_type;
- pp_init.pm_en = amdgpu_dpm != 0 ? true : false;
+ pp_init.pm_en = (amdgpu_dpm != 0 && !amdgpu_sriov_vf(adev)) ? true : false;
pp_init.feature_mask = amdgpu_pp_feature_mask;
pp_init.device = amdgpu_cgs_create_device(adev);
ret = amd_powerplay_create(&pp_init, &(amd_pp->pp_handle));