Commit 0186eb96 authored by Huang Rui's avatar Huang Rui Committed by Alex Deucher
Browse files

drm/amd/powerplay: smu needs to be initialized after rlc in direct mode



For gfx 10, rlc firmware loading relies on smu firmware is loaded firstly, so in
direct type, it has to load smc ucode here before rlc. And meanwhile, the smu
initialization has to move after rlc, otherwise, smu message will get failure
during the handshake with rlc and smu.

Signed-off-by: default avatarHuang Rui <ray.huang@amd.com>
Reviewed-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent c16d001b
Loading
Loading
Loading
Loading
+5 −9
Original line number Diff line number Diff line
@@ -820,17 +820,13 @@ static int smu_hw_init(void *handle)
	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
	struct smu_context *smu = &adev->smu;

	if (adev->firmware.load_type != AMDGPU_FW_LOAD_PSP) {
		ret = smu_load_microcode(smu);
		if (ret)
			return ret;
	}

	if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) {
		ret = smu_check_fw_status(smu);
		if (ret) {
			pr_err("SMC firmware status is not correct\n");
			return ret;
		}
	}

	mutex_lock(&smu->mutex);