diff options
author | Rex Zhu <Rex.Zhu@amd.com> | 2018-09-29 13:28:20 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-10-09 17:05:40 -0500 |
commit | bcb7c4e8b434d35697024cd47083c3aa0ef19b8b (patch) | |
tree | 244084402ccdc80ab6e843d7df10ea283301b458 /drivers/gpu/drm/amd/powerplay | |
parent | 44779b43f15977885a0e3b45bf6deb6be18725e5 (diff) | |
download | lwn-bcb7c4e8b434d35697024cd47083c3aa0ef19b8b.tar.gz lwn-bcb7c4e8b434d35697024cd47083c3aa0ef19b8b.zip |
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: Evan Quan <evan.quan@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')
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c index 73aa368a454e..c712d93710a3 100644 --- a/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c +++ b/drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c @@ -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); |