From cb378600e4389cb8e9c1eca80e5b1851b671def9 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Tue, 6 Apr 2021 20:49:33 +0200 Subject: backend/drm: allocate a CRTC in drm_connector_commit_state drm_connector_set_pending_fb needs a CRTC to import the buffer. --- backend/drm/drm.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'backend/drm') diff --git a/backend/drm/drm.c b/backend/drm/drm.c index 7c28d319..7cbc8762 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -505,6 +505,14 @@ bool drm_connector_commit_state(struct wlr_drm_connector *conn, return false; } + if (drm_connector_state_active(conn, &state)) { + if (!drm_connector_alloc_crtc(conn)) { + wlr_drm_conn_log(conn, WLR_ERROR, + "No CRTC available for this connector"); + return false; + } + } + if (state.committed & WLR_OUTPUT_STATE_BUFFER) { if (!drm_connector_set_pending_fb(conn, &state)) { return false; -- cgit v1.2.3