Commit 0bcfa78c authored by Likun Gao's avatar Likun Gao Committed by Alex Deucher

drm/amdgpu: add condition to set MP1 state on gpu reset

Only ras supportted need to set MP1 state to prepare for unload before
reloading SMU FW.
Signed-off-by: default avatarLikun Gao <Likun.Gao@amd.com>
Reviewed-by: default avatarEvan Quan <evan.quan@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 997769fa
......@@ -1552,12 +1552,13 @@ static int psp_load_smu_fw(struct psp_context *psp)
struct amdgpu_device* adev = psp->adev;
struct amdgpu_firmware_info *ucode =
&adev->firmware.ucode[AMDGPU_UCODE_ID_SMC];
struct amdgpu_ras *ras = psp->ras.ras;
if (!ucode->fw || amdgpu_sriov_vf(psp->adev))
return 0;
if (adev->in_gpu_reset) {
if (adev->in_gpu_reset && ras && ras->supported) {
ret = amdgpu_dpm_set_mp1_state(adev, PP_MP1_STATE_UNLOAD);
if (ret) {
DRM_WARN("Failed to set MP1 state prepare for reload\n");
......
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