]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/amd/pp: Return error immediately if load firmware failed
authorRex Zhu <Rex.Zhu@amd.com>
Tue, 18 Sep 2018 12:30:36 +0000 (20:30 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 27 Sep 2018 02:09:04 +0000 (21:09 -0500)
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>
drivers/gpu/drm/amd/powerplay/smumgr/smu8_smumgr.c

index f7e3bc22bb93f8a44d071d1c796f7e5a6b718b80..a74c5be1ec18855d8122f89f017b68b95f61bdc0 100644 (file)
@@ -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)