From 52e2aa0939eee3566e4d6ee3a34f8acd93570530 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Tue, 10 Jun 2014 08:49:41 +0100 Subject: [PATCH] sna: Queue a flip after fixing up a failed flip After a flip fails, we try to update the CRTC manually to new fb. However, the caller is still expecting to receive an event though the drm device to notify when the flips are complete. In order to maintain that ABI, we need to queue another flip after the fixup (to the currently bound fb). Signed-off-by: Chris Wilson --- src/sna/sna_display.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c index eb47165b..40cc3476 100644 --- a/src/sna/sna_display.c +++ b/src/sna/sna_display.c @@ -4494,7 +4494,7 @@ static int do_page_flip(struct sna *sna, struct kgem_bo *bo, bo->pitch, crtc->bo->pitch, crtc_offset, crtc->offset)); fixup_flip: - if (sna_crtc_flip(sna, crtc)) { + if (crtc->bo != bo && sna_crtc_flip(sna, crtc)) { assert(crtc->bo->active_scanout); assert(crtc->bo->refcnt >= crtc->bo->active_scanout); crtc->bo->active_scanout--; @@ -4502,9 +4502,6 @@ fixup_flip: crtc->bo = kgem_bo_reference(bo); crtc->bo->active_scanout++; - - count++; - continue; } else { if (count && !xf86SetDesiredModes(sna->scrn)) { xf86DrvMsg(sna->scrn->scrnIndex, X_ERROR,