summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-06-10 08:49:41 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2014-06-10 08:52:09 +0100
commit52e2aa0939eee3566e4d6ee3a34f8acd93570530 (patch)
treeeb79e8bef31ddb24c26b30900deaa1b8bb43f0cb
parent68ac3039e4170b318952213311534cd213cbaff7 (diff)
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>
-rw-r--r--src/sna/sna_display.c5
1 files changed, 1 insertions, 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,