aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2024-02-26 17:32:50 +0100
committerSimon Ser <contact@emersion.fr>2024-02-26 17:32:50 +0100
commitdb2b1892ad6c9c5da27bb3ca16e0a644931ce132 (patch)
tree040c4c59a192a2d90bb4092f4d4e2331894aedea
parent0e839ab1c28f24e68b0266f2e57e530ac8830fc1 (diff)
backend/drm: move primary FB check after pending buffer logic
If a connector has no current/queued buffer, but has a pending buffer in the commit, we need to process that pending buffer before checking pending.primary_fb.
-rw-r--r--backend/drm/drm.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index 3b0e6be1..65b116c7 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -682,12 +682,6 @@ static bool drm_connector_test(struct wlr_output *output,
struct wlr_drm_connector_state pending = {0};
drm_connector_state_init(&pending, conn, state);
- if (pending.active && !pending.primary_fb) {
- wlr_drm_conn_log(conn, WLR_DEBUG,
- "No primary frame buffer available for this connector");
- goto out;
- }
-
if ((state->committed & WLR_OUTPUT_STATE_ADAPTIVE_SYNC_ENABLED) &&
state->adaptive_sync_enabled &&
!drm_connector_supports_vrr(conn)) {
@@ -724,6 +718,12 @@ static bool drm_connector_test(struct wlr_output *output,
}
}
+ if (pending.active && !pending.primary_fb) {
+ wlr_drm_conn_log(conn, WLR_DEBUG,
+ "No primary frame buffer available for this connector");
+ goto out;
+ }
+
ok = drm_crtc_commit(conn, &pending, 0, true);
out: