Skip to content

Commit c945012

Browse files
committed
Revert "drm/amdgpu: discard commands of killed processes"
This causes instability in piglit. It's fixed in drm-next with: 515c6fa 1650c14 214a91e 29d2535 7986746 This reverts commit 6af0883. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 2de0307 commit c945012

1 file changed

Lines changed: 4 additions & 19 deletions

File tree

drivers/gpu/drm/amd/scheduler/gpu_scheduler.c

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -205,32 +205,17 @@ void amd_sched_entity_fini(struct amd_gpu_scheduler *sched,
205205
struct amd_sched_entity *entity)
206206
{
207207
struct amd_sched_rq *rq = entity->rq;
208-
int r;
209208

210209
if (!amd_sched_entity_is_initialized(sched, entity))
211210
return;
211+
212212
/**
213213
* The client will not queue more IBs during this fini, consume existing
214-
* queued IBs or discard them on SIGKILL
214+
* queued IBs
215215
*/
216-
if ((current->flags & PF_SIGNALED) && current->exit_code == SIGKILL)
217-
r = -ERESTARTSYS;
218-
else
219-
r = wait_event_killable(sched->job_scheduled,
220-
amd_sched_entity_is_idle(entity));
221-
amd_sched_rq_remove_entity(rq, entity);
222-
if (r) {
223-
struct amd_sched_job *job;
216+
wait_event(sched->job_scheduled, amd_sched_entity_is_idle(entity));
224217

225-
/* Park the kernel for a moment to make sure it isn't processing
226-
* our enity.
227-
*/
228-
kthread_park(sched->thread);
229-
kthread_unpark(sched->thread);
230-
while (kfifo_out(&entity->job_queue, &job, sizeof(job)))
231-
sched->ops->free_job(job);
232-
233-
}
218+
amd_sched_rq_remove_entity(rq, entity);
234219
kfifo_free(&entity->job_queue);
235220
}
236221

0 commit comments

Comments
 (0)