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
master
Simon Ser 5 years ago committed by Drew DeVault
parent da4df82532
commit 9412d34e2d

@ -1119,6 +1119,9 @@ static void dealloc_crtc(struct wlr_drm_connector *conn) {
enable_drm_connector(&conn->output, false); enable_drm_connector(&conn->output, false);
drm_plane_finish_surface(conn->crtc->primary); drm_plane_finish_surface(conn->crtc->primary);
drm_plane_finish_surface(conn->crtc->cursor); drm_plane_finish_surface(conn->crtc->cursor);
if (conn->crtc->cursor != NULL) {
conn->crtc->cursor->cursor_enabled = false;
}
conn->crtc = NULL; conn->crtc = NULL;
} }

Loading…
Cancel
Save