drm/amd/powerplay: move those operations not needed for resume out
Since smu_smc_table_hw_init() is needed for both .hw_init and .resume. By doing this, we can drop unnecessary operations on resume. 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>
This commit is contained in:
parent
02cf91c113
commit
4e8cb0c011
@ -1130,25 +1130,6 @@ static int smu_smc_table_hw_init(struct smu_context *smu,
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (initialize) {
|
||||
/* get boot_values from vbios to set revision, gfxclk, and etc. */
|
||||
ret = smu_get_vbios_bootup_values(smu);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = smu_setup_pptable(smu);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/*
|
||||
* Send msg GetDriverIfVersion to check if the return value is equal
|
||||
* with DRIVER_IF_VERSION of smc header.
|
||||
*/
|
||||
ret = smu_check_fw_version(smu);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = smu_set_driver_table_location(smu);
|
||||
if (ret)
|
||||
return ret;
|
||||
@ -1236,10 +1217,20 @@ static int smu_start_smc_engine(struct smu_context *smu)
|
||||
|
||||
if (smu->ppt_funcs->check_fw_status) {
|
||||
ret = smu->ppt_funcs->check_fw_status(smu);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
pr_err("SMC is not ready\n");
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Send msg GetDriverIfVersion to check if the return value is equal
|
||||
* with DRIVER_IF_VERSION of smc header.
|
||||
*/
|
||||
ret = smu_check_fw_version(smu);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -1268,6 +1259,15 @@ static int smu_hw_init(void *handle)
|
||||
if (!smu->pm_enabled)
|
||||
return 0;
|
||||
|
||||
/* get boot_values from vbios to set revision, gfxclk, and etc. */
|
||||
ret = smu_get_vbios_bootup_values(smu);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = smu_setup_pptable(smu);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = smu_feature_init_dpm(smu);
|
||||
if (ret)
|
||||
goto failed;
|
||||
|
Loading…
Reference in New Issue
Block a user