1
0
Fork 0

drm_hwcomposer: Fix used_plane state tracking

Ensure that the next frame's list of used_planes is correct. The list of
used planes for the new frame is initialized to the previous frame's
list of planes when creating the AtomicRequest. If there is a
composition as a part of this request, the list should be cleared before
creating the new composition, since the list will be re-populated.

Neglecting to clear this left planes on the list when they shouldn't
have been, or the same plane multiple times. This led to some spurious
commit and validation failures on single display configurations, but on
multiple display configurations also resulted in highly visible stuttering.

Change-Id: Ie3fa1fc120fde13ee80f9a144c459526be2822cb
This commit is contained in:
Drew Davenport 2025-09-19 10:00:07 -06:00
parent d341024047
commit ac727c57ae

View file

@ -394,6 +394,8 @@ bool DrmAtomicStateManager::SetCompositionIfNeeded(const AtomicCommitArgs &args,
// Initialize the list of unused planes to all the planes used in the
// previous frame.
auto unused_planes = committed_frame_state_.used_planes;
// Clear the list of planes for the next frame. It will be repopulated below.
request.new_frame_state.used_planes.clear();
for (auto &joining : args.composition->plan) {
DrmPlane *plane = joining.plane->Get();