Commit bcb7c4e8 authored by Rex Zhu's avatar Rex Zhu Committed by Alex Deucher

drm/amd/pp: Refine function iceland_start_smu

if upload firmware failed, no matter how many times
the function runs again, the same error will be encountered.
so remove the duplicated code.
Reviewed-by: default avatarEvan Quan <evan.quan@amd.com>
Signed-off-by: default avatarRex Zhu <Rex.Zhu@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 44779b43
...@@ -234,22 +234,12 @@ static int iceland_start_smu(struct pp_hwmgr *hwmgr) ...@@ -234,22 +234,12 @@ static int iceland_start_smu(struct pp_hwmgr *hwmgr)
{ {
int result; int result;
result = iceland_smu_upload_firmware_image(hwmgr);
if (result)
return result;
result = iceland_smu_start_smc(hwmgr);
if (result)
return result;
if (!smu7_is_smc_ram_running(hwmgr)) { if (!smu7_is_smc_ram_running(hwmgr)) {
pr_info("smu not running, upload firmware again \n");
result = iceland_smu_upload_firmware_image(hwmgr); result = iceland_smu_upload_firmware_image(hwmgr);
if (result) if (result)
return result; return result;
result = iceland_smu_start_smc(hwmgr); iceland_smu_start_smc(hwmgr);
if (result)
return result;
} }
result = smu7_request_smu_load_fw(hwmgr); result = smu7_request_smu_load_fw(hwmgr);
......
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