summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLikun Gao <Likun.Gao@amd.com>2020-05-18 18:19:30 +0800
committerChengming Gui <Jack.Gui@amd.com>2020-05-26 14:59:11 +0800
commit5148438b41fd31245eda1f2a5fd374ae2f976448 (patch)
tree3f73516a7d1d4700124c3384d140e63cf473c1f3
parenta4028f714610a63fde7c752489e5cc5bc6d78a8f (diff)
drm/amdgpu: add condition to set MP1 state on gpu resetamd-20.20
Only ras supportted need to set MP1 state to prepare for unload before reloading SMU FW. Signed-off-by: Likun Gao <Likun.Gao@amd.com> Reviewed-by: Evan Quan <evan.quan@amd.com> Change-Id: I5205e331a66613d2b59cad59c340e812838388e4
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
index e0e031f256c6..c7f9297f2fd3 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
@@ -1388,12 +1388,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");