aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2022-09-30 13:35:07 +0200
committerSimon Ser <contact@emersion.fr>2022-09-30 13:35:07 +0200
commit651c876e79ffa7ec0f508a873d1fcf5a4d93b8cc (patch)
treeb73a88efb0e5fc184d2615bf69c8840465fc842a
parenta0345f28540a577c83bb23243639078caf94d75c (diff)
backend/drm: fix missing wlr_output_state.allow_artifacts
Without allow_artifacts, applying the new state will fail because it requires ALLOW_MODESET. Fixes VT switch and disabling CRTCs.
-rw-r--r--backend/drm/backend.c1
-rw-r--r--backend/drm/drm.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/backend/drm/backend.c b/backend/drm/backend.c
index e303bc8f..46f7f7b8 100644
--- a/backend/drm/backend.c
+++ b/backend/drm/backend.c
@@ -115,6 +115,7 @@ static void handle_session_active(struct wl_listener *listener, void *data) {
}
struct wlr_output_state state = {
.committed = committed,
+ .allow_artifacts = true,
.enabled = mode != NULL,
.mode_type = WLR_OUTPUT_STATE_MODE_FIXED,
.mode = mode,
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index 2b09ca91..cddfdf13 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -1050,6 +1050,7 @@ static void dealloc_crtc(struct wlr_drm_connector *conn) {
struct wlr_output_state output_state = {
.committed = WLR_OUTPUT_STATE_ENABLED,
+ .allow_artifacts = true,
.enabled = false,
};
struct wlr_drm_connector_state conn_state = {0};