diff options
author | Simon Ser <contact@emersion.fr> | 2023-02-26 18:42:31 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2023-02-26 18:42:31 +0100 |
commit | 5079000e49d57ef4087167404fe9091252401b35 (patch) | |
tree | ee110f644e730d92300f90a301161313c32e90dc | |
parent | ab7eabac84338f2a763f97d0183788be35589a2f (diff) |
output: allow modeset with buffer while frame is pending
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3600
-rw-r--r-- | types/output/output.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/types/output/output.c b/types/output/output.c index c6b90a1d..75defcc2 100644 --- a/types/output/output.c +++ b/types/output/output.c @@ -576,7 +576,10 @@ static uint32_t output_compare_state(struct wlr_output *output, static bool output_basic_test(struct wlr_output *output, const struct wlr_output_state *state) { if (state->committed & WLR_OUTPUT_STATE_BUFFER) { - if (output->frame_pending) { + // Modesets will block for the previous frame to complete. Regular + // page-flips are non-blocking and require the compositor to wait. + if (output->frame_pending && + !(state->committed & (WLR_OUTPUT_STATE_ENABLED | WLR_OUTPUT_STATE_MODE))) { wlr_log(WLR_DEBUG, "Tried to commit a buffer while a frame is pending"); return false; } |