[PATCH] drm/amdgpu: cancel late_init_work before gpu reset
Pan, Xinhui
Xinhui.Pan at amd.com
Fri May 17 03:03:41 UTC 2019
gpu reset will run late_init and schedule the late_init_work. if we
keep triggering gpu reset in a short time, there are potenial races.
Signed-off-by: xinhui pan <xinhui.pan at amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index ecb99aeab6cf..241cd2c75433 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -3636,6 +3636,8 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,
dev_info(adev->dev, "GPU reset begin!\n");
+ cancel_delayed_work_sync(&adev->late_init_work);
+
hive = amdgpu_get_xgmi_hive(adev, false);
/*
--
2.17.1
More information about the amd-gfx
mailing list