Commit 22e18317 authored by Evan Quan's avatar Evan Quan Committed by Alex Deucher

drm/amd/powerplay: enable SW SMU routine support for arcturus

Enable arcturus SW SMU routines.
Signed-off-by: default avatarEvan Quan <evan.quan@amd.com>
Reviewed-by: default avatarKenneth Feng <kenneth.feng@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent a94235af
...@@ -476,7 +476,7 @@ bool is_support_sw_smu(struct amdgpu_device *adev) ...@@ -476,7 +476,7 @@ bool is_support_sw_smu(struct amdgpu_device *adev)
{ {
if (adev->asic_type == CHIP_VEGA20) if (adev->asic_type == CHIP_VEGA20)
return (amdgpu_dpm == 2) ? true : false; return (amdgpu_dpm == 2) ? true : false;
else if (adev->asic_type >= CHIP_NAVI10) else if (adev->asic_type >= CHIP_ARCTURUS)
return true; return true;
else else
return false; return false;
...@@ -708,6 +708,7 @@ static int smu_set_funcs(struct amdgpu_device *adev) ...@@ -708,6 +708,7 @@ static int smu_set_funcs(struct amdgpu_device *adev)
case CHIP_VEGA20: case CHIP_VEGA20:
case CHIP_NAVI10: case CHIP_NAVI10:
case CHIP_NAVI14: case CHIP_NAVI14:
case CHIP_ARCTURUS:
if (adev->pm.pp_feature & PP_OVERDRIVE_MASK) if (adev->pm.pp_feature & PP_OVERDRIVE_MASK)
smu->od_enabled = true; smu->od_enabled = true;
smu_v11_0_set_smu_funcs(smu); smu_v11_0_set_smu_funcs(smu);
...@@ -1013,9 +1014,11 @@ static int smu_smc_table_hw_init(struct smu_context *smu, ...@@ -1013,9 +1014,11 @@ static int smu_smc_table_hw_init(struct smu_context *smu,
return 0; return 0;
} }
if (adev->asic_type != CHIP_ARCTURUS) {
ret = smu_init_display_count(smu, 0); ret = smu_init_display_count(smu, 0);
if (ret) if (ret)
return ret; return ret;
}
if (initialize) { if (initialize) {
/* get boot_values from vbios to set revision, gfxclk, and etc. */ /* get boot_values from vbios to set revision, gfxclk, and etc. */
...@@ -1091,6 +1094,7 @@ static int smu_smc_table_hw_init(struct smu_context *smu, ...@@ -1091,6 +1094,7 @@ static int smu_smc_table_hw_init(struct smu_context *smu,
if (ret) if (ret)
return ret; return ret;
if (adev->asic_type != CHIP_ARCTURUS) {
ret = smu_notify_display_change(smu); ret = smu_notify_display_change(smu);
if (ret) if (ret)
return ret; return ret;
...@@ -1102,6 +1106,7 @@ static int smu_smc_table_hw_init(struct smu_context *smu, ...@@ -1102,6 +1106,7 @@ static int smu_smc_table_hw_init(struct smu_context *smu,
ret = smu_set_min_dcef_deep_sleep(smu); ret = smu_set_min_dcef_deep_sleep(smu);
if (ret) if (ret)
return ret; return ret;
}
/* /*
* Set initialized values (get from vbios) to dpm tables context such as * Set initialized values (get from vbios) to dpm tables context such as
...@@ -1212,13 +1217,19 @@ static int smu_hw_init(void *handle) ...@@ -1212,13 +1217,19 @@ static int smu_hw_init(void *handle)
struct amdgpu_device *adev = (struct amdgpu_device *)handle; struct amdgpu_device *adev = (struct amdgpu_device *)handle;
struct smu_context *smu = &adev->smu; struct smu_context *smu = &adev->smu;
if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) { if (adev->firmware.load_type != AMDGPU_FW_LOAD_PSP) {
if (adev->asic_type < CHIP_NAVI10) {
ret = smu_load_microcode(smu);
if (ret)
return ret;
}
}
ret = smu_check_fw_status(smu); ret = smu_check_fw_status(smu);
if (ret) { if (ret) {
pr_err("SMC firmware status is not correct\n"); pr_err("SMC firmware status is not correct\n");
return ret; return ret;
} }
}
if (!smu->pm_enabled) if (!smu->pm_enabled)
return 0; return 0;
......
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