aboutsummaryrefslogtreecommitdiff
path: root/backend/drm
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2020-01-17 10:50:29 +0100
committerDrew DeVault <sir@cmpwn.com>2020-01-17 06:49:31 -0700
commit7c05933e5174f3204ba6ffb851b9990b2327849c (patch)
treed78146f1ac767f91ec70ea60fb0d9ecdf28112d3 /backend/drm
parentdf972677c1a45627bb303a6a2f7e1901161606b5 (diff)
backend/drm: prevent outputs from being destroyed on commit
This would happen if initializing the renderer fails. Instead, we just mark the output as disabled. References: https://github.com/swaywm/sway/pull/4917
Diffstat (limited to 'backend/drm')
-rw-r--r--backend/drm/drm.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index 60f8ecaa..db6f0207 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -1213,9 +1213,10 @@ static void realloc_crtcs(struct wlr_drm_backend *drm) {
struct wlr_drm_mode *mode =
(struct wlr_drm_mode *)conn->output.current_mode;
if (!drm_connector_init_renderer(conn, mode)) {
- wlr_log(WLR_ERROR, "Failed to initialize renderer for plane");
- drm_connector_cleanup(conn);
- break;
+ wlr_log(WLR_ERROR, "Failed to initialize renderer on output %s",
+ conn->output.name);
+ wlr_output_update_enabled(&conn->output, false);
+ continue;
}
wlr_output_damage_whole(&conn->output);