From d4818c74b19e8c75729573c75350dd9ee587d217 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 7 Apr 2016 14:14:15 +0100 Subject: sna/present: Clamp to maximum timer delay Timers can only be set for a maximum of int32_t milliseconds into the future. Respect that - if we need more, we'll just requeue! Signed-off-by: Chris Wilson --- src/sna/sna_present.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/sna/sna_present.c') diff --git a/src/sna/sna_present.c b/src/sna/sna_present.c index 6e1beaee..e69aef20 100644 --- a/src/sna/sna_present.c +++ b/src/sna/sna_present.c @@ -164,7 +164,7 @@ static uint32_t msc_to_delay(xf86CrtcPtr crtc, uint64_t target) DBG(("%s: sleep %d frames, %llu ms\n", __FUNCTION__, (int)(target - swap->msc), (long long)delay)); assert(delay >= 0); - return delay; + return MIN(delay, INT32_MAX); } static CARD32 sna_fake_vblank_handler(OsTimerPtr timer, CARD32 now, void *data) -- cgit v1.2.3