]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
drm/amd/amdgpu: fix the kfd pre_reset sequence in sriov
authorshaoyunl <shaoyun.liu@amd.com>
Fri, 5 Nov 2021 16:34:14 +0000 (12:34 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 9 Nov 2021 22:08:00 +0000 (17:08 -0500)
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>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

index b45f4751adf8ba6e7224c5cb2a67c4bb7d92d68b..5625f7736e37874f226d8efd90bccc08b61d7131 100644 (file)
@@ -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)
@@ -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