summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/i830_dri.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/i830_dri.c b/src/i830_dri.c
index e8f24247..fc178076 100644
--- a/src/i830_dri.c
+++ b/src/i830_dri.c
@@ -645,6 +645,12 @@ I830DRI2ScheduleSwap(ClientPtr client, DrawablePtr draw, DRI2BufferPtr front,
BoxRec box;
RegionRec region;
+ /* Truncate to match kernel interfaces; means occasional overflow
+ * misses, but that's generally not a big deal */
+ *target_msc &= 0xffffffff;
+ divisor &= 0xffffffff;
+ remainder &= 0xffffffff;
+
swap_info = xcalloc(1, sizeof(DRI2FrameEventRec));
/* Drawable not displayed... just complete the swap */
@@ -849,6 +855,12 @@ I830DRI2ScheduleWaitMSC(ClientPtr client, DrawablePtr draw, CARD64 target_msc,
int ret, pipe = I830DRI2DrawablePipe(draw);
CARD64 current_msc;
+ /* Truncate to match kernel interfaces; means occasional overflow
+ * misses, but that's generally not a big deal */
+ target_msc &= 0xffffffff;
+ divisor &= 0xffffffff;
+ remainder &= 0xffffffff;
+
/* Drawable not visible, return immediately */
if (pipe == -1) {
DRI2WaitMSCComplete(client, draw, target_msc, 0, 0);