diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-07-23 14:25:25 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-07-23 14:45:19 +0100 |
commit | d242965979cf251383a6230dbd65cdc1d9e231ea (patch) | |
tree | 09e7a187efcd4797dd2f75cb0b1b0eaf5d9add06 | |
parent | 4153d4b43004cd90c0d9a7a7db399dac4d30721e (diff) |
sna: Skip performing an async flip after fixup
After the first async failure and we fix up the CRTC, ordinary we queue
a no-op flip in order to queue the event. For async flips, we do not
want that event so just skip the flip.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_display.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c index 0600a8c7..ffb8bb99 100644 --- a/src/sna/sna_display.c +++ b/src/sna/sna_display.c @@ -4892,14 +4892,13 @@ sna_crtc_flip(struct sna *sna, struct sna_crtc *crtc, struct kgem_bo *bo, int x, arg.mode = crtc->kmode; arg.mode_valid = 1; - DBG(("%s: applying crtc [%d, pipe=%d] mode=%dx%d+%d+%d@%d, fb=%d%s update to %d outputs [%d...]\n", + DBG(("%s: applying crtc [%d, pipe=%d] mode=%dx%d+%d+%d@%d, fb=%d across %d outputs [%d...]\n", __FUNCTION__, crtc->id, crtc->pipe, arg.mode.hdisplay, arg.mode.vdisplay, arg.x, arg.y, arg.mode.clock, arg.fb_id, - bo != crtc->bo ? " [shadow]" : "", output_count, output_count ? output_ids[0] : 0)); if (drmIoctl(sna->kgem.fd, DRM_IOCTL_MODE_SETCRTC, &arg)) @@ -4973,6 +4972,11 @@ fixup_flip: crtc->bo = kgem_bo_reference(bo); crtc->bo->active_scanout++; + + if (data == NULL) + goto next_crtc; + + /* queue a flip in order to send the event */ } else { if (count && !xf86SetDesiredModes(sna->scrn)) { xf86DrvMsg(sna->scrn->scrnIndex, X_ERROR, @@ -5044,6 +5048,7 @@ retry_flip: sna->mode.flip_active++; } +next_crtc: count++; } |