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.
This commit is contained in:
Simon Ser 2020-05-07 11:30:28 +02:00 committed by Drew DeVault
parent cdb6fdbc6c
commit da4df82532
1 changed files with 1 additions and 3 deletions

View File

@ -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;
}