diff options
author | Chris Bainbridge <chris.bainbridge@gmail.com> | 2016-05-17 07:26:10 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2016-05-17 07:28:23 +0100 |
commit | ab3ab412a459a95e94707a4e39a18790ee04e6e3 (patch) | |
tree | 13f05eb679475ef989ea5e48288eb0e3b2706e8c /src | |
parent | 34f63f28c8f39e1d64cd159482f86cacbbff05b4 (diff) |
sna: Fix increment of modeset serial after applying CRTC
We track how many mode sets have been made in order to detect stale
flips (i.e. a sequence that crosses a mode change). This was broken by
the logic inversion in setcrc in 46caee86db0f ("sna: Fix reporting of
errno after setcrtc failure")
References: https://bugs.freedesktop.org/show_bug.cgi?id=95401
Signed-off-by: Chris Bainbridge <chris.bainbridge@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r-- | src/sna/sna_display.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c index 867a10b5..d01e6a42 100644 --- a/src/sna/sna_display.c +++ b/src/sna/sna_display.c @@ -1447,9 +1447,12 @@ sna_crtc_apply(xf86CrtcPtr crtc) ret = 0; if (unlikely(drmIoctl(sna->kgem.fd, DRM_IOCTL_MODE_SETCRTC, &arg))) { ret = errno; - sna_crtc->mode_serial++; - sna_crtc_force_outputs_on(crtc); + goto unblock; } + + sna_crtc->mode_serial++; + sna_crtc_force_outputs_on(crtc); + unblock: kmsg_close(&kmsg, ret); sigio_unblock(sigio); |