]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: dont schedule jobs while in reset
authorShirish S <shirish.s@amd.com>
Wed, 30 Oct 2019 08:50:46 +0000 (14:20 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 6 Nov 2019 20:26:53 +0000 (15:26 -0500)
commite4654059c2144b215b05f2b551ff11b83d2d0467
treed5cbfe0aadd099c9c533f5e76ab90ddacec8ddc7
parent551347880f55a8a92843a0d95d62ae48ecc8a9b6
drm/amdgpu: dont schedule jobs while in reset

[Why]

doing kthread_park()/unpark() from drm_sched_entity_fini
while GPU reset is in progress defeats all the purpose of
drm_sched_stop->kthread_park.
If drm_sched_entity_fini->kthread_unpark() happens AFTER
drm_sched_stop->kthread_park nothing prevents from another
(third) thread to keep submitting job to HW which will be
picked up by the unparked scheduler thread and try to submit
to HW but fail because the HW ring is deactivated.

[How]
grab the reset lock before calling drm_sched_entity_fini()

Signed-off-by: Shirish S <shirish.s@amd.com>
Suggested-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c