wlr_output: Add adaptive_sync_supported

This will let compositors know if changing adaptive_sync state has any
chance of working. When false, then the current state is the only
supported state, including if adaptive_sync is currently enabled as is
the case for Wayland and X11 backends.

When true, changing state might succeed, but no guarantee is made. It
just indicates that the backend does not already know it to be
impossible.
master
Kenny Levinsen 8 months ago committed by Kirill Primak
parent 55bee71a53
commit f10327f915

@ -1586,6 +1586,12 @@ static bool connect_drm_connector(struct wlr_drm_connector *wlr_conn,
}
}
uint64_t vrr_capable = 0;
if (wlr_conn->props.vrr_capable != 0) {
get_drm_prop(drm->fd, wlr_conn->id, wlr_conn->props.vrr_capable, &vrr_capable);
}
output->adaptive_sync_supported = vrr_capable;
size_t edid_len = 0;
uint8_t *edid = get_drm_prop_blob(drm->fd,
wlr_conn->id, wlr_conn->props.edid, &edid_len);

@ -150,6 +150,11 @@ struct wlr_output {
enum wlr_output_adaptive_sync_status adaptive_sync_status;
uint32_t render_format;
// Indicates whether making changes to adaptive sync status is supported.
// If false, changes to adaptive sync status is guaranteed to fail. If
// true, changes may either succeed or fail.
bool adaptive_sync_supported;
bool needs_frame;
// damage for cursors and fullscreen surface, in output-local coordinates
bool frame_pending;

Loading…
Cancel
Save