aboutsummaryrefslogtreecommitdiff
path: root/backend/drm
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2021-04-06 20:49:33 +0200
committerKenny Levinsen <kl@kl.wtf>2021-06-13 10:57:17 +0200
commitcb378600e4389cb8e9c1eca80e5b1851b671def9 (patch)
tree11bd59c7cbf0843e0c5ca00bbf8b4cebf1b91291 /backend/drm
parentb180d3482f5d198b95c3ded70eb549325b8cb73c (diff)
backend/drm: allocate a CRTC in drm_connector_commit_state
drm_connector_set_pending_fb needs a CRTC to import the buffer.
Diffstat (limited to 'backend/drm')
-rw-r--r--backend/drm/drm.c8
1 files changed, 8 insertions, 0 deletions
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;