提交 170fb58e 编写于 作者: B Boris Brezillon 提交者: Christian König

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: NBoris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: NSteven Price <steven.price@arm.com>
Reviewed-by: NChristian König <christian.koenig@amd.com>
Signed-off-by: NChristian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/393486/
上级 01370532
...@@ -73,6 +73,9 @@ int drm_sched_entity_init(struct drm_sched_entity *entity, ...@@ -73,6 +73,9 @@ int drm_sched_entity_init(struct drm_sched_entity *entity,
init_completion(&entity->entity_idle); init_completion(&entity->entity_idle);
/* We start in an idle state. */
complete(&entity->entity_idle);
spin_lock_init(&entity->rq_lock); spin_lock_init(&entity->rq_lock);
spsc_queue_init(&entity->job_queue); spsc_queue_init(&entity->job_queue);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册