drm/amdgpu: Serialize non TDR gpu recovery with TDRs
authorAndrey Grodzovsky <andrey.grodzovsky@amd.com>
Fri, 17 Dec 2021 18:05:15 +0000 (13:05 -0500)
committerAndrey Grodzovsky <andrey.grodzovsky@amd.com>
Wed, 9 Feb 2022 17:15:23 +0000 (12:15 -0500)
commit54f329cc7a7a7ea265c45b206d45e3d09192aba7
tree941038356cea01d8665b3e5bc428a93cae31dff0
parent5fd8518d187ed03403a4d4f7f56f52c00b11c148
drm/amdgpu: Serialize non TDR gpu recovery with TDRs

Use reset domain wq also for non TDR gpu recovery trigers
such as sysfs and RAS. We must serialize all possible
GPU recoveries to gurantee no concurrency there.
For TDR call the original recovery function directly since
it's already executed from within the wq. For others just
use a wrapper to qeueue work and wait on it to finish.

v2: Rename to amdgpu_recover_work_struct

Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://www.spinics.net/lists/amd-gfx/msg74113.html
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c