aboutsummaryrefslogtreecommitdiff
path: root/backend/drm/drm.c
diff options
context:
space:
mode:
authorScott Anderson <scott@anderso.nz>2020-02-12 21:25:40 +1300
committerSimon Ser <contact@emersion.fr>2020-04-28 09:54:52 +0200
commit52281cb8ba7e0badd92662ade136d25929a67828 (patch)
tree028247abe3b256120b4441d4473607cc8d6aa6ae /backend/drm/drm.c
parentbe90062c51ba5470f513aa118d99472c304e8f36 (diff)
backend/drm: move atomic cursor code into pageflip code
It makes sense to construct as much atomic state as possible in the same place, so it doesn't get lost if we "reset" it.
Diffstat (limited to 'backend/drm/drm.c')
-rw-r--r--backend/drm/drm.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index ed74c7d1..8efc9d7f 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -338,9 +338,6 @@ static bool drm_crtc_page_flip(struct wlr_drm_connector *conn,
struct wlr_drm_mode *mode) {
struct wlr_drm_backend *drm = get_drm_backend_from_backend(conn->output.backend);
struct wlr_drm_crtc *crtc = conn->crtc;
- struct wlr_drm_plane *plane = crtc->primary;
- struct gbm_bo *bo;
- uint32_t fb_id;
drmModeModeInfo *drm_mode = mode ? &mode->drm_mode : NULL;
if (conn->pageflip_pending) {
@@ -348,13 +345,7 @@ static bool drm_crtc_page_flip(struct wlr_drm_connector *conn,
return false;
}
- bo = drm_fb_acquire(&plane->queued_fb, drm, &plane->mgpu_surf);
- if (!bo) {
- return false;
- }
-
- fb_id = get_fb_for_bo(bo, drm->addfb2_modifiers);
- if (!drm->iface->crtc_pageflip(drm, conn, crtc, fb_id, drm_mode)) {
+ if (!drm->iface->crtc_pageflip(drm, conn, drm_mode)) {
return false;
}