diff options
author | Steven Price <steven.price@arm.com> | 2019-10-25 11:51:56 +0100 |
---|---|---|
committer | Christian König <christian.koenig@amd.com> | 2019-10-25 13:47:58 +0200 |
commit | 588b9828f0744ca13555c4a35cd0251ac8ad8ad2 (patch) | |
tree | fa95c13994cb58d19d64937c5bec1a19971cdcbd /include/drm | |
parent | 0f54621701bf164563dc907c2cfe967f32a5fb28 (diff) |
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: 5918045c4ed4 ("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/
Diffstat (limited to 'include/drm')
0 files changed, 0 insertions, 0 deletions