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 <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2014-06-10 08:49:41 +01:00
parent 68ac3039e4
commit 52e2aa0939
1 changed files with 1 additions and 4 deletions

View File

@ -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,