]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/amdgpu: stop data_exchange work thread before reset
authorTiecheng Zhou <Tiecheng.Zhou@amd.com>
Wed, 19 Aug 2020 02:27:09 +0000 (10:27 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 25 Sep 2020 21:03:22 +0000 (17:03 -0400)
In FLR routine, init_data_exchange is called at reset_sriov
while fini_data_exchange is not. This will duplicating work
thread.

So call fini_data_exchange before reset for SRIOV

Signed-off-by: Tiecheng Zhou <Tiecheng.Zhou@amd.com>
Signed-off-by: Bokun Zhang <Bokun.Zhang@amd.com>
Reviewed-by: Monk Liu <monk.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

index da9aa019de72089ff0c16f60e7dbb4de86001e2a..76581c59f196c237e1795f21b72aeec8c88e58d3 100644 (file)
@@ -4078,6 +4078,11 @@ static int amdgpu_device_pre_asic_reset(struct amdgpu_device *adev,
 
        amdgpu_debugfs_wait_dump(adev);
 
+       if (amdgpu_sriov_vf(adev)) {
+               /* stop the data exchange thread */
+               amdgpu_virt_fini_data_exchange(adev);
+       }
+
        /* block all schedulers and reset given job's ring */
        for (i = 0; i < AMDGPU_MAX_RINGS; ++i) {
                struct amdgpu_ring *ring = adev->rings[i];