[PATCH] drm/amdgpu: cancel late_init_work before gpu reset

Xu, Feifei Feifei.Xu at amd.com
Fri May 17 05:58:44 UTC 2019


Reviewed-by: Feifei Xu <Feifei.Xu at amd.com>

-----Original Message-----
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of Pan, Xinhui
Sent: Friday, May 17, 2019 11:04 AM
To: amd-gfx at lists.freedesktop.org
Cc: Deucher, Alexander <Alexander.Deucher at amd.com>; Huang, JinHuiEric <JinHuiEric.Huang at amd.com>
Subject: [PATCH] drm/amdgpu: cancel late_init_work before gpu reset

[CAUTION: External Email]

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

_______________________________________________
amd-gfx mailing list
amd-gfx at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


More information about the amd-gfx mailing list