Skip to content

Commit

Permalink
sdm: Fix output fences on prepare failure.
Browse files Browse the repository at this point in the history
Prepare failure results in repeating the older frame, without issuing a
commit. Output fences i.e., release and retire get populated during start.
These need to be cleared in case of prepare failure, else it will lead
to deadlocks.

CRs-Fixed: 3321131
Change-Id: Iec1d2fb8c14b5748fb273533fa4f2c012bf6c2b6
  • Loading branch information
Akhil Jaiswal committed Mar 20, 2023
1 parent b17e921 commit 4d64a12
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions sdm/libs/core/display_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1327,6 +1327,13 @@ DisplayError DisplayBase::CommitOrPrepare(LayerStack *layer_stack) {
} else {
DLOGE("Prepare failed: %d", error);
}
// Clear fences
DLOGI("Clearing fences on input layers on display %d-%d", display_id_, display_type_);
for (auto &layer : layer_stack->layers) {
layer->input_buffer.release_fence = nullptr;
}
layer_stack->retire_fence = nullptr;

return error;
}

Expand Down

0 comments on commit 4d64a12

Please sign in to comment.