Skip to content
Commit 588b9828 authored by Steven Price's avatar Steven Price Committed by Christian König
Browse files

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: default avatarChristian Gmeiner <christian.gmeiner@gmail.com>
Fixes: 5918045c

 ("drm/scheduler: rework job destruction")
Signed-off-by: default avatarSteven Price <steven.price@arm.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/337652/
parent 0f546217
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment