]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/amdgpu: Fix two reset triggered in a row
authorYunxiang Li <Yunxiang.Li@amd.com>
Mon, 22 Apr 2024 18:59:02 +0000 (14:59 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 2 May 2024 19:40:44 +0000 (15:40 -0400)
commitf4322b9f8ad5f9f62add288c785d2e10bb6a5efe
tree16568819259068d87856a8dc5cde125945735d2d
parentf5007c67fc77ec555cf824fb8c2038a834201b38
drm/amdgpu: Fix two reset triggered in a row

Some times a hang GPU causes multiple reset sources to schedule resets.
The second source will be able to trigger an unnecessary reset if they
schedule after we call amdgpu_device_stop_pending_resets.

Move amdgpu_device_stop_pending_resets to after the reset is done. Since
at this point the GPU is supposedly in a good state, any reset scheduled
after this point would be a legitimate reset.

Remove unnecessary and incorrect checks for amdgpu_in_reset that was
kinda serving this purpose.

Signed-off-by: Yunxiang Li <Yunxiang.Li@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c
drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c
drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c