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;
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);
break;
}
}
- if (update_hive_pstate)
+ if (update_hive_pstate || is_high_pstate)
hive->pstate = pstate;
out: