]> 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 19:20:24 +0000 (14:20 -0500)
commit8fef05384b1f55300c38b1a3bf8ee246c35654b5
tree1386b74502a2eb34e717dd95f71ea4d90bb475dd
parentb050f8cc3cf6ce5284fe6c85d61985a30e7ed0ef
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