<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Calibri" size="2"><span style="font-size:10.5pt;">
<div align="left" style="text-align:justify;">From “Quanxian Wang” <<a href="mailto:quanxian.wang@intel.com"><font color="blue"><u>q</u></font><font color="blue"><u>uanxian</u></font><font color="blue"><u>.wang@intel.com</u></font></a>></div>
<div align="left" style="text-align:justify;"> </div>
<div align="left" style="text-align:justify;">commit f7b156cef1ed8081df6f25cc0e66c8d7fbf414fc</div>
<div align="left" style="text-align:justify;">Author: Wang Quanxian <quanxian.wang@intel.com></div>
<div align="left" style="text-align:justify;">Date: Wed Sep 5 11:30:38 2012 +0800</div>
<div align="left" style="text-align:justify;"> </div>
<div align="left" style="text-align:justify;"> Change int to long to avoid the overflow when calculation vblank msecs</div>
<div align="left" style="text-align:justify;"> </div>
<div align="left" style="text-align:justify;"> secs and nsecs are from vblank event, the number of secs is very big(134xxxxxxx),</div>
<div align="left" style="text-align:justify;"> when turns secs to msecs(multiple 1000), it will exceed uint32</div>
<div align="left" style="text-align:justify;"> max value.</div>
<div align="left" style="text-align:justify;"> </div>
<div align="left" style="text-align:justify;"> Signed-Off-By Quanxian Wang <quanxian.wang@intel.com></div>
<div align="left" style="text-align:justify;"> </div>
<div align="left" style="text-align:justify;">diff --git a/src/compositor-drm.c b/src/compositor-drm.c</div>
<div align="left" style="text-align:justify;">index df81aba..8b6285c 100644</div>
<div align="left" style="text-align:justify;">--- a/src/compositor-drm.c</div>
<div align="left" style="text-align:justify;">+++ b/src/compositor-drm.c</div>
<div align="left" style="text-align:justify;">@@ -447,7 +447,7 @@ vblank_handler(int fd, unsigned int frame, unsigned int sec, unsigned int usec,</div>
<div align="left" style="text-align:justify;"> struct drm_sprite *s = (struct drm_sprite *)data;</div>
<div align="left" style="text-align:justify;"> struct drm_compositor *c = s->compositor;</div>
<div align="left" style="text-align:justify;"> struct drm_output *output = s->output;</div>
<div align="left" style="text-align:justify;">- uint32_t msecs;</div>
<div align="left" style="text-align:justify;">+ uint64_t msecs = 0;</div>
<div align="left" style="text-align:justify;"> </div>
<div align="left" style="text-align:justify;"> output->vblank_pending = 0;</div>
<div align="left" style="text-align:justify;"> </div>
<div align="left" style="text-align:justify;">@@ -480,7 +480,7 @@ page_flip_handler(int fd, unsigned int frame,</div>
<div align="left" style="text-align:justify;"> unsigned int sec, unsigned int usec, void *data)</div>
<div align="left" style="text-align:justify;"> {</div>
<div align="left" style="text-align:justify;"> struct drm_output *output = (struct drm_output *) data;</div>
<div align="left" style="text-align:justify;">- uint32_t msecs;</div>
<div align="left" style="text-align:justify;">+ uint64_t msecs=0;</div>
<div align="left" style="text-align:justify;"> </div>
<div align="left" style="text-align:justify;"> output->page_flip_pending = 0;</div>
<div align="left" style="text-align:justify;"> </div>
<div align="left" style="text-align:justify;">@@ -496,7 +496,7 @@ page_flip_handler(int fd, unsigned int frame,</div>
<div align="left" style="text-align:justify;"> output->next = NULL;</div>
<div align="left" style="text-align:justify;"> </div>
<div align="left" style="text-align:justify;"> if (!output->vblank_pending) {</div>
<div align="left" style="text-align:justify;">- msecs = sec * 1000 + usec / 1000;</div>
<div align="left" style="text-align:justify;">+ msecs = (uint64_t)sec * 1000 + (uint64_t)usec / 1000;</div>
<div align="left" style="text-align:justify;"> weston_output_finish_frame(&output->base, msecs);</div>
<div align="left" style="text-align:justify;"> }</div>
<div align="left" style="text-align:justify;"> }</div>
<div align="left" style="text-align:justify;">diff --git a/src/compositor.c b/src/compositor.c</div>
<div align="left" style="text-align:justify;">index f4263ac..37c52bc 100644</div>
<div align="left" style="text-align:justify;">--- a/src/compositor.c</div>
<div align="left" style="text-align:justify;">+++ b/src/compositor.c</div>
<div align="left" style="text-align:justify;">@@ -1026,7 +1026,7 @@ weston_output_damage(struct weston_output *output)</div>
<div align="left" style="text-align:justify;"> </div>
<div align="left" style="text-align:justify;"> static void</div>
<div align="left" style="text-align:justify;"> fade_frame(struct weston_animation *animation,</div>
<div align="left" style="text-align:justify;">- struct weston_output *output, uint32_t msecs)</div>
<div align="left" style="text-align:justify;">+ struct weston_output *output, uint64_t msecs)</div>
<div align="left" style="text-align:justify;"> {</div>
<div align="left" style="text-align:justify;"> struct weston_compositor *compositor =</div>
<div align="left" style="text-align:justify;"> container_of(animation,</div>
<div align="left" style="text-align:justify;">@@ -1129,7 +1129,7 @@ surface_accumulate_damage(struct weston_surface *surface,</div>
<div align="left" style="text-align:justify;"> }</div>
<div align="left" style="text-align:justify;"> </div>
<div align="left" style="text-align:justify;"> static void</div>
<div align="left" style="text-align:justify;">-weston_output_repaint(struct weston_output *output, uint32_t msecs)</div>
<div align="left" style="text-align:justify;">+weston_output_repaint(struct weston_output *output, uint64_t msecs)</div>
<div align="left" style="text-align:justify;"> {</div>
<div align="left" style="text-align:justify;"> struct weston_compositor *ec = output->compositor;</div>
<div align="left" style="text-align:justify;"> struct weston_surface *es;</div>
<div align="left" style="text-align:justify;">@@ -1222,7 +1222,7 @@ weston_compositor_read_input(int fd, uint32_t mask, void *data)</div>
<div align="left" style="text-align:justify;"> }</div>
<div align="left" style="text-align:justify;"> </div>
<div align="left" style="text-align:justify;"> WL_EXPORT void</div>
<div align="left" style="text-align:justify;">-weston_output_finish_frame(struct weston_output *output, uint32_t msecs)</div>
<div align="left" style="text-align:justify;">+weston_output_finish_frame(struct weston_output *output, uint64_t msecs)</div>
<div align="left" style="text-align:justify;"> {</div>
<div align="left" style="text-align:justify;"> struct weston_compositor *compositor = output->compositor;</div>
<div align="left" style="text-align:justify;"> struct wl_event_loop *loop =</div>
<div align="left" style="text-align:justify;">diff --git a/src/compositor.h b/src/compositor.h</div>
<div align="left" style="text-align:justify;">index 7a8058e..f49da84 100644</div>
<div align="left" style="text-align:justify;">--- a/src/compositor.h</div>
<div align="left" style="text-align:justify;">+++ b/src/compositor.h</div>
<div align="left" style="text-align:justify;">@@ -109,7 +109,7 @@ struct weston_spring {</div>
<div align="left" style="text-align:justify;"> double current;</div>
<div align="left" style="text-align:justify;"> double target;</div>
<div align="left" style="text-align:justify;"> double previous;</div>
<div align="left" style="text-align:justify;">- uint32_t timestamp;</div>
<div align="left" style="text-align:justify;">+ uint64_t timestamp;</div>
<div align="left" style="text-align:justify;"> };</div>
<div align="left" style="text-align:justify;"> </div>
<div align="left" style="text-align:justify;"> enum {</div>
<div align="left" style="text-align:justify;">@@ -164,7 +164,7 @@ struct weston_output {</div>
<div align="left" style="text-align:justify;"> struct weston_output_zoom zoom;</div>
<div align="left" style="text-align:justify;"> int dirty;</div>
<div align="left" style="text-align:justify;"> struct wl_signal frame_signal;</div>
<div align="left" style="text-align:justify;">- uint32_t frame_time;</div>
<div align="left" style="text-align:justify;">+ uint64_t frame_time;</div>
<div align="left" style="text-align:justify;"> int disable_planes;</div>
<div align="left" style="text-align:justify;"> </div>
<div align="left" style="text-align:justify;"> char *make, *model;</div>
<div align="left" style="text-align:justify;">@@ -493,7 +493,7 @@ void</div>
<div align="left" style="text-align:justify;"> weston_spring_init(struct weston_spring *spring,</div>
<div align="left" style="text-align:justify;"> double k, double current, double target);</div>
<div align="left" style="text-align:justify;"> void</div>
<div align="left" style="text-align:justify;">-weston_spring_update(struct weston_spring *spring, uint32_t msec);</div>
<div align="left" style="text-align:justify;">+weston_spring_update(struct weston_spring *spring, uint64_t msec);</div>
<div align="left" style="text-align:justify;"> int</div>
<div align="left" style="text-align:justify;"> weston_spring_done(struct weston_spring *spring);</div>
<div align="left" style="text-align:justify;"> </div>
<div align="left" style="text-align:justify;">@@ -543,7 +543,7 @@ void</div>
<div align="left" style="text-align:justify;"> weston_plane_release(struct weston_plane *plane);</div>
<div align="left" style="text-align:justify;"> </div>
<div align="left" style="text-align:justify;"> void</div>
<div align="left" style="text-align:justify;">-weston_output_finish_frame(struct weston_output *output, uint32_t msecs);</div>
<div align="left" style="text-align:justify;">+weston_output_finish_frame(struct weston_output *output, uint64_t msecs);</div>
<div align="left" style="text-align:justify;"> void</div>
<div align="left" style="text-align:justify;"> weston_output_schedule_repaint(struct weston_output *output);</div>
<div align="left" style="text-align:justify;"> void</div>
<div align="left" style="text-align:justify;">diff --git a/src/util.c b/src/util.c</div>
<div align="left" style="text-align:justify;">index 4ff451a..34b140e 100644</div>
<div align="left" style="text-align:justify;">--- a/src/util.c</div>
<div align="left" style="text-align:justify;">+++ b/src/util.c</div>
<div align="left" style="text-align:justify;">@@ -42,7 +42,7 @@ weston_spring_init(struct weston_spring *spring,</div>
<div align="left" style="text-align:justify;"> }</div>
<div align="left" style="text-align:justify;"> </div>
<div align="left" style="text-align:justify;"> WL_EXPORT void</div>
<div align="left" style="text-align:justify;">-weston_spring_update(struct weston_spring *spring, uint32_t msec)</div>
<div align="left" style="text-align:justify;">+weston_spring_update(struct weston_spring *spring, uint64_t msec)</div>
<div align="left" style="text-align:justify;"> {</div>
<div align="left" style="text-align:justify;"> double force, v, current, step;</div>
<div align="left" style="text-align:justify;"><font face="Times New Roman"> </font></div>
<div align="left" style="text-align:justify;"><font face="Times New Roman"> </font></div>
</span></font>
</body>
</html>