From da4df82532fd992aa1cf13cd1fb6f34ff6bb3ea2 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Thu, 7 May 2020 11:30:28 +0200 Subject: 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. --- backend/drm/drm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'backend/drm') 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; } -- cgit v1.2.3