diff --git a/backend/drm/drm.c b/backend/drm/drm.c index b2e2c392..dff02e87 100644 --- a/backend/drm/drm.c +++ b/backend/drm/drm.c @@ -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); diff --git a/include/wlr/types/wlr_output.h b/include/wlr/types/wlr_output.h index d349f8ff..ff675bd3 100644 --- a/include/wlr/types/wlr_output.h +++ b/include/wlr/types/wlr_output.h @@ -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;