diff options
author | Boris Brezillon <boris.brezillon@collabora.com> | 2020-10-02 09:55:18 +0300 |
---|---|---|
committer | Christian König <christian.koenig@amd.com> | 2020-10-05 16:06:33 +0300 |
commit | 170fb58ee329bcfa8dc4c0c5eab0ea5af7fb7f3b (patch) | |
tree | df3cea0adea84ed66528d39e1ce9aa4f9b221834 /drivers/gpu/drm | |
parent | 01370532b72e954989a3175eabe47f90fc6d2a6b (diff) | |
download | linux-170fb58ee329bcfa8dc4c0c5eab0ea5af7fb7f3b.tar.xz |
drm/sched: Avoid infinite waits in the drm_sched_entity_destroy() path
If we don't initialize the entity to idle and the entity is never
scheduled before being destroyed we end up with an infinite wait in the
destroy path.
v2:
- Add Steven's R-b
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-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/393486/
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/scheduler/sched_entity.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/scheduler/sched_entity.c b/drivers/gpu/drm/scheduler/sched_entity.c index 146380118962..f8ec277a6aa8 100644 --- a/drivers/gpu/drm/scheduler/sched_entity.c +++ b/drivers/gpu/drm/scheduler/sched_entity.c @@ -73,6 +73,9 @@ int drm_sched_entity_init(struct drm_sched_entity *entity, init_completion(&entity->entity_idle); + /* We start in an idle state. */ + complete(&entity->entity_idle); + spin_lock_init(&entity->rq_lock); spsc_queue_init(&entity->job_queue); |