diff options
author | Evan Quan <evan.quan@amd.com> | 2019-10-31 04:41:19 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-11-07 00:27:46 +0300 |
commit | 3e454860f2a469e82c0f0dd7ff058a70a84a6f8b (patch) | |
tree | 29306b31bc715cf5c9b74fb951240d6ee707dc60 /drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | |
parent | 086e1c56162611aba933d61d6037bd471ee48f48 (diff) | |
download | linux-3e454860f2a469e82c0f0dd7ff058a70a84a6f8b.tar.xz |
drm/amd/powerplay: support xgmi pstate setting on powerplay routine V2
Add xgmi pstate setting on powerplay routine.
V2: split the change of is_support_sw_smu_xgmi into a separate patch
Signed-off-by: Evan Quan <evan.quan@amd.com>
Reviewed-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_xgmi.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c index 00371713c671..167d9fbd2c4f 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c @@ -285,6 +285,11 @@ int amdgpu_xgmi_set_pstate(struct amdgpu_device *adev, int pstate) if (is_support_sw_smu_xgmi(adev)) ret = smu_set_xgmi_pstate(&adev->smu, pstate); + else if (adev->powerplay.pp_funcs && + adev->powerplay.pp_funcs->set_xgmi_pstate) + ret = adev->powerplay.pp_funcs->set_xgmi_pstate(adev->powerplay.pp_handle, + pstate); + if (ret) dev_err(adev->dev, "XGMI: Set pstate failure on device %llx, hive %llx, ret %d", |