Skip to content

drm/compositor: test complete state on format test #1708

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/backend/drm/compositor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,7 @@ impl<B: Buffer, F: Framebuffer> FrameState<B, F> {
plane: plane::Handle,
state: PlaneState<B, F>,
allow_modeset: bool,
allow_partial_update: bool,
) -> Result<(), DrmError> {
let current_config = match self.plane_state_mut(plane) {
Some(config) => config,
Expand All @@ -669,7 +670,10 @@ impl<B: Buffer, F: Framebuffer> FrameState<B, F> {
let backup = current_config.clone();
*current_config = state;

let res = surface.test_state(self.build_planes(surface, supports_fencing, true), allow_modeset);
let res = surface.test_state(
self.build_planes(surface, supports_fencing, allow_partial_update),
allow_modeset,
);

if res.is_err() {
// test failed, restore previous state
Expand Down Expand Up @@ -1564,7 +1568,7 @@ where
}),
};

match current_frame_state.test_state(drm, supports_fencing, drm.plane(), plane_state, true) {
match current_frame_state.test_state(drm, supports_fencing, drm.plane(), plane_state, true, false) {
Ok(_) => Ok((swapchain, use_opaque)),
Err(err) => {
warn!(
Expand Down Expand Up @@ -3413,6 +3417,7 @@ where
plane_info.handle,
plane_state,
false,
true,
)
.is_ok()
};
Expand Down Expand Up @@ -4028,6 +4033,7 @@ where
plane.handle,
plane_state,
false,
true,
)
.is_ok()
};
Expand Down
Loading