aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2019-12-27 12:43:49 +0100
committerDrew DeVault <sir@cmpwn.com>2019-12-30 11:21:11 -0700
commitf0781cd79207893c82cc1627df05b71aab4bfa54 (patch)
tree1b11885d27730387a90740c0137294eed9aeeab7 /backend
parent5d1ba0f44687f49cd28fcd8f69abac3cb0e07eb8 (diff)
backend/drm: modeset before enabling an output
This saves one modeset in case the previous mode is different.
Diffstat (limited to 'backend')
-rw-r--r--backend/drm/drm.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index 60c9e44c..dea79d7a 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -422,12 +422,6 @@ static bool drm_connector_commit(struct wlr_output *output) {
return false;
}
- if (output->pending.committed & WLR_OUTPUT_STATE_ENABLED) {
- if (!enable_drm_connector(output, output->pending.enabled)) {
- return false;
- }
- }
-
if (output->pending.committed & WLR_OUTPUT_STATE_MODE) {
switch (output->pending.mode_type) {
case WLR_OUTPUT_STATE_MODE_FIXED:
@@ -446,6 +440,12 @@ static bool drm_connector_commit(struct wlr_output *output) {
}
}
+ if (output->pending.committed & WLR_OUTPUT_STATE_ENABLED) {
+ if (!enable_drm_connector(output, output->pending.enabled)) {
+ return false;
+ }
+ }
+
if (output->pending.committed & WLR_OUTPUT_STATE_BUFFER) {
if (!drm_connector_commit_buffer(output)) {
return false;