Commit d7c71954 authored by Alex Deucher's avatar Alex Deucher

drm/amdgpu/powerplay: fix baco check for vega20

We need to handle the runpm case as well as GPU reset.
Reviewed-by: default avatarEvan Quan <evan.quan@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 5d8b936d
...@@ -487,15 +487,16 @@ static int vega20_setup_asic_task(struct pp_hwmgr *hwmgr) ...@@ -487,15 +487,16 @@ static int vega20_setup_asic_task(struct pp_hwmgr *hwmgr)
{ {
struct amdgpu_device *adev = (struct amdgpu_device *)(hwmgr->adev); struct amdgpu_device *adev = (struct amdgpu_device *)(hwmgr->adev);
int ret = 0; int ret = 0;
bool use_baco = (adev->in_gpu_reset &&
(amdgpu_asic_reset_method(adev) == AMD_RESET_METHOD_BACO)) ||
(adev->in_runpm && amdgpu_asic_supports_baco(adev));
ret = vega20_init_sclk_threshold(hwmgr); ret = vega20_init_sclk_threshold(hwmgr);
PP_ASSERT_WITH_CODE(!ret, PP_ASSERT_WITH_CODE(!ret,
"Failed to init sclk threshold!", "Failed to init sclk threshold!",
return ret); return ret);
if (adev->in_gpu_reset && if (use_baco) {
(amdgpu_asic_reset_method(adev) == AMD_RESET_METHOD_BACO)) {
ret = vega20_baco_apply_vdci_flush_workaround(hwmgr); ret = vega20_baco_apply_vdci_flush_workaround(hwmgr);
if (ret) if (ret)
pr_err("Failed to apply vega20 baco workaround!\n"); pr_err("Failed to apply vega20 baco workaround!\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment