diff options
author | Rex Zhu <Rex.Zhu@amd.com> | 2018-09-18 20:30:36 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-09-26 21:09:04 -0500 |
commit | 19a86c08510f5edf64745e4c090e89ea105a14cf (patch) | |
tree | ee97699b40559d376b186d3e6a98e233e19f6f48 /drivers/gpu/drm/amd/powerplay/smumgr | |
parent | 0fb5da0a9b7b3a256eacf1ace2212ad2342a0728 (diff) |
drm/amd/pp: Return error immediately if load firmware failed
this can avoid hard hang and be useful for debug.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay/smumgr')
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/smumgr/smu8_smumgr.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/smu8_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/smu8_smumgr.c index f7e3bc22bb93..a74c5be1ec18 100644 --- a/drivers/gpu/drm/amd/powerplay/smumgr/smu8_smumgr.c +++ b/drivers/gpu/drm/amd/powerplay/smumgr/smu8_smumgr.c @@ -724,11 +724,13 @@ static int smu8_start_smu(struct pp_hwmgr *hwmgr) if (hwmgr->chip_id == CHIP_STONEY) fw_to_check &= ~(UCODE_ID_SDMA1_MASK | UCODE_ID_CP_MEC_JT2_MASK); - ret = smu8_request_smu_load_fw(hwmgr); - if (ret) - pr_err("SMU firmware load failed\n"); + smu8_request_smu_load_fw(hwmgr); - smu8_check_fw_load_finish(hwmgr, fw_to_check); + ret = smu8_check_fw_load_finish(hwmgr, fw_to_check); + if (ret) { + pr_err("SMU firmware load failed\n"); + return ret; + } ret = smu8_load_mec_firmware(hwmgr); if (ret) |