1
0
Fork 0
alistair23-linux/drivers/gpu/drm/scheduler
Steven Price 5a90861ed6 drm: Don't free jobs in wait_event_interruptible()
[ Upstream commit 588b9828f0 ]

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/
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-12-31 16:44:20 +01:00
..
Makefile drm/scheduler: rename gpu_scheduler.c to sched_main.c 2018-08-27 11:10:44 -05:00
gpu_scheduler_trace.h drm/scheduler: drop use of drmP.h 2019-07-15 18:11:31 +02: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: drop use of drmP.h 2019-07-15 18:11:31 +02:00
sched_main.c drm: Don't free jobs in wait_event_interruptible() 2019-12-31 16:44:20 +01:00