From 41e559f57e5284462ffb46f8617aeb9f56f97937 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 25 Feb 2015 09:01:25 +0000 Subject: [PATCH] sna: Update the active_scanout flags on async flips In order to keep our sanity checks and buffers in order, we need to remember to mark the new frontbuffer as the active scanout after an asynchronous pageflip. Signed-off-by: Chris Wilson --- src/sna/sna_display.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c index d7f5500b..c3cc6baa 100644 --- a/src/sna/sna_display.c +++ b/src/sna/sna_display.c @@ -5501,6 +5501,7 @@ sna_page_flip(struct sna *sna, crtc_offset, crtc->offset)); fixup_flip: if (crtc->bo != bo && sna_crtc_flip(sna, crtc, bo, crtc->base->x, crtc->base->y)) { +update_scanout: DBG(("%s: removing handle=%d [active_scanout=%d] from scanout, installing handle=%d [active_scanout=%d]\n", __FUNCTION__, crtc->bo->handle, crtc->bo->active_scanout, bo->handle, bo->active_scanout)); @@ -5596,8 +5597,8 @@ retry_flip: DBG(("%s: recording flip on CRTC:%d handle=%d, active_scanout=%d, serial=%d\n", __FUNCTION__, crtc->id, crtc->flip_bo->handle, crtc->flip_bo->active_scanout, crtc->flip_serial)); - } - + } else + goto update_scanout; next_crtc: count++; }