diff options
| author | Lin.Cao <[email protected]> | 2025-05-15 02:07:13 +0000 |
|---|---|---|
| committer | Christian König <[email protected]> | 2025-05-22 14:54:40 +0000 |
| commit | 471db2c2d4f80ee94225a1ef246e4f5011733e50 (patch) | |
| tree | 655ea99bdb7492d81e7d953bd14857eda322b6e7 /drivers/gpu/drm/scheduler/sched_entity.c | |
| parent | drm/edid: fixed the bug that hdr metadata was not reset (diff) | |
| download | kernel-471db2c2d4f80ee94225a1ef246e4f5011733e50.tar.gz kernel-471db2c2d4f80ee94225a1ef246e4f5011733e50.zip | |
drm/scheduler: signal scheduled fence when kill job
When an entity from application B is killed, drm_sched_entity_kill()
removes all jobs belonging to that entity through
drm_sched_entity_kill_jobs_work(). If application A's job depends on a
scheduled fence from application B's job, and that fence is not properly
signaled during the killing process, application A's dependency cannot be
cleared.
This leads to application A hanging indefinitely while waiting for a
dependency that will never be resolved. Fix this issue by ensuring that
scheduled fences are properly signaled when an entity is killed, allowing
dependent applications to continue execution.
Signed-off-by: Lin.Cao <[email protected]>
Reviewed-by: Philipp Stanner <[email protected]>
Signed-off-by: Christian König <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'drivers/gpu/drm/scheduler/sched_entity.c')
| -rw-r--r-- | drivers/gpu/drm/scheduler/sched_entity.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/scheduler/sched_entity.c b/drivers/gpu/drm/scheduler/sched_entity.c index bd39db7bb240..e671aa241720 100644 --- a/drivers/gpu/drm/scheduler/sched_entity.c +++ b/drivers/gpu/drm/scheduler/sched_entity.c @@ -176,6 +176,7 @@ static void drm_sched_entity_kill_jobs_work(struct work_struct *wrk) { struct drm_sched_job *job = container_of(wrk, typeof(*job), work); + drm_sched_fence_scheduled(job->s_fence, NULL); drm_sched_fence_finished(job->s_fence, -ESRCH); WARN_ON(job->s_fence->parent); job->sched->ops->free_job(job); |
