aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2022-12-07 10:43:02 +0100
committerSimon Ser <contact@emersion.fr>2022-12-07 10:43:02 +0100
commit90a6c7b7e18950bfe393f9e921e525e3f1f4073e (patch)
tree9205f5d11db54fa1fb8b07857200e16cc0e10bbe
parent86fc2199f85ac0e1089bb7fd5a0b5cbc432bdb67 (diff)
backend/drm: fix VRR test
We were calling drm_connector_supports_vrr() before drm_connector_alloc_crtc(). Thus, when an output is currently off, the VRR test would always fail, because it checks that the vrr_enabled CRTC prop exists.
-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 a460fad5..00883a02 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -459,12 +459,6 @@ static bool drm_connector_test(struct wlr_output *output,
}
}
- if ((state->committed & WLR_OUTPUT_ADAPTIVE_SYNC_ENABLED) &&
- state->adaptive_sync_enabled &&
- !drm_connector_supports_vrr(conn)) {
- return false;
- }
-
struct wlr_drm_connector_state pending = {0};
drm_connector_state_init(&pending, conn, state);
@@ -484,6 +478,12 @@ static bool drm_connector_test(struct wlr_output *output,
}
}
+ if ((state->committed & WLR_OUTPUT_ADAPTIVE_SYNC_ENABLED) &&
+ state->adaptive_sync_enabled &&
+ !drm_connector_supports_vrr(conn)) {
+ return false;
+ }
+
if (conn->backend->parent) {
// If we're running as a secondary GPU, we can't perform an atomic
// commit without blitting a buffer.