linux_dsm_epyc7002/drivers/gpu/drm/scheduler
Steven Price 588b9828f0 drm: Don't free jobs in wait_event_interruptible()
drm_sched_cleanup_jobs() attempts to free finished jobs, however because
it is called as the condition of wait_event_interruptible() it must not
sleep. Unfortunately some free callbacks (notably for Panfrost) do sleep.

Instead let's rename drm_sched_cleanup_jobs() to
drm_sched_get_cleanup_job() and simply return a job for processing if
there is one. The caller can then call the free_job() callback outside
the wait_event_interruptible() where sleeping is possible before
re-checking and returning to sleep if necessary.

Tested-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Fixes: 5918045c4e ("drm/scheduler: rework job destruction")
Signed-off-by: Steven Price <steven.price@arm.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/337652/
2019-10-25 13:47:58 +02:00
..
gpu_scheduler_trace.h drm/scheduler: drop use of drmP.h 2019-07-15 18:11:31 +02:00
Makefile drm/scheduler: rename gpu_scheduler.c to sched_main.c 2018-08-27 11:10:44 -05:00
sched_entity.c drm/scheduler: use job count instead of peek 2019-08-15 10:52:10 -05:00
sched_fence.c drm/scheduler: make unexported items static 2019-10-10 09:11:46 -05:00
sched_main.c drm: Don't free jobs in wait_event_interruptible() 2019-10-25 13:47:58 +02:00