Commit b80b13f0 authored by Tom St Denis's avatar Tom St Denis Committed by Alex Deucher

drm/amd/powerplay: Fix CZ SMU firmware load check (v4)

Remove an errant return in the middle of the check
function as well as check for success in the start
function.

(v2) Add return check to smu_load_fw()
(v3) Don't return early if SMU load check fails
(v4) No returns!  :-)
Signed-off-by: default avatarTom St Denis <tom.stdenis@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 95844d20
...@@ -195,9 +195,6 @@ static int cz_check_fw_load_finish(struct pp_smumgr *smumgr, ...@@ -195,9 +195,6 @@ static int cz_check_fw_load_finish(struct pp_smumgr *smumgr,
if (smumgr == NULL || smumgr->device == NULL) if (smumgr == NULL || smumgr->device == NULL)
return -EINVAL; return -EINVAL;
return cgs_read_register(smumgr->device,
mmSMU_MP1_SRBM2P_ARG_0);
cgs_write_register(smumgr->device, mmMP0PUB_IND_INDEX, index); cgs_write_register(smumgr->device, mmMP0PUB_IND_INDEX, index);
for (i = 0; i < smumgr->usec_timeout; i++) { for (i = 0; i < smumgr->usec_timeout; i++) {
...@@ -275,7 +272,10 @@ static int cz_start_smu(struct pp_smumgr *smumgr) ...@@ -275,7 +272,10 @@ static int cz_start_smu(struct pp_smumgr *smumgr)
if (smumgr->chip_id == CHIP_STONEY) if (smumgr->chip_id == CHIP_STONEY)
fw_to_check &= ~(UCODE_ID_SDMA1_MASK | UCODE_ID_CP_MEC_JT2_MASK); fw_to_check &= ~(UCODE_ID_SDMA1_MASK | UCODE_ID_CP_MEC_JT2_MASK);
cz_request_smu_load_fw(smumgr); ret = cz_request_smu_load_fw(smumgr);
if (ret)
printk(KERN_ERR "[ powerplay] SMU firmware load failed\n");
cz_check_fw_load_finish(smumgr, fw_to_check); cz_check_fw_load_finish(smumgr, fw_to_check);
ret = cz_load_mec_firmware(smumgr); ret = cz_load_mec_firmware(smumgr);
......
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