xf86-video-intel: src/sna/sna_present.c

Chris Wilson ickle at kemper.freedesktop.org
Thu Apr 7 13:17:27 UTC 2016


 src/sna/sna_present.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit d4818c74b19e8c75729573c75350dd9ee587d217
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Thu Apr 7 14:14:15 2016 +0100

    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 <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_present.c b/src/sna/sna_present.c
index 6e1beae..e69aef2 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)


More information about the xorg-commit mailing list