aboutsummaryrefslogtreecommitdiff
path: root/backend/drm/legacy.c
diff options
context:
space:
mode:
Diffstat (limited to 'backend/drm/legacy.c')
-rw-r--r--backend/drm/legacy.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/backend/drm/legacy.c b/backend/drm/legacy.c
index 6e6b33dd..a8f618cf 100644
--- a/backend/drm/legacy.c
+++ b/backend/drm/legacy.c
@@ -38,7 +38,7 @@ static bool legacy_crtc_test(struct wlr_drm_connector *conn,
struct wlr_drm_crtc *crtc = conn->crtc;
if ((state->base->committed & WLR_OUTPUT_STATE_BUFFER) && !state->modeset) {
- struct wlr_drm_fb *pending_fb = crtc->primary->pending_fb;
+ struct wlr_drm_fb *pending_fb = state->primary_fb;
struct wlr_drm_fb *prev_fb = crtc->primary->queued_fb;
if (!prev_fb) {
@@ -74,13 +74,12 @@ static bool legacy_crtc_commit(struct wlr_drm_connector *conn,
uint32_t fb_id = 0;
if (state->active) {
- struct wlr_drm_fb *fb = plane_get_next_fb(crtc->primary);
- if (fb == NULL) {
+ if (state->primary_fb == NULL) {
wlr_log(WLR_ERROR, "%s: failed to acquire primary FB",
conn->output.name);
return false;
}
- fb_id = fb->id;
+ fb_id = state->primary_fb->id;
}
if (state->modeset) {