xf86-video-intel: 2 commits - src/sna/sna_present.c
Chris Wilson
ickle at kemper.freedesktop.org
Tue Apr 5 19:05:39 UTC 2016
src/sna/sna_present.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
New commits:
commit e091ace4d861bbcd67d69f409f0cdf365ee2e685
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Tue Apr 5 20:01:07 2016 +0100
sna/present: Remove stale assert that fake vblanks only have one event
Since commit 02f535e8f3659f1147c6f2e698bd5d8730dec19b
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Thu Mar 24 09:39:06 2016 +0000
sna/present: Requeue early vblank completions
we may hit the fake vblank timer path with an old hw struct that may have
multiple associated events. The assert that we only called the fake
vblank from sna_present_queue_vblank is no longer correct.
Reported-by: Christoph Haag <haagch at frickel.club>
References: https://bugs.freedesktop.org/show_bug.cgi?id=94829#c15
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_present.c b/src/sna/sna_present.c
index 621791a..e0a473a 100644
--- a/src/sna/sna_present.c
+++ b/src/sna/sna_present.c
@@ -226,8 +226,6 @@ static bool sna_fake_vblank(struct sna_present_event *info)
uint64_t msc = sna_crtc_last_swap(info->crtc)->msc;
uint32_t delay;
- assert(info->n_event_id == 1);
-
if (msc < info->target_msc)
delay = msc_to_delay(info->crtc, info->target_msc);
else
commit 4b4324cd059590cbeb37b6d6fd79446171cd04c4
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Tue Apr 5 20:01:07 2016 +0100
sna/present: Update the vblank timestamp after a blocking wait
After doing a blocking wait (rather than event driven) for the imminent
arrival of the next frame (when it is expected less than 1ms in the
future), update the timestamp and frame counter that we then report back
to present.
Reported-by: Christoph Haag <haagch at frickel.club>
References: https://bugs.freedesktop.org/show_bug.cgi?id=94829#c15
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_present.c b/src/sna/sna_present.c
index cd7a741..621791a 100644
--- a/src/sna/sna_present.c
+++ b/src/sna/sna_present.c
@@ -202,9 +202,14 @@ static CARD32 sna_fake_vblank_handler(OsTimerPtr timer, CARD32 now, void *data)
DBG(("%s: blocking wait!\n", __FUNCTION__));
vbl.request.type = DRM_VBLANK_ABSOLUTE;
vbl.request.sequence = info->target_msc;
- (void)sna_wait_vblank(info->sna, &vbl, sna_crtc_pipe(info->crtc));
+ if (sna_wait_vblank(info->sna, &vbl, sna_crtc_pipe(info->crtc)) == 0) {
+ ust = ust64(vbl.reply.tval_sec, vbl.reply.tval_usec);
+ msc = sna_crtc_record_vblank(info->crtc, &vbl);
+ } else
+ goto fixup;
}
} else {
+fixup:
ust = gettime_ust64();
msc = info->target_msc;
DBG(("%s: event=%lld, CRTC OFF, target msc=%lld, was %lld (off)\n",
More information about the xorg-commit
mailing list