]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/amd/pp: Refine function iceland_start_smu
authorRex Zhu <Rex.Zhu@amd.com>
Sat, 29 Sep 2018 05:28:20 +0000 (13:28 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 9 Oct 2018 22:05:40 +0000 (17:05 -0500)
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: Evan Quan <evan.quan@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/iceland_smumgr.c

index 73aa368a454e9208fc4800ec4b491831481c2b16..c712d93710a336cac075734a44752bf491873f85 100644 (file)
@@ -234,22 +234,12 @@ static int iceland_start_smu(struct pp_hwmgr *hwmgr)
 {
        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)) {
-               pr_info("smu not running, upload firmware again \n");
                result = iceland_smu_upload_firmware_image(hwmgr);
                if (result)
                        return result;
 
-               result = iceland_smu_start_smc(hwmgr);
-               if (result)
-                       return result;
+               iceland_smu_start_smc(hwmgr);
        }
 
        result = smu7_request_smu_load_fw(hwmgr);