diff options
| author | ZhenGuo Yin <[email protected]> | 2023-05-09 09:46:17 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2023-06-15 15:37:55 +0000 |
| commit | 4f9b94d848696166011bead3109541ec2a523bb8 (patch) | |
| tree | c4e002f9c3fe77a5fb9e1379368f73fc61d9f181 /drivers/gpu/drm/scheduler/sched_entity.c | |
| parent | drm/amdgpu: add entity error check in amdgpu_ctx_get_entity (diff) | |
| download | kernel-4f9b94d848696166011bead3109541ec2a523bb8.tar.gz kernel-4f9b94d848696166011bead3109541ec2a523bb8.zip | |
drm/scheduler: avoid infinite loop if entity's dependency is a scheduled error fence
[Why]
drm_sched_entity_add_dependency_cb ignores the scheduled fence and return false.
If entity's dependency is a scheduler error fence and drm_sched_stop is called
due to TDR, drm_sched_entity_pop_job will wait for the dependency infinitely.
[How]
Do not wait or ignore the scheduled error fence, add drm_sched_entity_wakeup
callback for the dependency with scheduled error fence.
Signed-off-by: ZhenGuo Yin <[email protected]>
Acked-by: Alex Deucher <[email protected]>
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/scheduler/sched_entity.c')
| -rw-r--r-- | drivers/gpu/drm/scheduler/sched_entity.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/scheduler/sched_entity.c b/drivers/gpu/drm/scheduler/sched_entity.c index 68e807ae136a..b2bbc8a68b30 100644 --- a/drivers/gpu/drm/scheduler/sched_entity.c +++ b/drivers/gpu/drm/scheduler/sched_entity.c @@ -384,7 +384,7 @@ static bool drm_sched_entity_add_dependency_cb(struct drm_sched_entity *entity) } s_fence = to_drm_sched_fence(fence); - if (s_fence && s_fence->sched == sched && + if (!fence->error && s_fence && s_fence->sched == sched && !test_bit(DRM_SCHED_FENCE_DONT_PIPELINE, &fence->flags)) { /* |
