mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-03-22 05:34:24 -04:00
output: fail commits if adaptive sync cannot be enabled
Previously, adaptive sync was just a hint and wouldn't make any atomic commit fail if the backend didn't support it. The main reason is wlr_output_test wasn't supported at the time. Now that we have a way for compositors to test whether a change can work, let's remove the exception for adaptive sync and convert it to a regular output state field.
This commit is contained in:
parent
26e1812ab3
commit
8c70245d5f
6 changed files with 22 additions and 8 deletions
|
|
@ -36,7 +36,8 @@ static const uint32_t COMMIT_OUTPUT_STATE =
|
|||
WLR_OUTPUT_STATE_BUFFER |
|
||||
WLR_OUTPUT_STATE_MODE |
|
||||
WLR_OUTPUT_STATE_ENABLED |
|
||||
WLR_OUTPUT_STATE_GAMMA_LUT;
|
||||
WLR_OUTPUT_STATE_GAMMA_LUT |
|
||||
WLR_OUTPUT_STATE_ADAPTIVE_SYNC_ENABLED;
|
||||
|
||||
static const uint32_t SUPPORTED_OUTPUT_STATE =
|
||||
WLR_OUTPUT_STATE_BACKEND_OPTIONAL | COMMIT_OUTPUT_STATE;
|
||||
|
|
@ -489,6 +490,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;
|
||||
}
|
||||
|
||||
struct wlr_drm_connector_state pending = {0};
|
||||
drm_connector_state_init(&pending, conn, state);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue