@ -715,12 +715,10 @@ bool drm_connector_commit_state(struct wlr_drm_connector *conn,
}
}
}
}
uint32_t flags = 0 ;
if ( pending . base - > committed & WLR_OUTPUT_STATE_BUFFER ) {
if ( pending . base - > committed & WLR_OUTPUT_STATE_BUFFER ) {
if ( ! drm_connector_state_update_primary_fb ( conn , & pending ) ) {
if ( ! drm_connector_state_update_primary_fb ( conn , & pending ) ) {
goto out ;
goto out ;
}
}
flags | = DRM_MODE_PAGE_FLIP_EVENT ;
// wlr_drm_interface.crtc_commit will perform either a non-blocking
// wlr_drm_interface.crtc_commit will perform either a non-blocking
// page-flip, either a blocking modeset. When performing a blocking modeset
// page-flip, either a blocking modeset. When performing a blocking modeset
@ -732,9 +730,6 @@ bool drm_connector_commit_state(struct wlr_drm_connector *conn,
goto out ;
goto out ;
}
}
}
}
if ( pending . modeset & & pending . active ) {
flags | = DRM_MODE_PAGE_FLIP_EVENT ;
}
if ( pending . base - > committed & WLR_OUTPUT_STATE_LAYERS ) {
if ( pending . base - > committed & WLR_OUTPUT_STATE_LAYERS ) {
if ( ! drm_connector_set_pending_layer_fbs ( conn , pending . base ) ) {
if ( ! drm_connector_set_pending_layer_fbs ( conn , pending . base ) ) {
return false ;
return false ;
@ -751,6 +746,8 @@ bool drm_connector_commit_state(struct wlr_drm_connector *conn,
}
}
}
}
uint32_t flags = pending . active ? DRM_MODE_PAGE_FLIP_EVENT : 0 ;
ok = drm_crtc_commit ( conn , & pending , flags , false ) ;
ok = drm_crtc_commit ( conn , & pending , flags , false ) ;
if ( ! ok ) {
if ( ! ok ) {
goto out ;
goto out ;