Skip to content

Commit

Permalink
drm/amd/amdgpu: fix the kfd pre_reset sequence in sriov
Browse files Browse the repository at this point in the history
The KFD pre_reset should be called before reset been executed, it will
hold the lock to prevent other rocm process to sent the packlage to hiq
during host execute the real reset on the HW

Signed-off-by: shaoyunl <shaoyun.liu@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
shaoyunl authored and Alex Deucher committed Nov 9, 2021
1 parent 4fc30ea commit 9f4f2c1
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -4293,8 +4293,6 @@ static int amdgpu_device_reset_sriov(struct amdgpu_device *adev,
if (r)
return r;

amdgpu_amdkfd_pre_reset(adev);

/* Resume IP prior to SMC */
r = amdgpu_device_ip_reinit_early_sriov(adev);
if (r)
Expand Down Expand Up @@ -5030,8 +5028,7 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,

cancel_delayed_work_sync(&tmp_adev->delayed_init_work);

if (!amdgpu_sriov_vf(tmp_adev))
amdgpu_amdkfd_pre_reset(tmp_adev);
amdgpu_amdkfd_pre_reset(tmp_adev);

/*
* Mark these ASICs to be reseted as untracked first
Expand Down

0 comments on commit 9f4f2c1

Please sign in to comment.