summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorJonathan Kim <jonathan.kim@amd.com>2019-11-06 16:20:21 +0300
committerAlex Deucher <alexander.deucher@amd.com>2019-11-08 02:08:07 +0300
commitcb5932f866f50ea4a95459f0b6ebe93882d0aac6 (patch)
tree3782f9d0cc86e884b3dc7cdbdd1cc19cb3a9df04 /drivers/gpu
parent2af8153126e1cdd93891a9edef76fbbd497e90ab (diff)
downloadlinux-cb5932f866f50ea4a95459f0b6ebe93882d0aac6.tar.xz
drm/amdgpu: fix vega20 pstate status change
vega20 only requires all devices be set to same pstate level for low pstate and not high. Signed-off-by: Jonathan Kim <Jonathan.Kim@amd.com> Reviewed-by: Evan Quan <Evan.Quan@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
index de20a9a1c444..61d13d8b7b20 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
@@ -276,6 +276,7 @@ int amdgpu_xgmi_set_pstate(struct amdgpu_device *adev, int pstate)
struct amdgpu_hive_info *hive = amdgpu_get_xgmi_hive(adev, 0);
struct amdgpu_device *tmp_adev;
bool update_hive_pstate = true;
+ bool is_high_pstate = pstate && adev->asic_type == CHIP_VEGA20;
if (!hive)
return 0;
@@ -283,8 +284,8 @@ int amdgpu_xgmi_set_pstate(struct amdgpu_device *adev, int pstate)
mutex_lock(&hive->hive_lock);
if (hive->pstate == pstate) {
- mutex_unlock(&hive->hive_lock);
- return 0;
+ adev->pstate = is_high_pstate ? pstate : adev->pstate;
+ goto out;
}
dev_dbg(adev->dev, "Set xgmi pstate %d.\n", pstate);
@@ -317,7 +318,7 @@ int amdgpu_xgmi_set_pstate(struct amdgpu_device *adev, int pstate)
break;
}
}
- if (update_hive_pstate)
+ if (update_hive_pstate || is_high_pstate)
hive->pstate = pstate;
out: