From 9412d34e2dc1d8b034e117950ede1424dc0f243c Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Thu, 7 May 2020 12:04:14 +0200 Subject: [PATCH] backend/drm: disable cursor in dealloc_crtc dealloc_crtc was destroying GBM surfaces, but the cursor_enabled flag was left as-is. When re-enabling the output, atomic_crtc_pageflip would try enabling the cursor plane, but would fail because no framebuffer is available. Closes: https://github.com/swaywm/wlroots/issues/2150 --- backend/drm/drm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/drm/drm.c b/backend/drm/drm.c index b4d25e1d..743cc291 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -1119,6 +1119,9 @@ static void dealloc_crtc(struct wlr_drm_connector *conn) { enable_drm_connector(&conn->output, false); drm_plane_finish_surface(conn->crtc->primary); drm_plane_finish_surface(conn->crtc->cursor); + if (conn->crtc->cursor != NULL) { + conn->crtc->cursor->cursor_enabled = false; + } conn->crtc = NULL; }