aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-09-01 23:43:16 +0200
committeremersion <contact@emersion.fr>2018-09-01 23:43:16 +0200
commite84f01168d55087932529301bb8e1c723244b72b (patch)
tree8e40b72293d7cbc45eb3711095a131cb8ac5add4
parentcc3c5ebb674987a33d5d8c227756f66af61ec243 (diff)
backend/drm: allow disabling outputs in NEEDS_MODESET state
This correctly frees CRTCs when disabling outputs without setting a mode.
-rw-r--r--backend/drm/drm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index a666ce71..c1fa1992 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -344,7 +344,8 @@ static void drm_connector_start_renderer(struct wlr_drm_connector *conn) {
void enable_drm_connector(struct wlr_output *output, bool enable) {
struct wlr_drm_connector *conn = (struct wlr_drm_connector *)output;
- if (conn->state != WLR_DRM_CONN_CONNECTED) {
+ if (conn->state != WLR_DRM_CONN_CONNECTED
+ && conn->state != WLR_DRM_CONN_NEEDS_MODESET) {
return;
}