backend/drm: fix retry pageflip

This commit is contained in:
emersion 2018-01-19 23:35:23 +01:00
parent d6c74d8a16
commit f0f97280a0
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48

View file

@ -199,14 +199,13 @@ static void wlr_drm_connector_swap_buffers(struct wlr_output *output) {
if (drm->parent) {
bo = wlr_drm_surface_mgpu_copy(&plane->mgpu_surf, bo);
}
uint32_t fb_id = get_fb_for_bo(bo);
if (drm->iface->crtc_pageflip(drm, conn, crtc, fb_id, NULL)) {
conn->pageflip_pending = true;
} else {
wl_event_source_timer_update(conn->retry_pageflip,
1000.0f / conn->output.current_mode->refresh);
1000000.0f / conn->output.current_mode->refresh);
}
}
@ -241,7 +240,7 @@ void wlr_drm_connector_start_renderer(struct wlr_drm_connector *conn) {
conn->pageflip_pending = true;
} else {
wl_event_source_timer_update(conn->retry_pageflip,
1000.0f / conn->output.current_mode->refresh);
1000000.0f / conn->output.current_mode->refresh);
}
}