diff options
author | Rouven Czerwinski <rouven@czerwinskis.de> | 2019-06-26 17:14:31 +0200 |
---|---|---|
committer | Scott Anderson <ascent12@hotmail.com> | 2019-06-27 00:17:27 +0000 |
commit | d10072e76cffa962d1bc32f056524708981dfa4a (patch) | |
tree | 2c8f288e015953536708f9e4ef73edb9c2ff41a0 /backend/drm/atomic.c | |
parent | 0b1f9439bab7e653fb59cee2b8446dcbf359935c (diff) |
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
Diffstat (limited to 'backend/drm/atomic.c')
-rw-r--r-- | backend/drm/atomic.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/backend/drm/atomic.c b/backend/drm/atomic.c index ad5ee6e2..023307fc 100644 --- a/backend/drm/atomic.c +++ b/backend/drm/atomic.c @@ -45,18 +45,20 @@ static bool atomic_end(int drm_fd, struct atomic *atom) { static bool atomic_commit(int drm_fd, struct atomic *atom, struct wlr_drm_connector *conn, uint32_t flags, bool modeset) { + struct wlr_drm_backend *drm = + get_drm_backend_from_backend(conn->output.backend); if (atom->failed) { return false; } - int ret = drmModeAtomicCommit(drm_fd, atom->req, flags, conn); + int ret = drmModeAtomicCommit(drm_fd, atom->req, flags, drm); if (ret) { wlr_log_errno(WLR_ERROR, "%s: Atomic commit failed (%s)", conn->output.name, modeset ? "modeset" : "pageflip"); // Try to commit without new changes drmModeAtomicSetCursor(atom->req, atom->cursor); - if (drmModeAtomicCommit(drm_fd, atom->req, flags, conn)) { + if (drmModeAtomicCommit(drm_fd, atom->req, flags, drm)) { wlr_log_errno(WLR_ERROR, "%s: Atomic commit without new changes failed (%s)", conn->output.name, modeset ? "modeset" : "pageflip"); |