backend: drm: switch to pageflip_handler_2

atomic and legacy now both pass the backend as the user data for the
pageflip event. We than retrieve the correct connector by matching on
the crtc_id passed to the page_flip_handler2.

Wlroots also requires the DRM_CRTC_IN_VBLANK_EVENT capability now.

Fixes #1297
This commit is contained in:
Rouven Czerwinski 2019-06-26 17:14:31 +02:00 committed by Scott Anderson
parent 0b1f9439ba
commit d10072e76c
3 changed files with 27 additions and 9 deletions

View file

@ -17,7 +17,7 @@ static bool legacy_crtc_pageflip(struct wlr_drm_backend *drm,
}
}
if (drmModePageFlip(drm->fd, crtc->id, fb_id, DRM_MODE_PAGE_FLIP_EVENT, conn)) {
if (drmModePageFlip(drm->fd, crtc->id, fb_id, DRM_MODE_PAGE_FLIP_EVENT, drm)) {
wlr_log_errno(WLR_ERROR, "%s: Failed to page flip", conn->output.name);
return false;
}