aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2020-05-07 11:30:28 +0200
committerDrew DeVault <sir@cmpwn.com>2020-05-12 15:12:06 +0200
commitda4df82532fd992aa1cf13cd1fb6f34ff6bb3ea2 (patch)
treeaeafececcfd23f9c5ab74c9b182a9510e0e269fc
parentcdb6fdbc6cb734e174bfcb53e4622eeef89d0d79 (diff)
backend/drm: fix combined modeset+enable commits
When an output is enabled and modeset at the same time, drm_connector_commit would first try to modeset then try to commit. This won't work because both will trigger a page-flip. KMS will reject that. Change the logic to only enable an output if no modeset has been requested. The logic in wlr_output already checks that the user isn't doing a modeset and disabling the output at the same time.
-rw-r--r--backend/drm/drm.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index 12aacd80..b4d25e1d 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -537,9 +537,7 @@ static bool drm_connector_commit(struct wlr_output *output) {
}
break;
}
- }
-
- if (output->pending.committed & WLR_OUTPUT_STATE_ENABLED) {
+ } else if (output->pending.committed & WLR_OUTPUT_STATE_ENABLED) {
if (!enable_drm_connector(output, output->pending.enabled)) {
return false;
}