drm/amdgpu: block ring buffer access during GPU recovery
authorDennis Li <Dennis.Li@amd.com>
Tue, 1 Sep 2020 01:03:53 +0000 (09:03 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 3 Sep 2020 18:46:55 +0000 (14:46 -0400)
commit81202807ae6096bfbbfa28c2bc83cae1841bba38
treec165a6dea757faa271208675fae516c67b74b402
parentf6eb433954bf32ab582208d9b58ec397f7814e5a
drm/amdgpu: block ring buffer access during GPU recovery

When GPU is in reset, its status isn't stable and ring buffer also need
be reset when resuming. Therefore driver should protect GPU recovery
thread from ring buffer accessed by other threads. Otherwise GPU will
randomly hang during recovery.

v2: correct indent

Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Dennis Li <Dennis.Li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c