drm/amdgpu: Avoid accidental thread reactivation.
authorAndrey Grodzovsky <andrey.grodzovsky@amd.com>
Wed, 6 Nov 2019 17:36:29 +0000 (12:36 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 31 Dec 2019 15:45:07 +0000 (16:45 +0100)
commitc1e8f4a937ecc3e338657577ea7677b39e04f375
tree72a768a6b02a64ffa13308d9bbb1c3fce4a5d40c
parenta58f4afe22354a080cc099f5edcde15b8805c410
drm/amdgpu: Avoid accidental thread reactivation.

[ Upstream commit a28fda312a9fabdf0e5f5652449d6197c9fb0a90 ]

Problem:
During GPU reset we call the GPU scheduler to suspend it's
thread, those two functions in amdgpu also suspend and resume
the sceduler for their needs but this can collide with GPU
reset in progress and accidently restart a suspended thread
before time.

Fix:
Serialize with GPU reset.

Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c